Media

List project media assets

GET
/api/projects/{projectId}/media

Authorization

headerAuthorizationBearer <Postdot API key>

A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.

Path Parameters

projectId*string
Length1 <= length

Query Parameters

cursor?string
Length1 <= length <= 1024
limit?integer
Range1 <= value <= 100
view?string
Value in"library""trash"
search?string
Lengthlength <= 255
sort?string
Value in"newest""oldest""name_asc""name_desc""largest""smallest"
family?string
Value in"all""image""video""audio""document"
date?string
Value in"all""last_24_hours""last_7_days""last_30_days"

Response Body

Response for status 200

application/json
  1. response
media*array<>
restorableAssetIds*array<>
nextCursor*|null
total*integer
Range0 <= value
trashCount*integer
Range0 <= value
retentionMs*integer
Range0 <= value
Example Request
curl -X GET 'https://postbot.example/api/projects/string/media'
Example Response
{
  "media": [
    {
      "asset": {
        "id": "string",
        "projectId": "string",
        "originalFilename": "string",
        "defaultAccessibilityText": "string",
        "state": "reserved",
        "archivedAt": 0,
        "deletionRequestedAt": 0,
        "deletedAt": 0,
        "failureCode": "string",
        "failureMessage": "string",
        "createdByActorId": "string",
        "createdAt": 0,
        "updatedAt": 0
      },
      "representations": [
        {
          "id": "string",
          "projectId": "string",
          "assetId": "string",
          "kind": "original",
          "state": "reserved",
          "declaredContentType": "string",
          "detectedContentType": "string",
          "detectedFormat": "string",
          "family": "image",
          "byteSize": 0,
          "sha256": "string",
          "width": 1,
          "height": 1,
          "durationMs": 0,
          "pageCount": 1,
          "isAnimated": true,
          "processorId": "string",
          "processorVersion": "string",
          "recipeJson": "string",
          "failureCode": "string",
          "failureMessage": "string",
          "createdAt": 0,
          "updatedAt": 0
        }
      ]
    }
  ],
  "restorableAssetIds": [
    "string"
  ],
  "nextCursor": "string",
  "total": 0,
  "trashCount": 0,
  "retentionMs": 0
}

Was this page helpful?