# Get a database export page

Returns one keyset page of rows from a declared table in `createdAt` then `id` order, up to `limit` rows, 500 by default and 1000 at most. `schemaHash` is the fence from the export metadata read, and the page is rejected when the table stops matching it. Follow `pagination.nextCursor` until `hasMore` is false.

## Request

GET `/v1/spaces/{spaceId}/db/export/{table}`

### Authorization

`Authorization` Bearer token · header required

`Authorization: Bearer <key>` with the Space key (`sfc_` prefix) of an unclaimed Space. The same key is the fragment of the claim URL and the token in the Space's `/_/__/<key>` sign-in URL.

or

`Authorization` Bearer token · header required

`Authorization: Bearer <token>` with an API key (`sfa_` prefix), an OAuth access token, a session token, or a Space machine credential (`sfm_` prefix).

### Path parameters

- `spaceId` string required
- `table` string required
  - min length 1 · max length 128 · matches ^[A-Za-z_][A-Za-z0-9_]*

### Query parameters

- `schemaHash` string required
  - matches ^sha256:[a-f0-9]{64}$
- `cursor` string
  - min length 1 · max length 4096
- `limit` integer required
  - min 1 · max 1000 · default: 500

## Responses

### 200 Response for status 200

```json
{
  "$schema": "<uri>",
  "data": [
    {
      "property1": "string",
      "property2": "string"
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": true
  }
}
```

### Error Response
Every 4xx and 5xx response is one RFC 9457 problem document served as `application/problem+json`.

```json
{
  "$schema": "<uri>",
  "type": "string",
  "title": "string",
  "status": -9007199254740991,
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": [
    "string"
  ],
  "next": [
    "string"
  ],
  "requestId": "string"
}
```

## Try it

### Server

Base URL: `https://api.spacefast.com`

### Authorization

Bearer token

#### Request Example

```bash
curl -X GET "https://api.spacefast.com/v1/spaces/string/db/export/string?schemaHash=string&limit=500" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

```javascript
const response = await fetch("https://api.spacefast.com/v1/spaces/string/db/export/string?schemaHash=string&limit=500", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN"
  }
});
```

```python
import requests

response = requests.get(
    "https://api.spacefast.com/v1/spaces/string/db/export/string?schemaHash=string&limit=500",
    headers={
        "Authorization": "Bearer YOUR_TOKEN"
    },
)
```
