Home
Version 3
Shared Domains API

Shared Domains API

List all Shared Domains

GET /v2/shared_domains

Request

Route

GET /v2/shared_domains

Parameters

Name Description Valid Values Example Values
q Parameters used to filter the result set.
Format queries as <filter><op><value>
Valid ops: : >= <= < > IN
Valid filters: name
  • q=filter:value
  • q=filter>value
  • q=filter IN a,b,c
page Page of results to fetch
results-per-page Number of results per page
order-direction Order of the results: asc (default) or desc
inline-relations-depth 0 - don't inline any relations and return URLs. Otherwise, inline to depth N.
orphan-relations 0 - de-duplicate object entries in response
exclude-relations comma-delimited list of relations to drop from response
include-relations comma-delimited list of the only relations to include in response

Body

Name Description Default Valid Values Example Values
guid The guid of the domain.
name The name of the domain.
  • example.com
  • foo.example.com

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OCIsImVtYWlsIjoiZW1haWwtMjA4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMDl9.EeP70PsDS8PdAShG_cMCgK6i4TA_WQiLg7ofjNl3EfA
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/shared_domains" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OCIsImVtYWlsIjoiZW1haWwtMjA4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMDl9.EeP70PsDS8PdAShG_cMCgK6i4TA_WQiLg7ofjNl3EfA" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "total_results": 5,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "1cad2f80-74fb-4b4d-8365-33bd38c5798c",
        "url": "/v2/shared_domains/1cad2f80-74fb-4b4d-8365-33bd38c5798c",
        "created_at": "2015-08-06T00:36:47Z",
        "updated_at": null
      },
      "entity": {
        "name": "customer-app-domain1.com"
      }
    },
    {
      "metadata": {
        "guid": "9e21ab6d-edbb-49eb-8020-65de690039af",
        "url": "/v2/shared_domains/9e21ab6d-edbb-49eb-8020-65de690039af",
        "created_at": "2015-08-06T00:36:47Z",
        "updated_at": null
      },
      "entity": {
        "name": "customer-app-domain2.com"
      }
    },
    {
      "metadata": {
        "guid": "263e1e0b-bd15-4d27-8c8d-c41f3830ad49",
        "url": "/v2/shared_domains/263e1e0b-bd15-4d27-8c8d-c41f3830ad49",
        "created_at": "2015-08-06T00:36:49Z",
        "updated_at": null
      },
      "entity": {
        "name": "domain-15.example.com"
      }
    },
    {
      "metadata": {
        "guid": "594dad04-6a2a-4988-be72-4872d43a2ca1",
        "url": "/v2/shared_domains/594dad04-6a2a-4988-be72-4872d43a2ca1",
        "created_at": "2015-08-06T00:36:49Z",
        "updated_at": null
      },
      "entity": {
        "name": "domain-16.example.com"
      }
    },
    {
      "metadata": {
        "guid": "1fcad944-ab91-4960-b21d-22bfe0ea3934",
        "url": "/v2/shared_domains/1fcad944-ab91-4960-b21d-22bfe0ea3934",
        "created_at": "2015-08-06T00:36:49Z",
        "updated_at": null
      },
      "entity": {
        "name": "domain-17.example.com"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: a69a6713-c871-4a3f-be35-868af6b0bb46
Content-Length: 1666
X-Content-Type-Options: nosniff