Get a collection
curl --request GET \
--url https://api.cactal.ai/v1/cms/collections/{collectionId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cactal.ai/v1/cms/collections/{collectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cactal.ai/v1/cms/collections/{collectionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"collection": {
"id": "<string>",
"websiteId": "<string>",
"slug": "<string>",
"displayName": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"fields": [
{
"id": "<string>",
"collectionId": "<string>",
"key": "<string>",
"displayName": "<string>",
"description": "<string>",
"type": "plain_text",
"required": true,
"isUnique": true,
"position": "<string>",
"example": "<unknown>",
"config": {
"choices": [
{
"id": "<string>",
"label": "<string>"
}
],
"multiple": true
},
"targetCollectionId": "<string>"
}
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}CMS collections
Get a collection
Returns a collection together with its full field list, which defines the shape of every item in it.
GET
/
cms
/
collections
/
{collectionId}
Get a collection
curl --request GET \
--url https://api.cactal.ai/v1/cms/collections/{collectionId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cactal.ai/v1/cms/collections/{collectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cactal.ai/v1/cms/collections/{collectionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"collection": {
"id": "<string>",
"websiteId": "<string>",
"slug": "<string>",
"displayName": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"fields": [
{
"id": "<string>",
"collectionId": "<string>",
"key": "<string>",
"displayName": "<string>",
"description": "<string>",
"type": "plain_text",
"required": true,
"isUnique": true,
"position": "<string>",
"example": "<unknown>",
"config": {
"choices": [
{
"id": "<string>",
"label": "<string>"
}
],
"multiple": true
},
"targetCollectionId": "<string>"
}
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}{
"kind": "validation",
"message": "<string>",
"suggestion": "<string>",
"validValues": [
"<string>"
]
}Authorizations
Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.
Path Parameters
Minimum string length:
1⌘I