MediaList media

Media

List media

Lists the media library of an establishment, newest first, page by page, with URLs signed for the current window. Works in test and live.

GEThttps://api.sofia-post.com/api/v1/media
GEThttps://api.sofia-post.com/api/v1/media

List media

Lists the media library of an establishment, newest first, page by page, with URLs signed for the current window. Works in test and live.

Authorizations

Authorizationstringrequired

Your personal key or OAuth access token, sent as Bearer <token>.

Kept in this tab only, and sent only to api.sofia-post.com. Get an API key

Query parameters

establishmentIdstringrequired

The establishment whose media library is read.

cursorstring

The nextCursor of the previous page.

limitnumber

Page size, from 1 to 100 (default 20).

An establishment’s media are returned most recent first, page by page: see pagination.

Each media file’s url is signed and expires: keep the id, and read the media again with `GET /v1/media/{id}` when you need a fresh URL.

Authorizations

  • Authorizationstringheaderrequired

    Your personal key or OAuth access token, sent as Bearer <token>.

Query parameters

  • establishmentIdstringrequired

    The establishment whose media library is read.

  • cursorstring

    The nextCursor of the previous page.

  • limitnumber

    Page size, from 1 to 100 (default 20).

Response

A page of media, with nextCursor when more follow.

  • dataobject[]required

    The media of the page

    Show child attributes
    • idstringrequired

      Identifier of the media, to pass in media[].id of a post

    • typestringrequired

      Kind of the media

      Allowed values: imagevideo

    • urlstringrequired

      Signed address, valid for the current window

    • fileNamestringrequired

      Name of the file

    • contentTypestringrequired

      MIME type of the file

    • sizenumberrequired

      Size in bytes

    • createdAtstring<date-time>required

      When the media was added

    • thumbnailUrlstring

      Signed thumbnail (poster of a video, square of an image)

  • nextCursorstring

    Pass it as ?cursor= for the next page; absent at the end

Was this page helpful?