Skip to main content
Skip table of contents

Alli Data API

Using the API

In order to use the API, you will need an API client such as Postman or Restlet for Chrome.

Postman API Endpoint: Datawarehouse_categorization.postman_collection.json

All urls for the endpoints below with start with https://data.alliplatform.com 

Authentication

Following the update to v2, the API is able to support the use of Alli Central access tokens for authentication.

This is documentation for the official way for individual users to get their tokens; This is for “Machine” credential tokens for applications to use. The v2 access tokens can also be obtained by going to your Central user profile (https://central.alliplatform.com/me) and using the browser's developer tools to view the request details for the /me request.

Previously, the API access tokens for v1 were provided by a member of the Alli Data team or by one of the other members of the engineering team. Although v1 tokens will no longer be issued, they will continue to work with the API. 

Once you have your API token, send it as the bearer authentication header in your API request. Authorization: Bearer [API CODE]


User Access

CODE
GET /api/:version/user/

Shows the user information and the available projects for that user

:version is the api version (v1 or v2)


Response Body

CODE
{  
	"email": "chris.alvares@pmg.co",  
	"name": "Chris Alvares",  	
	"projects": [    
		{      
			"name": "testclient",      
			"_id": "53853c06f0c78f1c5c3c0cea",      
			"createdAt": "2014-05-28T01:29:42.355Z"    
		},    
		{      
			"name": "jcrew",      
			"_id": "53860873867e1e1b128d6aac",      
			"createdAt": "2014-05-28T16:01:55.536Z"    
		},    
		{      
			"_id": "53d7cbeec0956756102d16cd",      
			"name": "travelocity",      
			"createdAt": "2014-07-29T16:29:34.031Z"    
		}  
	]
}


Listing DatasourceViews

CODE
GET /api/:version/viewlist/:client

Shows all DatasourceView names and their definitions for the supplied :client.

DatasourceViews will be sorted by name.



Response Body

CODE
[
   {
      "name":"clientname__dailytracker",
      "definition":"select * from clientname__ga;",
      "databaseType":"Redshift"
   },
   {
      "name":"clientname__datespend",
      "definition":"select date, sum(spend) from clientname__source group by date;",
      "databaseType":"all"
   }
]


Listing Datasources and DatasourceViews - Relations

CODE
GET /api/:version/relations

Shows all Datasources and DatasourceViews that a user has access to.



Response Body

Click here to expand...


CODE
[
   {
      "id":"57ace427c97d8be3422225eb",
      "name":"test__datasource",
      "schema":{
         "columns":[
            {
               "name":"one",
               "type":"String"
            },
            {
               "name":"two",
               "type":"String"
            }
         ],
         "indexes":[
            {
               "name":"index_0",
               "columns":[
                  "one"
               ],
               "type":"primary"
            }
         ]
      },
      "type":"Datasource"
   },
   {
      "id":"589b984ce63eeb057c708461",
      "name":"test__datasourceview",
      "schema":null,
      "type":"DatasourceView"
   }
]





Retrieving Data from a Relation

CODE
GET /api/:version/relations/stream/:entityid?type=:type

Returns csv data of the Datasource or DatasourceView.

:entityid is the id of the Datasource or DatasourceView.

:type is the type of the relation. It must be either Datasource or DatasourceView.

The response will have a header set describing the columns in the response body csv:

CODE
X-API-Meta -> {"columnTypes":["String","String"]}



Response Body

CODE
a,b1234,41325,-9898797






Fetching Datasources For a Project

CODE
GET /api/:version/project/:projectid/datasources
GET /api/:version/project/:projectid/datasources?limit=:limit&cursor=:cursor
  • Retrieves datasources for a project (client) which the API user has access.

  • Ordered starting from most recently created datasources

:projectid is the id of the project(client) to retrieve the datasources for.

:limit is the maximum number of datasources to retrieve.

  • OPTIONAL

  • 1 <= limit <= 25

  • defaults to 10 if no limit is selected

  • defaults to 25 if the limit selected is larger than 25

:cursor is the timestamp of the last retrieved datasource.

  • OPTIONAL

  • defaults to the current time if no cursor is selected

Requires an Origin header.

Response Body

Click here to expand...

CODE
{
    "status": "Success",
    "datasources": [
        {
            "projectId": "6026d98e3081300006b57d58",
            "name": "testallicloud",
            "id": "633348bc98aae3000a7dece3",
            "parentDatasource": null,
            "createdBy": {
                "id": "5d01476b-a84c-4901-8254-dc3726473d30",
                "email": "examplr@pmg.com"
            },
            "createdAt": "2022-09-27T19:02:20.479Z",
            "sourceSchema": "{\"columns\":[],\"indexes\":[]}",
            "sourceSchedule": 1,
            "sourceStatus": 1,
            "sourceType": "alliclientfile",
            "tags": [
                ""
            ]
        },
        {
            "projectId": "6026d98e3081300006b57d58",
            "name": "tests3",
            "id": "633348aa24ec7a00094c27ba",
            "parentDatasource": null,
            "createdBy": {
                "id": "5d01476b-a84c-4901-8254-dc3726473d30",
                "email": "example@pmg.com"
            },
            "createdAt": "2022-09-27T19:02:02.120Z",
            "sourceSchema": "{\"columns\":[],\"indexes\":[]}",
            "sourceSchedule": 1,
            "sourceStatus": 1,
            "sourceType": "S3_advanced",
            "tags": [
                ""
            ]
        }
    ],
    "paging": {
        "cursors": {
            "after": 1664305322120,
            "before": 1664983506771
        },
        "next": "https://data.alliplatform.com/api/v2/project/6026d98e3081300006b57d58/datasources?limit=2&cursor=1664305322120"
    },
    "url": "https://data.allistaging.com/api/v2/project/6026d98e3081300006b57d58/datasources?limit=2&cursor=1664983506771"
}

Fetching a Single Datasource

CODE
GET /api/:version/datasource/:datasourceid/fetch

Retrieves a single datasource to which the API user has access.

:datasourceid is the id of the Datasource to retrieve.



Response Body

Click here to expand...


CODE
{    
	"status": "Success",    
	"url": "http://localhost:8080/datasource/5af32b196cd255b730350064/facebookads", 
	"datasource": {        
		"projectId": "57c8941ac8c4084fd0a4ece4",        
		"name": "facebook_ads_test",        
		"id": "5af32b196cd255b730350064",        
		"parentDatasource": null,        
		"createdBy": "57c8925813bbaf0bd0465b97",        
		"createdAt": "2018-05-09T17:08:41.188Z",        
		"sourceSchema": {            
			"columns": [{                    
					"name": "date_start",                    
					"type": "Date"                
				},                
				{                    
					"name": "date_stop",                    
					"type": "Date"                
				},                
				{                    
					"name": "account_id",                    
					"type": "String"                
				},                
					...            
			],            
			"indexes": [{                    
					"name": "Index1",                    
					"type": "primary",                    
					"columns": [                        
						"date_start",                        
						"date_stop",                        
						"account_id",                        
						...                    
					]                
				}            	
			]        
		},        
		"sourceSchedule": 1,        
		"sourceStatus": 0,        
		"sourceType": "facebookads",        
		"tags": [""]    
	}
}




Delete Datasource data by date range

CODE
POST /api/:version/datasource/:datasourceid/delete

Delete datasource

:datasourceid is the id of the Datasource to delete.

Date format is - mm/dd/yyy

Required fields:

 startdate,enddate

Request Body

Click here to expand...

CODE
{    
	"startdate": "08/10/2023",
	"enddate": "09/10/2023"
}

Fetching a Single DatasourceView

CODE
GET /api/:version/datasourceview/:datasourceviewid/fetch

Retrieves a single datasource view to which the API user has access.

:datasourceviewid is the id of the DatasourceView to retrieve.



Response Body

Click here to expand...


CODE
{    
	"status": "Success",    
	"url": "http://localhost:8080/datasource/5af32b196cd255b730350064/facebookads",
	"datasourceView": {        
		"projectId": "57c8941ac8c4084fd0a4ece4",        
		"name": "facebook_ads_test",        
		"id": "5af32b196cd255b730350064",        
		"createdBy": "57c8925813bbaf0bd0465b97",        
		"createdAt": "2018-05-09T17:08:41.188Z",        
		"viewSchema": {            
			"columns": [{                    
					"name": "date_start",                    
					"type": "Date"                
				},                
				{                    
					"name": "date_stop",                    
					"type": "Date"                
				},                
				{                    
					"name": "account_id",                    
					"type": "String"                
				},                
				...            
			],            
			"indexes": [{                    
					"name": "Index1",                    
					"type": "primary",                    
					"columns": [                        
						"date_start",                        
						"date_stop",                        
						"account_id",                        			
						...                    
					]                
				}            
			]        
		},        
		"queryRedshift": "",        
		"queryPostgres": "",        
		"queryMySql": "",        
		"query": "",        
		"report": {            
			"dimensions": [],            
			"metrics": [],            
			"filters": [],            
			"datasources": []        
		},        
		"description": "test description"    
	}
}



Datasource Run Information

CODE
GET /api/:version/project/:projectid/datasources/runinfo?date=YYYY-MM-DD&limit=:limit&page=:page

Gets the run information for a project’s datasources

Required:

:version is the api version (v1 or v2).

:projectid is the id of the project to access.

Query String Parameter(s):

date is the day to get data for.

  • OPTIONAL

  • defaults to today if no date is selected

:limit is the maximum number of datasources to retrieve.

  • OPTIONAL

  • 1 <= limit <= 25

  • defaults to 10 if no limit is selected

  • defaults to 25 if the limit selected is larger than 25

:page is the page number of datasources to retrieve.

  • OPTIONAL

  • 0 <= page <= infinity

  • defaults to first page if no page is selected

Response Body

CODE
{
    "status": "Success",
    "datasourcesRunInfo": [
        {
            "_id": "24efhg",
            "tags": [
                ""
            ],
            "sourceType": "googleads",
            "sourceStatus": 1,
            "sourceSchedule": 1,
            "parentDatasource": null,
            "uploadStyle": 0,
            "project": {
                "timezone": "America/Chicago",
                "_id": "rcytvuybi3",
                "centralId": "3g3g2-3gv-2g53",
                "name": "acme",
                "createdAt": "2020-03-16T19:25:04.505Z"
            },
            "name": "evan_testing_googleads_insights_ad",
            "description": "",
            "createdBy": {
                "email": "evan@pmg.com"
            },
            "createdAt": "2021-12-15T21:52:20.491Z",
            "successMessages": [
                {
                    "_id": "3nirp03t",
                    "name": "Data Loaded",
                    "message": "Data Loaded Successfully with 0 errors and 1 rows inserted",
                    "successType": "datasource",
                    "successId": "24efhg",
                    "rowsSuccessful": 1,
                    "rowsErrored": 0,
                    "rowsWarned": 0,
                    "startDate": "2023-03-08T12:58:02.963Z",
                    "dateOccured": "2023-03-08T12:58:03.283Z"
                }
            ],
            "errorMessages": [
                {
                    "_id": "0nigr024g",
                    "name": "Google Ads Error for Account:...",
                    "message": "\"Error: unauthorized_client\"",
                    "errorType": "datasource",
                    "errorId": "24efhg",
                    "errorPriority": 30,
                    "dateOccured": "2023-03-08T12:58:03.283Z"
                }
            ]
        },
    ]
}

Programmatically executing a datasource

CODE
GET /api/:version/datasource/:datasourceid/sync
GET /api/v1/datasource/:datasourceid/sync?startdate=YYYY-MM-DD&enddate=YYYY-MM-DD

Automatically starts a datasource job within 5 minutes of execution. The 5 minute

period is to ensure jobs are not called multiple times within a 5 minute window.

If the api is called multiple times, the 5 minute timer restarts.



Response Body

CODE
{  
	"success":true,  
	"jobStartsAt": "Wed Feb 22 2017 22:42:52 GMT-0600 (CST)"
}


Creating a Datasource

CODE
POST /api/:version/project/:projectid/datasource/create

This endpoint will create a new datasource with the parameters included in the

request body.

Requirements:

The request body must include a name for the new datasource, and a sourceType that designates the type of datasource to create. Without a sourceType, the created datasource will default to a manual upload.

the sourceType might be a number for older datasources

Optional:

additionalConfiguration object will populate the Additional Configuration Needed section of the created datasource. This object will vary by the created datasource type.

sourceSchema object will add dimensions and metrics to the created datasource in addition to indexes.

sourceStatus integer determines whether the datasource is Inactive (0), Active (1) or Archived (2).

tags array will add tags to the created datasource.



Request and Response Body

Request Body


CODE
{  
   "name":"facebook_ads_api_test",
   "sourceType":"facebookads",
   "additionalConfiguration":{  
      "advertiserId":"10154621351617439"
   },
   "sourceSchema":{  
      "columns":[  
         {  
            "name":"TimePeriod",
            "type":"Date"
         },
         ...
      ],
      "indexes":[  
         {  
            "name":"Index1",
            "type":"primary",
            "columns":[  
               "TimePeriod",
               ...
            ]
         }
      ]
   }
}


Response Body
CODE
{
   	"status":"Success",
	"url":"http://localhost:8080/datasource/5af9fae2532369163c1f94	
		70/facebookads",
	"datasource":{
    "name":"facebook_ads_api_test",
    "id":"5af9fae2532369163c1f9470",
    "parentDatasource":null,
    "createdBy":"57c8925813bbaf0bd0465b97",
    "createdAt":"2018-05-14T21:08:50.556Z",
    "sourceSchema":"{\"columns\":[{\"name\":\"TimePeriod\",\"type\":\"Date\"}],\"indexes\":[{\"name\":\"Index1\",\"type\":\"primary\",\"columns\":[\"TimePeriod\"]}]}",
    "sourceSchedule":1,
    "sourceStatus":1,
    "sourceType":"facebookads",  
    "tags":[]
   	}
}



Editing a Datasource

CODE
PATCH /api/:version/datasource/:datasourceid/edit

This endpoint will edit an existing datasource with the properties to be updated included in the request body.

Properties able to be updated:

  • tags

  • description

  • sourceStatus

  • sourceSchedule

  • sourceSchema

  • createdBy - only for Machine credentials

Request Body

CODE
{
    "tags": ["updated_tag_4"],
    "description": "updated description"
}

Response Body

CODE
{
    "status": "Success",
    "datasource": {
        "id": "632e126f12f9a500087d032d",
        "tableName": "test_restrictions_bing",
        "schemaName": "testing",
        "projectId": "61a94f3e2de4d200080d43f3",
        "name": "test_restrictions_bing",
        "tags": [
            "updated_tag_4"
        ],
        "sourceType": "bing",
        "sourceSchema": {
            "columns": [
                {
                    "name": "TimePeriod",
                    "type": "String"
                },
                {
                    "name": "DeviceOS",
                    "type": "String"
                },
                {
                    "name": "CustomerName",
                    "type": "String"
                },
                {
                    "name": "AllConversions",
                    "type": "Number"
                },
                {
                    "name": "AllRevenue",
                    "type": "Number"
                },
                {
                    "name": "Assists",
                    "type": "Number"
                }
            ],
            "indexes": [
                {
                    "name": "Index1",
                    "type": "primary",
                    "columns": [
                        "TimePeriod",
                        "DeviceOS",
                        "CustomerName"
                    ]
                }
            ]
        },
        "createdAt": "2022-09-23T20:09:19.127Z",
        "parentDatasource": null,
        "columnValidations": {},
        "uploadStyle": 0,
        "createdBy": {
            "id": "5e27cd15-5757-493a-8758-db90e5701687",
            "email": "alicia.zavala@pmg.com"
        },
        "clientId": "3de0c863-85b4-4492-b12d-37b2a124c99a"
    }
}

Creating a DatasourceView

CODE
POST /api/:version/project/:projectid/datasourceview/create

This endpoint will create a new datasource view with the parameters included in the

request body.

Requirements:

The request body must include a name for the new datasourceview.

Optional:

report object will populate the dimensions, metrics, datasources and filters applied in the report.

description of the datasource.

isPublished 0 if not published and 1 otherwise.



Request and Response Body

Request Body


CODE
{
   "name":"bing_ads_api_test",
   "report":{
      "dimensions":[
         {
            "standardizedname":"",
            "datasourcename":"bing",
            "alias":"TimePeriod",
            "column":"TimePeriod",
            "name":"TimePeriod",
            "datasource":"5abd3626764c18bd12590f28"
         }         ...
      ],
      "metrics":[
         {
            "standardizedname":"",
            "datasourcename":"bing",
            "alias":"Clicks",
            "column":"Clicks",
            "name":"Clicks",
            "datasource":"5abd3626764c18bd12590f28"
         }         ...
      ],
      "datasources":[
         "5abd3626764c18bd12590f28"
      ],
      "filters":[

      ],
      "description":""
   }
}



Response Body


CODE
{
   "status":"Success",
   "url":"http://localhost:8080/datasourceview/5afc8813dfab1b3994f48799",
   "datasourceview":{
      "project":"57c8941ac8c4084fd0a4ece4",
      "name":"bing_ads_api_test",
      "id":"5afc8813dfab1b3994f48799",
      "publishedQuery":"",
      "createdBy":"57c8925813bbaf0bd0465b97",
      "createdAt":"2018-05-16T19:35:47.509Z",
      "isPublished":0,
      "databaseType":"",
      "queryRedshift":"",
      "queryPostgres":"",
      "queryMySql":"",
      "query":"",
      "report":{
         "dimensions":[
            {
               "standardizedname":"",
               "datasourcename":"bing",
               "alias":"TimePeriod",
               "column":"TimePeriod",
               "name":"TimePeriod",
               "datasource":"5abd3626764c18bd12590f28"
            }
         ],
         "metrics":[
            {
               "standardizedname":"",
               "datasourcename":"bing",
               "alias":"Clicks",
               "column":"Clicks",
               "name":"Clicks",
               "datasource":"5abd3626764c18bd12590f28"
            }
         ],
         "datasources":[
            "5abd3626764c18bd12590f28"
         ],
         "filters":[

         ]
      },
      "viewSchema":{
         "columns":[

         ],
         "indexes":[

         ]
      },
      "description":""
   }
}



List Categorizations

CODE
GET /api/:version/project/:projectid/categorizations/list

This endpoint will list the categorizations for a projectid.

:projectid is the id of the project Id for the categorizations.

Response Body

Response Body


CODE
[
    {
        "id": "5e6036f0faee7d0289fb78ac",
        "project": "5b6ca65deda308134ed7e043",
        "name": "channel",
        "state": 1,
        "description": "test",
        "isPublished": 1,
        "createdAt": "2020-03-04T23:17:04.036Z",
        "inputFields": [
            {
                "name": "campaignName",
                "delimiter": "~"
            },
            {
                "name": "defaultValue",
                "delimiter": ""
            }
        ],
        "rules": [
            {
                "where": {
                    "field": "campaignName:0",
                    "operator": "ilike",
                    "value": "_pr_",
                    "substatementType": "and",
                    "substatements": [
                        {
                            "field": "campaignName:1",
                            "operator": "ilike",
                            "value": "er"
                        }
                    ]
                },
                "value": "Social"
            },
            {
                "where": {
                    "substatements": [],
                    "substatementType": "and",
                    "field": "campaignName",
                    "operator": "ilike",
                    "value": "fb%"
                },
                "value": "defaultValue"
            }
        ],
        "defaultValue": "campaignName:0"
    }
]




Get a Single Categorization

CODE
GET /api/:version/categorization/:categorizationid/get

Gets a single categorization object

:categorizationid is the id of the categorization to access.

Response Body

Response Body


CODE
{
    "id": "5e6036f0faee7d0289fb78ac",
    "project": "5b6ca65deda308134ed7e043",
    "name": "channel",
    "state": 1,
    "description": "test",
    "isPublished": 1,
    "createdAt": "2020-03-04T23:17:04.036Z",
    "inputFields": [
        {
            "name": "campaignName",
            "delimiter": "~"
        },
        {
            "name": "defaultValue",
            "delimiter": ""
        }
    ],
    "rules": [
        {
            "where": {
                "field": "campaignName:0",
                "operator": "ilike",
                "value": "_pr_",
                "substatementType": "and",
                "substatements": [
                    {
                        "field": "campaignName:1",
                        "operator": "ilike",
                        "value": "er"
                    }
                ]
            },
            "value": "Social"
        },
        {
            "where": {
                "substatements": [],
                "substatementType": "and",
                "field": "campaignName",
                "operator": "ilike",
                "value": "fb%"
            },
            "value": "defaultValue"
        }
    ],
    "defaultValue": "campaignName:0"
}



Add a Categorization

CODE
POST /api/:version/project/:projectid/categorizations/add

Adds a categorization to a project


Required:

name name of the categorization.

Optional:

description of the categorization.

inputFields array of the fields listed in a categorization.

rules array of rules for a categorization. each rule has a

  1. where - contains a field, operator, value, sub statement type (currently only supports "and") and sub statements which can contain more field, operator and value types.

  2. value - the value at which to assign the categorization rule 

Operator Types
Operators support: 

Operator

Description

=

equals

ilike

contains

!=

not equals

>

greater than

<

less than

>=

greater than or equal to

<=

less than or equal to

!ilike

does not contain

like

contains case sensitive

!like

does not contain case sensitive



Request and Response Body

Request Body


CODE
{
    "name": "channel",
    "description": "This is the description",
    "inputFields": [
        {
            "name": "campaignName",
            "delimiter": "~"
        },
        {
            "name": "adgroupName",
            "delimiter": ""
        }
    ],
    "rules": [
        {
            "where": {
                "field": "campaignName:0",
                "operator": "ilike",
                "value": "_pr_",
                "substatementType": "and",
                "substatements": [
                    {
                        "field": "campaignName:1",
                        "operator": "ilike",
                        "value": "er"
                    }
                ]
            },
            "value": "Social"
        },
        {
            "where": {
                "field": "campaignName",
                "operator": "ilike",
                "value": "fb%",
                "substatements": [],
                "substatementType": "and"
            },
            "value": "defaultValue",
        }
    ],
    "defaultValue": "adgroupName:1"
}



Response Body


CODE
{
    "id": "5e6036f0faee7d0289fb78ac",
    "project": "5b6ca65deda308134ed7e043",
    "name": "channel",
    "state": 1,
    "description": "test",
    "isPublished": 1,
    "createdAt": "2020-03-04T23:17:04.036Z",
    "inputFields": [
        {
            "name": "campaignName",
            "delimiter": "~"
        },
        {
            "name": "adgroupName",
            "delimiter": ""
        }
    ],
    "rules": [
        {
            "where": {
                "field": "campaignName:0",
                "operator": "ilike",
                "value": "_pr_",
                "substatementType": "and",
                "substatements": [
                    {
                        "field": "campaignName:1",
                        "operator": "ilike",
                        "value": "er"
                    }
                ]
            },
            "value": "Social"
        },
        {
            "where": {
                "substatements": [],
                "substatementType": "and",
                "field": "campaignName",
                "operator": "ilike",
                "value": "fb%"
            },
            "value": "adgroupName"
        }
    ],
    "defaultValue": "adgroupName:1"
}



Edit a Categorization

CODE
POST /api/:version/categorization/:categorizationid/edit

Edits an existing categorization.

Optional:

description of the categorization.

inputFields array of the fields listed in a categorization.

rules array of rules for a categorization. each rule has a

  1. where - contains a field, operator, value, sub statement type (currently only supports "and") and sub statements which can contain more field, operator and value types.

  2. value - the value at which to assign the categorization rule 

Operator Types
Operators support: 

Operator

Description

=

equals

ilike

contains

!=

not equals

>

greater than

<

less than

>=

greater than or equal to

<=

less than or equal to

!ilike

does not contain

like

contains case sensitive

!like

does not contain case sensitive




Request and Response Body

Request Body


CODE
{
    "description": "This is the description",
    "inputFields": [
        {
            "name": "campaignName",
            "delimiter": "~"
        },
        {
            "name": "adgroupName",
            "delimiter": ""
        }
    ],
    "rules": [
        {
            "where": {
                "field": "campaignName:0",
                "operator": "ilike",
                "value": "_pr_",
                "substatementType": "and",
                "substatements": [
                    {
                        "field": "campaignName:1",
                        "operator": "ilike",
                        "value": "er"
                    }
                ]
            },
            "value": "Social"
        },
        {
            "where": {
                "field": "campaignName",
                "operator": "ilike",
                "value": "fb%",
                "substatements": [],
                "substatementType": "and"
            },
            "value": "defaultValue",
        }
    ],
    "defaultValue": "adgroupName:1"
}



Response Body


CODE
{
    "id": "5e6036f0faee7d0289fb78ac",
    "project": "5b6ca65deda308134ed7e043",
    "name": "channel",
    "state": 1,
    "description": "test",
    "isPublished": 1,
    "createdAt": "2020-03-04T23:17:04.036Z",
    "inputFields": [
        {
            "name": "campaignName",
            "delimiter": "~"
        },
        {
            "name": "adgroupName",
            "delimiter": ""
        }
    ],
    "rules": [
        {
            "where": {
                "field": "campaignName:0",
                "operator": "ilike",
                "value": "_pr_",
                "substatementType": "and",
                "substatements": [
                    {
                        "field": "campaignName:1",
                        "operator": "ilike",
                        "value": "er"
                    }
                ]
            },
            "value": "Social"
        },
        {
            "where": {
                "substatements": [],
                "substatementType": "and",
                "field": "campaignName",
                "operator": "ilike",
                "value": "fb%"
            },
            "value": "adgroupName"
        }
    ],
    "defaultValue": "adgroupName:1"
}



Publish a Categorization

CODE
POST /api/:version/categorization/:categorizationid/publish

Publishes a categorization to the database.


Response Body

Response Body


CODE
{
    "published": true
}



Delete a Categorization

CODE
POST /api/:version/categorization/:categorizationid/delete

Deletes a categorization and the database function.


Response Body

Response Body


CODE
{
    "deleted": true
}



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.