Documents

List a Brand's documents

Lists the documents of a Brand, newest first. Each row has a URL to read the file from. A reservation with no bytes is not in the list, because it has no file.

One page at a time: limit rows at most, 100 by default. When the answer holds nextCursor, more rows exist: send it back as cursor to get the next page.

get/context/brands/{slug}/documents

Request

  • Base URL: https://api.adcrunch.dev
  • URL: https://api.adcrunch.dev/context/brands/{slug}/documents
  • Auth: HTTP bearer

Path parameters

slugstring required

Query parameters

cursorstring

The nextCursor of the previous page. Omit it to get the first page. Send it with no change, and with the same filters as the request that answered it: a cursor from a different query gets a 400 invalid_cursor. Do not build or change a cursor.

limitinteger required

The greatest number of rows on the page, from 1 to 500. The default is 100. A greater value gets a 400, with error of invalid_request.

Response

One page of the Brand’s finalized Documents, newest first. A reservation whose bytes never arrived is never listed, because there is no readable object behind it. This page is the last one, so it carries no nextCursor.

nextCursorstring

Send this value as cursor to get the next page. It is absent on the last page.

Example response

{
  "data": [
    {
      "createdAt": 1790000000000,
      "filename": "acme-brand-guidelines.pdf",
      "id": "doc_5e2b41",
      "mimeType": "application/pdf",
      "name": "acme-brand-guidelines.pdf",
      "sizeBytes": 1482064,
      "targetId": "brd_6a9c33",
      "targetType": "brand",
      "url": "https://documents.adcrunch.dev/org_3a7f10/doc_5e2b41"
    },
    {
      "createdAt": 1789900000000,
      "filename": "acme-logo.png",
      "id": "doc_3f7a08",
      "mimeType": "image/png",
      "name": "Acme logo",
      "sizeBytes": 24118,
      "targetId": "brd_6a9c33",
      "targetType": "brand",
      "url": "https://documents.adcrunch.dev/org_3a7f10/doc_3f7a08"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.