Domain Management API Methods domain-management-api-methods

Domain management methods that let you create and manage the domains to which you want to send data (for cookie destinations only).

Create a New Domain create-new-domain

A POST method that lets you create a new domain for (cookie destinations only).

Request

POST https://api.demdex.com/v1/partner-sites/

Sample Request

{
   "url":"example1.com"
}

Response

A successful response returns 201 created and the partner site, including its unique ID.

{
    "pid": 1111,
    "siteId": 111,
    "url": "example1.com"
}

Delete a Domain delete-domain

A DELETE method that lets you remove a domain (for cookie destinations only).

Request

DELETE https://api.demdex.com/v1/partner-sites/<site-Id>

Response

A successful response returns 204 no content. Returns 404 not found if the partner site cannot be found.

Return Properties for a Domain return-props-domain

A GET method that returns details about the specified domain (for cookie destinations only).

Request

GET https://api.demdex.com/v1/partner-sites/<siteId>

Response

A successful response returns 200 OK and data as shown in the sample below. Returns 404 Not found if the site ID or partner is not found.

{
    "pid": 1111,
    "siteId": 111,
    "url": "example1.com"
}

Return Properties for all Domains return-props-all-domains

A GET method that returns information about all your domains (for cookie destinations only).

Request

GET https://api.demdex.com/v1/partner-sites/

Optional Query Parameters

You can use these optional parameters with API methods that return all properties for an object. Set these options in the request string when passing that query in to the API. See Optional Parameters.

Parameter
Description
page
Returns results by page number. Numbering starts at 0.
pageSize
Sets the number of response results returned by the request (10 is default).
sortBy
Sorts and returns results according to the specified JSON property.
descending
Sorts and returns results in descending order. Ascending is default.
search

Returns results based on the specified string you want to use as a search parameter. For example, let's say you want to find results for all models that have the word "Test" in any of the value fields for that item. Your sample request could look like this:

`GET` `https://api.demdex.com/v1/models/?search=Test`.

You can search on any value returned by a "get all" method.

Response

A successful response returns 200 OK and data in an array as shown in the sample below. Returns 404 Not found if the site ID or partner is not found.

[
    {
        "pid": 1111,
        "siteId": 111,
        "url": "example1.com"
    },
    {
        "pid": 2222,
        "siteId": 222,
        "url": "example2.com"
    },
    {
        "pid": 3333,
        "siteId": 333,
        "url": "example3.com"
    }
]
recommendation-more-help
de293fbf-b489-49b0-8daa-51ed303af695