-
-
Notifications
You must be signed in to change notification settings - Fork 15
API
You will need to know your Firebase project ID, Space ID and host domain name.
Hosting domain names:
<firebase-project-id>.web.app
<firebase-project-id>.firebaseapp.com
custom domain name
Create Access Token under Space Settings.
Only Admin and Space Manager can create Access Tokens.
All your requests should contain additional query parameter with name token, with exact token created under Access Token Settings.
In case token is omitted or wrong, endpoint will return status code 404
All paths are redirected to cached CDN version.
Please fallow the redirect from response.
Path: /api/v1/spaces/:spaceId/translations/:locale
Path Parameters:
- spaceId - space unique identifier
- locale - locale id
Query Parameters:
- cv - cache version
Response Example:
{
"KEY_1": "VALUE_1",
"KEY_2": "VALUE_2",
"KEY_3": "VALUE_3",
"KEY_4": "VALUE_4"
}
Path: /api/v1/spaces/:spaceId/links
Path Parameters:
- spaceId - space unique identifier
- locale - locale id
Query Parameters:
- kind = 'DOCUMENT' or 'FOLDER'
- startSlug = filter by start with slug
- cv - cache version
- token - access token
Response Example:
{
"6ctsdZzS3h5VLFrUjMwI": {
"id": "6ctsdZzS3h5VLFrUjMwI",
"kind": "FOLDER",
"name": "Emails",
"slug": "emails",
"fullSlug": "emails",
"parentSlug": "",
"createdAt": "2023-02-03T12:27:29.207Z",
"updatedAt": "2023-02-03T12:27:29.207Z"
},
"AKTQMYSd56UQrR0HERSM": {
"id": "AKTQMYSd56UQrR0HERSM",
"kind": "PAGE",
"name": "Home",
"slug": "home",
"fullSlug": "home",
"parentSlug": "",
"createdAt": "2023-01-12T19:00:02.622Z",
"updatedAt": "2023-02-03T20:18:26.141Z",
"publishedAt": "2023-02-01T10:05:06.181Z"
}
}
Path: /api/v1/spaces/:spaceId/contents/slugs/:slugs
Path Parameters:
- spaceId - space unique identifier
- slugs - full slug of content
Query Parameters:
- locale - locale id
- version - 'draft' in case you are interested in saved, otherwise omit it to get published version
- cv - cache version
- token - access token
Path: /api/v1/spaces/:spaceId/contents/:contentId
Path Parameters:
- spaceId - space unique identifier
- contentId - content unique identifier
Query Parameters:
- locale - locale id
- version - 'draft' in case you are interested in saved, otherwise omit it to get published version
- cv - cache version
- token - access token
Response Example:e
{
"id": "AKTQMYSd56UQrR0HERSM",
"name": "Home",
"slug": "home",
"fullSlug": "home",
"parentSlug": "",
"createdAt": "2023-01-12T19:00:02.622Z",
"updatedAt": "2023-02-05T01:03:33.663Z",
"publishedAt": "2023-02-05T01:03:38.704Z",
"data": {
"_id": "e043fbe7-2c43-449f-b59a-f681ccab8354",
"schematic": "page",
"title": "Home Page",
"body": "Hello World ...",
"count": 5655
}
}
Path: /api/v1/spaces/:spaceId/assets/:assetId
Path Parameters:
- spaceId - space unique identifier
- assetId - asset unique identifier
Query Parameters:
- w - width of asset in case asset is type 'image/*', excluding vector images like SVG. Otherwise omit it to get original version
- download - set to 'true' in case asset needs to be downloaded, otherwise omit it inline version