Skip to Content
DocsCollectionsList Collections

List Collections

List all collections for a given project.

Request

GET https://app.ycode.com/api/v1/collections

Headers

HeaderValue
AuthorizationBearer YOUR_API_TOKEN

Response

Returns an array of collection objects wrapped in a data key.

Response fields

FieldTypeDescription
_ycode_idstringUnique identifier for the collection
namestringName given to the collection
singular_namestringSingular name of the collection
created_atstringISO 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