v1CollectionById
Get a single collection by ID
QUERY
v1CollectionByIdArguments
idString!requiredCollection UUID. Required
localeString!requiredLocale for translated collection fields (e.g. en, sv). Required
Returns
Collection with recursive subcollections
Try it
Server
Bodyapplication/json
Request
curl -X POST 'https://graphql.enad.io/{app_id}/graphql' \
-H 'Content-Type: application/json' \
-d '{
"query": "query V1CollectionById($id: String!, $locale: String!) {\n v1CollectionById(id: $id, locale: $locale) {\n id\n parentId\n uri\n title\n translatedUri {\n locale\n uri\n }\n status\n createdAt\n updatedAt\n subCollections {\n id\n parentId\n uri\n title\n status\n createdAt\n updatedAt\n }\n }\n}",
"variables": {
"id": "string",
"locale": "string"
}
}'const response = await fetch("https://graphql.enad.io/{app_id}/graphql", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: "{\n \"query\": \"query V1CollectionById($id: String!, $locale: String!) {\\n v1CollectionById(id: $id, locale: $locale) {\\n id\\n parentId\\n uri\\n title\\n translatedUri {\\n locale\\n uri\\n }\\n status\\n createdAt\\n updatedAt\\n subCollections {\\n id\\n parentId\\n uri\\n title\\n status\\n createdAt\\n updatedAt\\n }\\n }\\n}\",\n \"variables\": {\n \"id\": \"string\",\n \"locale\": \"string\"\n }\n}"
});import requests
response = requests.post(
"https://graphql.enad.io/{app_id}/graphql",
headers={
"Content-Type": "application/json"
},
data="{\n \"query\": \"query V1CollectionById($id: String!, $locale: String!) {\\n v1CollectionById(id: $id, locale: $locale) {\\n id\\n parentId\\n uri\\n title\\n translatedUri {\\n locale\\n uri\\n }\\n status\\n createdAt\\n updatedAt\\n subCollections {\\n id\\n parentId\\n uri\\n title\\n status\\n createdAt\\n updatedAt\\n }\\n }\\n}\",\n \"variables\": {\n \"id\": \"string\",\n \"locale\": \"string\"\n }\n}",
)Response
{
"data": {
"v1CollectionById": {
"id": "string",
"parentId": "string",
"uri": "string",
"title": "string",
"translatedUri": [
{
"locale": "string",
"uri": "string"
}
],
"status": "string",
"createdAt": null,
"updatedAt": null,
"subCollections": [
{
"id": "string",
"parentId": "string",
"uri": "string",
"title": "string",
"status": "string",
"createdAt": null,
"updatedAt": null
}
]
}
}
}