Organisation APIs

Get Organisation Domain list

OVERVIEW

Overview

Get an list of domains for an organisation from Publisher.  This API call is used to retrieve a list of domains for an organisation from the system. 

Since v5.0

HTTP Request

GET  /api/2/organisations/<ID>/domains?{parameters}

 

URL Parameters
Parameter Description
ID The ID of the organisation to get the domain from
DOMAIN The domain name to be retrieved
DOMAINID The domain ID to be retrieved

 

URL Query Parameters
HTTP Request Header Description Example
search String Will search organisation domain name fields for a matching string
status  String

Filter results for the following statuses:  active | archive | pending

GET /api/2/organisations/{orgid}/domains?status=active

This returns all active domains for this organisation

sort String

Allow ascending and descending sorting of a single field.

GET /api/2/organisations/{orgid}/domains?sort=-created

This returns a list of organisation domains sorted by descending created date.

possible fields: created, status, url

limit String

Limits the number of organisation domains returned.

GET /api/2/organisations/{orgid}/domains?offset=10&limit=5

Default: 200

offset String

Allows paging of organisation domain.

GET /api/2/organisations/{orgid}/domains?offset=10&limit=5

Default: 0

HTTP Request Object

Domain object list, either in JSON or XML format.

 

HTTP Headers
HTTP Request Header Description Example
Authorization The API Authorisation token "Bearer XXXXXXXXXXXXX"
Accept

The format of the expected response

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the default response given.

"application/xml"
Content-Type

The format of the provided content

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the expected content by default.

"application/json"

 

HTTP Response

Success

HTTP response 200

(Example below)

 

Error

See API Error messages

 

Example HTTP Request & Response

Get all domains for the organisation with ID == 5, where the domain contains the string "highq" and where the domain status is active or pending

GET http://example.com/context/api/2/organisations/5/domains?search=highq&status=active,pending

 

JSON Response

{

    "totalcount": 8,

    "total": 3,

    "currentpage": 0,

    "domains": [

        {

            "id": 1,

            "url": "highq.com",

            "status": "Active"

        },

        {

            "id": 177,

            "url": "highqsolutions.com",

            "status": "Active"

        },

        {

            "id": 10254,

            "url": "highq33.com",

            "status": "Pending"

        }

    ]

}

 

 

Comments


0 Comments

Last Updated: Nov 08,2024