v1Collections
Query collections with search and pagination
QUERY
v1CollectionsArguments
parentUrlStringParent collection URI; when set, returns direct children of that collection
searchStringFull-text search over collection name
localeString!requiredLocale for translated collection fields (e.g. en, sv). Required
pageIntPage number (1-based, default 1)
perPageIntPage size (default 25, max 50)
Returns
Collections with pagination information
Try it
Server
Bodyapplication/json
Request
curl -X POST 'https://graphql.enad.io/{app_id}/graphql' \
-H 'Content-Type: application/json' \
-d '{
"query": "query V1Collections($parentUrl: String, $search: String, $locale: String!, $page: Int, $perPage: Int) {\n v1Collections(parentUrl: $parentUrl, search: $search, locale: $locale, page: $page, perPage: $perPage) {\n collections {\n id\n parentId\n uri\n title\n status\n createdAt\n updatedAt\n }\n pageInfo {\n totalPages\n currentPage\n hasNextPage\n hasPreviousPage\n }\n }\n}",
"variables": {
"parentUrl": "string",
"search": "string",
"locale": "string",
"page": 0,
"perPage": 0
}
}'const response = await fetch("https://graphql.enad.io/{app_id}/graphql", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: "{\n \"query\": \"query V1Collections($parentUrl: String, $search: String, $locale: String!, $page: Int, $perPage: Int) {\\n v1Collections(parentUrl: $parentUrl, search: $search, locale: $locale, page: $page, perPage: $perPage) {\\n collections {\\n id\\n parentId\\n uri\\n title\\n status\\n createdAt\\n updatedAt\\n }\\n pageInfo {\\n totalPages\\n currentPage\\n hasNextPage\\n hasPreviousPage\\n }\\n }\\n}\",\n \"variables\": {\n \"parentUrl\": \"string\",\n \"search\": \"string\",\n \"locale\": \"string\",\n \"page\": 0,\n \"perPage\": 0\n }\n}"
});import requests
response = requests.post(
"https://graphql.enad.io/{app_id}/graphql",
headers={
"Content-Type": "application/json"
},
data="{\n \"query\": \"query V1Collections($parentUrl: String, $search: String, $locale: String!, $page: Int, $perPage: Int) {\\n v1Collections(parentUrl: $parentUrl, search: $search, locale: $locale, page: $page, perPage: $perPage) {\\n collections {\\n id\\n parentId\\n uri\\n title\\n status\\n createdAt\\n updatedAt\\n }\\n pageInfo {\\n totalPages\\n currentPage\\n hasNextPage\\n hasPreviousPage\\n }\\n }\\n}\",\n \"variables\": {\n \"parentUrl\": \"string\",\n \"search\": \"string\",\n \"locale\": \"string\",\n \"page\": 0,\n \"perPage\": 0\n }\n}",
)Response
{
"data": {
"v1Collections": {
"collections": [
{
"id": "string",
"parentId": "string",
"uri": "string",
"title": "string",
"status": "string",
"createdAt": null,
"updatedAt": null
}
],
"pageInfo": {
"totalPages": 0,
"currentPage": 0,
"hasNextPage": true,
"hasPreviousPage": true
}
}
}
}