Schemas
List schema versions
List published versions of a schema.
GET
/
api
/
v2
/
structs
/
{slug}
/
versions
/
List published versions for a Struct
curl --request GET \
--url https://api.example.com/api/v2/structs/{slug}/versions/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v2/structs/{slug}/versions/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v2/structs/{slug}/versions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"version_number": 1073741823,
"published_at": "2023-11-07T05:31:56Z",
"published_by": {
"id": 123,
"email": "jsmith@example.com"
},
"field_count": 123,
"is_deprecated": true,
"deprecated_by": {
"id": 123,
"email": "jsmith@example.com"
},
"publish_note": "<string>",
"deprecated_at": "2023-11-07T05:31:56Z",
"deprecation_note": "<string>"
}
],
"next": "http://api.example.org/accounts/?cursor=cD00ODY%3D\"",
"previous": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3"
}{}Published snapshots, newest last. Pair with Publish.
Authorizations
extractApiKeybearerAuthcookieAuth
⌘I
List published versions for a Struct
curl --request GET \
--url https://api.example.com/api/v2/structs/{slug}/versions/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v2/structs/{slug}/versions/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v2/structs/{slug}/versions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"version_number": 1073741823,
"published_at": "2023-11-07T05:31:56Z",
"published_by": {
"id": 123,
"email": "jsmith@example.com"
},
"field_count": 123,
"is_deprecated": true,
"deprecated_by": {
"id": 123,
"email": "jsmith@example.com"
},
"publish_note": "<string>",
"deprecated_at": "2023-11-07T05:31:56Z",
"deprecation_note": "<string>"
}
],
"next": "http://api.example.org/accounts/?cursor=cD00ODY%3D\"",
"previous": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3"
}{}
