• Register

Domains

Resource URI

/domains

Items in curly braces represent variables.

Description

Domains control what Endpoint addresses, whether public or system, can be created. Note that your newly created Domain will be in a 'waiting' state until it is approved by Support.

Resource Schema

Property Characteristics
id Type string
Sub-type
Create Rule Ignored
Update Rule Required (if not in context)
Fetch Rule Implicit
Description Object identifier.
created Type string
Sub-type datetime
Create Rule Ignored
Update Rule Ignored
Fetch Rule Implicit
Description Date/time the object was created.
domain Type string
Sub-type
Create Rule Required
Update Rule Required
Fetch Rule Implicit
Description This field allows you to input data for a new Endpoint. Domains control what Endpoint addresses, whether public or system, can be created. Often this is a suffix and not a full domain, e.g. acme.com instead of someserver1.somehost.acme.com. Note that your newly created Domain will be in a 'waiting' state until it is approved by Support.
status Type string
Sub-type
Create Rule Ignored
Update Rule Ignored
Fetch Rule Implicit
Description Current status of this domain (active/waiting)

fetch [GET]

Retrieves collection of all Domain Whitelist objects belonging to the given Area

Parameters

Parameter Required Type Description
fields false string Comma-separated list of property paths to include in response. Each property path is a dot-separated list of object property names. fields=<property\[.property...\]>\[,...\]\[&fields=...\]
filter false string Colon-separated name/value pair specifying the name of property whose value must contain the given value (as a substring). Results may also be filtered by nested collections' properties by specifying a dot-separated property path. filter=<property\[.property...\]>:<value>\[&filter=...\]
sort false string Comma-separated list of properties to sort by. Only root-level properties are supported. Each property name may be optionally followed by :asc or :desc to specify sort direction (defaults to asc). sort=<property\[:(asc\|desc)\]>\[,...\]\[&sort=...\]
limit false int Number of objects to return in the result. Defaults to 100.
offset false int 0-based index of first object in the list to return. Defaults to 0.

Returns

Success

Array of DomainWhiteLists for the Area If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/domains' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "id": "1755f0d1-f95d-49cb-bf4a-b91ac00fb124",
        "created": "2013-11-20T03:10:21.000+0000",
        "status": "porttitor id consequat in",
        "domain": "ultricies eu nibh quisque"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/domains' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "id": "db1fbd1d-8335-4da9-8f5c-08612755c627",
        "created": "2013-09-20T07:46:39.000+0000",
        "status": "id ligula",
        "domain": "quis"
    }
]

fetch all [GET]

Retrieves the identified Domain Whitelist.

Parameters

Parameter Required Type Description
domainId true string DomainWhitelist indentifier. String like '859437e4-b778-49ee-8635-0afa5f021465'.
fields false string Comma-separated list of property paths to include in response. Each property path is a dot-separated list of object property names. fields=<property\[.property...\]>\[,...\]\[&fields=...\]
filter false string Colon-separated name/value pair specifying the name of property whose value must contain the given value (as a substring). Results may also be filtered by nested collections' properties by specifying a dot-separated property path. filter=<property\[.property...\]>:<value>\[&filter=...\]
sort false string Comma-separated list of properties to sort by. Only root-level properties are supported. Each property name may be optionally followed by :asc or :desc to specify sort direction (defaults to asc). sort=<property\[:(asc\|desc)\]>\[,...\]\[&sort=...\]
limit false int Number of objects to return in the result. Defaults to 100.
offset false int 0-based index of first object in the list to return. Defaults to 0.

Returns

Success

The identified Domain Whitelist If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/domains/{domainId}' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "id": "782b517b-ebc9-41a2-a2e7-bfdb0d7e710e",
        "created": "2014-05-12T09:02:03.000+0000",
        "status": "vel nulla",
        "domain": "libero"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/domains/{domainId}' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "id": "164057ed-b5b1-4177-b588-eadce8ecd0e5",
        "created": "2013-10-23T01:12:00.000+0000",
        "status": "pellentesque ultrices phasellus id",
        "domain": "dictumst"
    }
]

create [POST]

Creates a new Domain WhiteList in the given Area.

Parameters

Parameter Required Type Description
domainWhitelist true object DomainWhitelist object

Returns

Success

DomainWhitelist as created If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/domains' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" --request POST --data '{"id":"1ac37667-a1f2-4f35-a5a9-e141fe36299f","status":"non mauris","created":"2013-10-17T23:58:56.000+0000","domain":"in ante"}

Response

[
    {
        "id": "a74f409b-0076-4f0a-8720-16237ef62c66",
        "created": "2013-09-02T20:29:16.000+0000",
        "status": "consequat",
        "domain": "pede justo lacinia"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/domains' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" --request POST --data '{"id":"ce670ccb-b382-4e18-881a-cec9899b6d17","status":"a pede posuere nonummy","created":"2013-08-02T14:08:46.000+0000","domain":"quam sapien varius"}

Response

[
    {
        "id": "dbf93049-13fa-42ca-9438-960507dfc7d1",
        "created": "2013-11-30T09:31:42.000+0000",
        "status": "dictumst morbi",
        "domain": "ipsum praesent blandit lacinia"
    }
]

Docs Navigation