Search Endpoint

Overview

The Search endpoint allows filtering media items based on different properties.

HTTP Method

POST

Endpoint URL

Params BASE-URL:

YOUR-ACCESS-TOKEN:

Access token provided by the endpoint mentioned on this documentation: [SDK Mobile] - Generate an API Token

Request Parameters

Query Parameters

Parameter

Description

Possible Values

direction

Sorting direction of the results

asc, desc

page

The page number to retrieve

Numeric value

sortBy

Attribute to order results by

e.g., createdDate

Headers

Header

Description

Content-Type

application/json

Authorization

Bearer {{YOUR-ACCESS-TOKEN}}

Request Body

Parameter

Description

Type

ids

Array of media IDs to filter

Array (optional)

type

Type of media

VIDEO, IMAGE, AUDIO, DOCUMENT (optional)

tags

Map of tags (key-value pairs)

JSON Object (optional)

isLibrary

Whether to filter media from the library

Boolean (optional)

Request Body Example

Full Example:

{
    "ids": ["0e86da5d-9efe-4be5-a7d7-61b4796cb8dd"],
    "type": "VIDEO",
    "tags": {
        "tag1": "value1"
    },
    "isLibrary": true
}

Example With Missing Values:

{
    "ids": null,
    "type": null,
    "tags": null,
    "isLibrary": false
}

cURL Request Example

curl --location '{{BASE-URL}}/api/media/search?direction={{DIRECTION}}&page={{PAGE_NUMBER}}&sortBy={{PROPERTY}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{YOUR-ACCESS-TOKEN}}' \
--data '{
    "ids": [{{IDS}}],
    "type": {{TYPE}},
    "tags": {{TAGS}},
    "isLibrary": {{LIBRARY}}
}'

Response

Response Example

{
    "content": [
        {
            "id": "53f7e0b1-c276-49d8-b6aa-75520ed385ce",
            "url": "https://sdkmobileapi.s3.us-west-2.amazonaws.com/media/00066767-4e16-4878-a99a-4594dedffa14.mp4",
            "transcriptionUrl": "https://sdkmobileapi.s3.us-west-2.amazonaws.com/transcriptions/00066767-4e16-4878-a99a-4594dedffa14.vtt",
            "transcriptionLength": "0",
            "type": "VIDEO",
            "createdDate": "2025-02-04T21:18:07Z",
            "title": "00066767-4e16-4878-a99a-4594dedffa14.mp4",
            "subAccountId": "b4468974-32f5-11ef-b234-0660c3706637",
            "includeInReport": true,
            "isLibrary": true,
            "thumbnailUrl": "https://sdkmobileapi.s3.us-west-2.amazonaws.com/media/thumbnail/53f7e0b1-c276-49d8-b6aa-75520ed385ce.jpg",
            "previewUrl": "https://sdkmobileapi.s3.us-west-2.amazonaws.com/media/preview/53f7e0b1-c276-49d8-b6aa-75520ed385ce.gif"
        }
    ],
    "pageable": {
        "pageNumber": 0,
        "pageSize": 20,
        "sort": {
            "sorted": false,
            "unsorted": true,
            "empty": true
        },
        "offset": 0,
        "paged": true,
        "unpaged": false
    },
    "totalElements": 2,
    "totalPages": 1,
    "last": true,
    "numberOfElements": 2,
    "size": 20,
    "number": 0,
    "sort": {
        "sorted": false,
        "unsorted": true,
        "empty": true
    },
    "first": true,
    "empty": false
}

Last updated

Was this helpful?