Native Mime Type API (UAS)

Document created by pubmatic-archivist on Mar 27, 2017Last modified by catherine.racette on Aug 2, 2017
Version 6Show Document
  • View in full screen mode

Description

Native Mime Type API enables you to retrieve the supported Native Mime Types for "Image" and "Video" Asset Type.

You can set a specific mime type for Native Asset Type "image" and "video" during Native Template Creation. The Creative API performs the validations only for uploaded image mime type against the mime type configured for "image" asset while creating Native Creative for a selected template.

If you have not selected any mime type for "image" during Native Template Creation, it considers all mime types would be okay for the given asset type and the Creative API does not perform validation against it.

 

For more detail, please refer Native Ad Specification Document.

For more information about UAS Native Template Services APIs, refer to Native Template Services (UAS)

 

Supported Operations

Service Name: /common/mimetype/

                     

Method PathHTTP Method TypeDescriptionLink to Definition
/common/mimietype/{id}GET

Retrieves the Native Mime Type details using the mime type id.

The following Native Mime Types are supported. (You can retrieve the latest list using the List API.)

                                                               
IDNative Asset TypeMime Type
1imate/pngimage
2image/jpegimage
3image/gifimage
4image/tiffimage
5video/mp4video
6application/x-shockwave-flashvideo
7video/x-ms-wmvvideo
8video/h264video
9video/webmvideo
10application/javascriptvideo
11video/oggvideo

Video mime type is not yet supported by Ad Server.

Retrieve Details of a Native Mime Type
/common/mime/type/GETRetrieves a list of supported Native Mime Types. In the query, you can also apply supported dimensions, filters and sorting options to retrieve a list with a specific set of details according to your requirements.Retrieve a List of Native Mime Types

 

Retrieve Details of a Native Mime Type

 

Overview

This API enables you to retrieve the details for an individual Native Mime Type.

Request

           

URIHTTP Method
https://$URI_/PREFIX/{apiVersion}/api/common/mimetype{id}GET

Request Headers

                        

Header nameType ValueRequiredDescription
Content-TypeStringapplication/jsonYesMedia type for request.
pubTokenString${access_token}Yes

Publisher Token to authenticate and authorize the user calling the Unified Ad Server API. Send the access token generated for authentication at the place of ${access_token} in the request.

 

For more information about access tokens, refer to Getting Started with PubMatic APIs.

Sample Request URL

https://$URI_PREFIX/{apiVersion}/api/common/mimetype/1

Response

Response Body

                       

Parameter NameTypeDescription
idNumericNative Mime Type Identifier
typeStringPossible values are "image" or "video"
nameStringMime Type String

Sample Response JSON

    

 {
  "id": 1,
  "type": "image",
  "name": "image/png"
}

 

Retrieve a List of Native Mime Types

Overview

This API enables you to retrieve a list Native Mime Types.

Request

           

URIHTTP Method
https://$URI_/PREFIX/{apiVersion}/api/common/mimetypeGET

Request Headers

                        

Header nameType ValueRequiredDescription
Content-TypeStringapplication/jsonYesMedia type for request.
pubTokenString${access_token}Yes

Publisher Token to authenticate and authorize the user calling the Unified Ad Server API. Send the access token generated for authentication at the place of ${access_token} in the request.

 

For more information about access tokens, refer to Getting Started with PubMatic APIs.

Sample Request URL

https://$URI_PREFIX/{apiVersion}/api/common/mimetype

Response

Sample Response JSON

    

This will return a list of supported Mime Types. 

 

Error Codes for Native Mime Type

             

Sr. NoHTTP Status Error CodesDescription
1.204-No ContentRequested details for Native Mime Type with id that does not exist or is invalid.

 

 

Unified Ad Server References

Common Request Query Parameters for Web Services

Supported Operations for Filters

HTTP Status Codes

Unified Ad Server Specific Error Codes

Version 0.1

Attachments

    Outcomes