/api/collection

GET /api/collection/{id}/items

Changed on

Fetch a specific Collection's items with the following options:

  • models - only include objects of a specific set of models. If unspecified, returns objects of all models
  • archived - when true, return archived objects instead of unarchived ones. Defaults to false.
  • pinned-state - when is_pinned, return pinned objects only. when is_not_pinned, return non pinned objects only. when all, return everything. By default returns everything.
  • q - filter items by name or last editor. Blank or whitespace-only values are ignored.
  • include-available-models - include the models that have at least one visible item in the requested scope.

Note that this endpoint should return results in a similar shape to /api/dashboard/:id/items, so if this is changed, that should too.

get/api/collection/{id}/items

Request

  • Base URL
    (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    API key in header X-API-Key

Path parameters

integer required

value must be an integer greater than zero.

OR
string required

String must be a valid 21-character NanoID string.

Query parameters

qstring nullable
pinned-state'is_not_pinned' | 'is_pinned' | 'all' nullable
archivedboolean nullable

value must be a valid boolean string ('true' or 'false').

sort-direction'desc' | 'asc' nullable
show-dashboard-questionsboolean nullable

value must be a valid boolean string ('true' or 'false').

show-exploration-documentsboolean nullable

value must be a valid boolean string ('true' or 'false').

include-available-modelsboolean nullable

value must be a valid boolean string ('true' or 'false').

modelsstring[] nullable
official-collections-firstboolean nullable

value must be a valid boolean string ('true' or 'false').

sort-column'model' | 'name' | 'last_edited_by' | 'last_edited_at' | 'description' nullable

Request body

object required

Response

Successful response

dataobject[] required
limitinteger nullable

value must be an integer greater or equal to than zero.

offsetinteger nullable

value must be an integer greater or equal to than zero.

totalinteger required

value must be an integer greater or equal to than zero.

Changes

    • warning

      deleted the query request parameter include_can_run_adhoc_query

    • warning

      deleted the query request parameter official_collections_first

    • warning

      deleted the query request parameter pinned_state

    • warning

      deleted the query request parameter show_dashboard_questions

    • warning

      deleted the query request parameter sort_column

    • warning

      deleted the query request parameter sort_direction

    • info

      added the new optional query request parameter include-available-models

    • info

      added the new optional query request parameter official-collections-first

    • info

      added the new optional query request parameter pinned-state

    • info

      added the new optional query request parameter q

    • info

      added the new optional query request parameter show-dashboard-questions

    • info

      added the new optional query request parameter show-exploration-documents

    • info

      added the new optional query request parameter sort-column

    • info

      added the new optional query request parameter sort-direction

    • info

      added optional request body

    • info

      the query request parameter archived became optional

    • info

      added the media type application/json for the response with the status

    • info

      added the enum value measure to the property oneOf[subschema #1]/items/ of the query request parameter models