List Collections
List all collections for a given project.
Request
GET https://app.ycode.com/api/v1/collectionsHeaders
| Header | Value |
|---|---|
| Authorization | Bearer YOUR_API_TOKEN |
Response
Returns an array of collection objects wrapped in a data key.
Response fields
| Field | Type | Description |
|---|---|---|
_ycode_id | string | Unique identifier for the collection |
name | string | Name given to the collection |
singular_name | string | Singular name of the collection |
created_at | string | ISO 8601 date when the collection was created |
Example response
{
"data": [
{
"_ycode_id": "637781341a6f7",
"name": "Blogposts",
"singular_name": "Blogpost",
"created_at": "2022-11-18T12:57:24.000Z"
},
{
"_ycode_id": "6377813de3017",
"name": "Authors",
"singular_name": "Author",
"created_at": "2022-11-18T12:57:33.000Z"
},
{
"_ycode_id": "6377850277726",
"name": "Categories",
"singular_name": "Category",
"created_at": "2022-11-18T13:13:38.000Z"
}
]
}Example request
curl https://app.ycode.com/api/v1/collections \
-H "Authorization: Bearer YOUR_API_TOKEN"Last updated on