# List exportable tables and the schema fence

Returns the live capsule’s declared table names in ascending order, plus the `schemaHash` that fences this export. Send that hash to the per-table page read, which rejects a table whose shape has changed since instead of mixing it into the export. Rows there come back in `createdAt` then `id` order, and consistency holds within one page rather than across the export.

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

## 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

## Responses

### 200 Response for status 200

`$schema` string <uri>

Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.

`data` object required

- `spaceId` string | any required  
- `versionId` string | any required  
- `schemaHash` string required  
- `consistency` string required  
- `ordering` object required
  - `tables` string required
  - `rows` string required
- `tables` string[] required

### default Error

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

`$schema` string <uri>

Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.

- `type` string required
- `title` string required
- `status` integer required
- `detail` string required
- `code` string required
- `pointer` string
- `details` object
- `suggestions` string[]
- `next` string[]
- `requestId` string required

### Try it

#### Server

Base URL https://api.spacefast.com

#### Authorization

Bearer token Remember on this device Include my values in samples

### Parameters

`spaceId` path *

## Request

### cURL

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

### JavaScript

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

### Python

```python
import requests

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

### Response

#### 200 default

```json
{
  "$schema": "http://example.com",
  "data": {
    "spaceId": "string",
    "versionId": "string",
    "schemaHash": "string",
    "consistency": "per_page",
    "ordering": {
      "tables": "name_asc",
      "rows": "created_at_id_asc"
    },
    "tables": [
      "string"
    ]
  }
}
```

```json
{
  "$schema": "http://example.com",
  "type": "string",
  "title": "string",
  "status": -9007199254740991,
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": [
    "string"
  ],
  "next": [
    "string"
  ],
  "requestId": "string"
}
```
