ASI/appdata/:app_id/@collections/:id

GET ^top

Returns this collection. If this collection contains references to other collections, those without read-access for the current user are hidden automatically from the results.

Parameters

startIndex

Index of the first returned item. Indexing starts at 1.

count

The number of items per page. If this parameter is unspecified, all items will be included.

Returns

  • 200 - OK
  • 403 - The current application or user doesn't have read access to this collection.

POST ^top

Adds a new item to this collection.

Parameters

item
body

The body of the item. If a file is given or content_type is not text/*, this parameter is ignored.

content_type

The content type of the new collection item. The content types currently supported are text/*, image/* and collection (a reference to another collection).

file

A file to be added to the collection (optional).

collection_id

Id of an existing collection where the reference will point to. If content_type is not collection this parameter is ignored.

Returns

  • 201 - Created
  • 400 - A malformed or unsupported image type was uploaded.
  • 403 - The current application or user doesn't have read access to this collection, or this collection is indestructible. You must contact an ASI administrator to delete an indestructible collection.

PUT ^top

Updates the attributes of this collection.

Parameters

collection
read_only

Whether this collection is read-only. Read-only collections can be written to only by their owner; other collections are writable by all users with read access

title

A title describing this collection.

tags

Keywords for this collection.

owner_id

The id of the user owning this collection. If unspecified, this collection will belong to the application (and will be visible to all users).

priv

Whether this collection is private. A private collection is visible to only the owner and their friends.

Returns

  • 200 - OK
  • 403 - The current application or user doesn't have read access to this collection.

DELETE ^top

Deletes this collection.

Returns

  • 200 - OK
  • 403 - The current application or user doesn't have read access to this collection, or this collection is indestructible. You must contact an ASI administrator to delete an indestructible collection.

SUBRESOURCES ^top