Collection Update
Update a collection owned by the authenticated account.
Update a collection owned by the authenticated account.
storyden-session<token>collection_mark*stringEither:
- The unique collection ID.
- A string of the form -
xid-prefixed-kebab-case-stringapplication/json- body
name?CollectionNameslug?CollectionSlugA polymorphic identifier which is either a raw ID, a slug or both values combined and separated by a hyphen. This allows endpoints to respond to varying forms of a resource's ID which may be present in different app contexts. For example, a slug may be used in a URL but raw IDs are often exposed as part of API responses or in certain endpoint parameters. This type allows flexibility in user experience as well as the API surface while ensuring performance during database queries and other operations.
For example, given a thread with the ID cc5lnd2s1s4652adtu50 and the
slug top-10-movies-thread, Storyden will understand both the forms:
cc5lnd2s1s4652adtu50-top-10-movies-thread or cc5lnd2s1s4652adtu50 or
top-10-movies-thread as the identifier for that thread.
Marks are only ever used on the read path as they are a derivative data type and are not stored in the database as-is, while IDs and slugs are. The write path typically exposes slugs as writable and IDs as immutable.
xid-prefixed-kebab-case-stringdescription?CollectionDescriptionCollection updated.
application/json- response
A collection is a group of threads owned by a user. It allows users to curate their own lists of content from the site. Collections can only contain root level posts (threads) with titles and slugs to link to.
id*IdentifierA unique identifier for this resource.
xidcreatedAt*stringThe time the resource was created.
date-timeupdatedAt*stringThe time the resource was updated.
date-timedeletedAt?stringThe time the resource was soft-deleted.
date-timemisc?Arbitrary extra data stored with the resource.
name*CollectionNameslug*CollectionSlugA polymorphic identifier which is either a raw ID, a slug or both values combined and separated by a hyphen. This allows endpoints to respond to varying forms of a resource's ID which may be present in different app contexts. For example, a slug may be used in a URL but raw IDs are often exposed as part of API responses or in certain endpoint parameters. This type allows flexibility in user experience as well as the API surface while ensuring performance during database queries and other operations.
For example, given a thread with the ID cc5lnd2s1s4652adtu50 and the
slug top-10-movies-thread, Storyden will understand both the forms:
cc5lnd2s1s4652adtu50-top-10-movies-thread or cc5lnd2s1s4652adtu50 or
top-10-movies-thread as the identifier for that thread.
Marks are only ever used on the read path as they are a derivative data type and are not stored in the database as-is, while IDs and slugs are. The write path typically exposes slugs as writable and IDs as immutable.
xid-prefixed-kebab-case-stringdescription?CollectionDescriptionowner*A minimal reference to an account.
item_count*integerhas_queried_item*booleancurl -X PATCH 'https://example.com/api/collections/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "misc": {}, "name": "string", "slug": "string", "description": "string", "owner": { "id": "string", "joined": "2019-08-24T14:15:22Z", "suspended": "2019-08-24T14:15:22Z", "handle": "string", "name": "string", "signature": "string", "roles": [ { "badge": true, "default": true, "id": "string", "name": "string", "colour": "string", "meta": {} } ] }, "item_count": 0, "has_queried_item": true}