# Universal Media Id

Universal Media Id is a unique identifier for media. The media_id for a piece of media (i.e. ads, audio, video, content) is utilized by many of the Backtracks Media Intelligence API endpoints and the universal uniqueness allows the media_id to be utilized across different systems with Backtracks functioning as the registry. The media_id for a particular piece of media may be utilized in subsequent API calls or shared without needing to pass or share the URL of the original media file. This allows third-party systems to reference the Universal Media Id without needing access to the original or mezzanine file, while allowing the submitter of the original media to verify the associated media_id for that given URL.

Backtracks Universal Media Id - Audio and Video Intelligence

# Generate Media Id Request

Universal Media Ids are universally unique and no two pieces of media will have the same media_id. When generating a media_id the input url value is case-sensitive. If the contents of the file at a specific URL changes a new URL should be utilized and a new media_id should be generated (i.e. https://example.com/a.mp4?version=1 and https://example.com/a.mp4?version=2 will have different media_ids).

# Parameters

Property Type Description
url string (4096) valid publicly accessible url with the scheme, i.e. https://example.com/abc.wav?v=123

TIP

Backtracks supports a variety of media formats for audio and video and recommends submitting the highest quality file that is representative of the content (i.e. wav for audio, mp4 for video, etc.).

POST https://api.backtracks.fm/v1/universal-media-id HTTP/1.1
Accept: application/json
Authorization: JWT <your backtracks access token>...
Content-Type: application/json

{
  "url": "<url>"
}

# Generate Media Id Response

HTTP/1.1 201 Created
Location: https://api.backtracks.fm/v1/universal-media-id
Content-Type: application/hal+json; charset=utf-8

{
    "id": "67328be8-0f2c-47b4-acda-f5f3bf82eedb",
    "_links": {
        "self": {
            "href": "https://api.backtracks.fm/v1/universal-media-id?url=<url>"
        }
    }
}

# Get Media Id Request

You may retrieve or verify the media_id for a url with the following API call.

TIP

The url parameter passed on the querystring needs to be url encoded. For example, https://api.backtracks.fm/v1/universal-media-id?url=https://example.com/abc.wav?v=123 and https://api.backtracks.fm/v1/universal-media-id?url=https%3A%2F%2Fexample.com%2Fabc.wav%3Fv%3D123 are equivalent with the url parameter being url encoded in the second item.

# Parameters

Property Type Description
url string (4096) valid publicly accessible url that is url encoded, i.e. https://example.com/abc.wav?v=123 URL encoded as https%3A%2F%2Fexample.com%2Fabc.wav%3Fv%3D123
GET https://api.backtracks.fm/v1/universal-media-id?url=https%3A%2F%2Fexample.com%2Fabc.wav%3Fv%3D123
HTTP/1.1
Accept: application/json
Authorization: JWT <your backtracks access token>...

# Get Media Id Response

HTTP/1.1 200 OK
Location: https://api.backtracks.fm/v1/universal-media-id?url=https%3A%2F%2Fexample.com%2Fabc.wav%3Fv%3D123
Content-Type: application/hal+json; charset=utf-8

{
    "id": "67328be8-0f2c-47b4-acda-f5f3bf82eedb",
    "_links": {
        "self": {
            "href": "https://api.backtracks.fm/v1/universal-media-id?url=https%3A%2F%2Fexample.com%2Fabc.wav%3Fv%3D123"
        }
    }
}