Operator API (used for Custom Key Value) (UAS)

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

Description

Use the Operator API to retrieve the operators supported by the Unified Ad Server for custom key value targeting on a Line Item. 

Supported Operations

Service Name: /operators/

                     

Method PathHTTP Method TypeDescriptionLink to Definition
/operators/{id}GET

Retrieve the details of a specific Operator.

Retrieve the Details of an Operator
/operators/GET

Retrieve a list of all Operators supported in the Unified Ad Server.

You can apply supported dimensions, filters and sorting options by macro service to retrieve a list of macros with a specific set of details as needed.

Retrieve a List of Operators

Retrieve the Details of an Operator

Overview

This API retrieves the details of the specified Operator.

Request

           

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://api.pubmatic.com/v1/uas/operators/1

Response

                       

Parameter NameTypeDescription
nameString

Name for the Operator. The Unified Ad Server supports the following Operators:

                                                                           
OperatorNameOperator TypeDescription
1IS3Exact Match
2IS NOT3Exclusion
3IS GREATER THAN1Equivalent to >
4IS LESSER THAN1Equivalent to <
5IS NOT GREATER THAN1Equivalent to <=
6IS NOT LESSER THAN1Equivalent to >=
7IS BETWEEN1Range of a minimum and a maximum number, both inclusive
8CONTAINS2Contains a match
9DOES NOT CONTAIN2Does not contain a match
10STARTS WITH2Starts with a match
11ENDS WITH2Ends with a match
typeNumeric

Type of Operator.

                   
TypeApplicable for Key Type
1Numeric
2Text
3Numeric and Text
descriptionStringOperator description, if any

Sample Response JSON

{
    "id": 1,
    "name": "IS",
    "type": 3,
    "description": "Exact match"
}

Retrieve a List of Operators

Overview

This API retrieves a list of supported Operators. You can apply dimensions, sort and filters to apply a generic search using the Common Request Query Parameters.

Request

           

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://api.pubmatic.com/v1/uas/operators/ 

 

Response

                       

Parameter NameTypeDescription
nameString

Name for the Operator. The Unified Ad Server supports the following Operators:

                                                                           
OperatorNameOperator TypeDescription
1IS3Exact Match
2IS NOT3Exclusion
3IS GREATER THAN1Equivalent to >
4IS LESSER THAN1Equivalent to <
5IS NOT GREATER THAN1Equivalent to <=
6IS NOT LESSER THAN1Equivalent to >=
7IS BETWEEN1Range of a minimum and a maximum number, both inclusive
8CONTAINS2Contains a match
9DOES NOT CONTAIN2Does not contain a match
10STARTS WITH2Starts with a match
11ENDS WITH2Ends with a match
typeNumeric

Type of Operator.

                   
TypeApplicable for Key Type
1Numeric
2Text
3Numeric and Text
descriptionStringOperator description, if any

Sample Response JSON

For a filtered request for results that match Operator Id "1":

    


{
  "metaData": {
    "startIndex": 1,
    "totalRecords": 11,
    "pageNumber": 1,
    "endIndex": 11,
    "pageSize": 100
  },
  "items": [
    {
      "id": 1,
      "name": "IS",
      "type": 3,
      "description": "Extact match"
    },
    {
      "id": 2,
      "name": "IS NOT",
      "type": 3,
      "description": "Exclusion"
    },
    {
      "id": 3,
      "name": "IS GREATER THAN",
      "type": 1,
      "description": "Equivalent to \">\""
    },
    {
      "id": 4,
      "name": "IS LESSER THAN",
      "type": 1,
      "description": "Equivalent to \"<\""
    },
    {
      "id": 5,
      "name": "IS NOT GREATER THAN",
      "type": 1,
      "description": "Equivalent to \"<=\""
    },
    {
      "id": 6,
      "name": "IS NOT LESSER THAN",
      "type": 1,
      "description": "Equivalent to \">=\""
    },
    {
      "id": 7,
      "name": "IS BETWEEN",
      "type": 1,
      "description": "Range of a minimum and a maximum number, both inclusive."
    },
    {
      "id": 8,
      "name": "CONTAINS",
      "type": 2,
      "description": "Contains a match"
    },
    {
      "id": 9,
      "name": "DOES NOT CONTAIN",
      "type": 2,
      "description": "Does not contain a match"
    },
    {
      "id": 10,
      "name": "STARTS WITH",
      "type": 2,
      "description": "Starts with a match"
    },
    {
      "id": 11,
      "name": "ENDS WITH",
      "type": 2,
      "description": "Ends with a match"
    }
  ]
}
Error Codes for Frequency Cap Period 

             

Sr. NoError CodesDescription
1MISSING_OR_INVALID_PARAMETERDetails were requested for an Operator with an 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