URL Domains API

URL Domains API

URL Domain Attributes

id

integer

The id of the URL domain

domain

string

The domain

ssl

boolean

Whether this URL domain uses SSL.

Get a List of URL Domains

Get a list of the basic details of all URL domains available to user’s organization.

URL

GET /ga/api/v2/url_domains

Request Parameters

The following parameters may be included as part of the query string:

domain

string

Get a list of URL domains with this exact, case-insensitive domain.

domain_contains

string

Get a list of URL domains whose domain contains this case-insensitive string.

order_by

string

Specify a URL domain field to sort the results by.
Can be domain or id.
domain will be ordered case-insensitively.

Defaults to id.

Response

The response will be a JSON array where each element contains the “URL Domain Attributes” above.

This endpoint returns paginated records with a default page size of 2000.

Example

Note that the JSON response will not be “pretty formatted” as it is below.

GET /ga/api/v2/url_domains
HTTP/1.1 200 OK
{
  "success": true,
  "data": [
    {
      "domain": "example.com",
      "id": 1,
      "ssl": false
    },
    {
      "domain": "www.urldomain.com",
      "id": 23,
      "ssl": false
    }
  ],
  "error_code": null,
  "error_message": null,
  "page": 0,
  "per_page": 2000,
  "num_records": 2,
  "num_pages": 1
}

Get a Single URL Domain

Get all the basic details of a single URL domain.

URL

GET /ga/api/v2/url_domains/:id

Request Parameters

This API method does not require any additional parameters.

Response

The response will be a JSON object containing the “URL Domain Attributes” above.

Example

Note that the JSON response will not be “pretty formatted” as it is below.

GET /ga/api/v2/url_domains/25
HTTP/1.1 200 OK
{
  "success": true,
  "data": {
    "domain": "www.urldomain.com",
    "id": 25,
    "ssl": false
  },
  "error_code": null,
  "error_message": null
}