External Media

Create external media

The following curl command is used to generate external media given an URL. The url must point to a VIDEO file or a IMAGE file. This endpoints support the creation of medias simultaneously, so it can received up to 50 different URLs.

curl -X POST "{{BASE-URL}}/api/media/external" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer {{YOUR-ACCESS-TOKEN}}" \
     -d '{
           "medias": [
             {
               "url": {{EXTERNAL-URL}},
               "title": {{TITLE}},
               "tags": {
                 {{KEY}}: {{VALUE}},
                 ...
               },
               "duration": {{DURATION}},
               "creator": {{CREATOR}},
               "includeInReport": {{INCLUDE-REPORT}}
             }
           ]
         }'

Params:

BASE-URL:


YOUR-ACCESS-TOKEN:

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


EXTERNAL-URL: This is the external URL of the media that you want to upload. It should be a direct link to the media file (e.g., video or image) hosted on an external server.

Example:

"url": "https://example.com/media/file.mp4"


TITLE: The title you want to assign to the media. This is typically a descriptive name that makes it easier to identify the content.


KEY: This represents the name or identifier of a specific tag. It is a string that defines the type or category of the information you want to associate with the media (e.g., PROJECT_ID, CLIENT_NAME, etc.).

Example:

"PROJECT_ID"

VALUE: This is the actual value or content associated with the corresponding key. It provides specific details for that tag (e.g., the ID of the project or the name of the client).

Example:

"12345"

Together, a key and value pair is used to tag the media with relevant information, where the key specifies the type of metadata, and the value holds the data itself.

Example:

"tags": { "PROJECT_ID": "12345", "CLIENT_NAME": "John Doe" }


DURATION: The duration of the media, typically in seconds. This value is used to indicate how long the media (e.g., video or audio) runs.


CREATOR: The name of the person or entity who created or uploaded the media. This is used to track the source of the media content.


INCLUDE-REPORT: A boolean value that specifies whether the media should be included in reports. Use true to include it in reports, or false to exclude it.

Response example:

{
    "content": [
        {
            "id": "12dbbe11-35a6-4f21-9c72-cfc8bd34abf1",
            "url": "http://example.com/media.mp4",
            "type": "VIDEO",
            "createdDate": "2024-09-13T14:35:46Z",
            "title": "Sample Media",
            "duration": 120,
            "creator": "John Doe"
        }
    ]
} 

Last updated