Get a database export page - Spacefast Docs

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

Query parameters

Responses

200 Response for status 200

{
  "$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.

{
  "$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

curl -X GET "https://api.spacefast.com/v1/spaces/string/db/export/string?schemaHash=string&limit=500" \
  -H "Authorization: Bearer YOUR_TOKEN"
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"
  }
});
import requests

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