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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MSIsImVtYWlsIjoiZW1haWwtMTk4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTJ9.kIfZaVxYebE9oLOTlnP2Nvkzc3t_UD0VCT9SgHueX5A
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/shared_domains" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MSIsImVtYWlsIjoiZW1haWwtMTk4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTJ9.kIfZaVxYebE9oLOTlnP2Nvkzc3t_UD0VCT9SgHueX5A" \
	-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": "8400c3da-0aa0-4e12-a3e2-cd6bd0b5a0f5",
        "url": "/v2/shared_domains/8400c3da-0aa0-4e12-a3e2-cd6bd0b5a0f5",
        "created_at": "2015-07-06T23:23:06Z",
        "updated_at": null
      },
      "entity": {
        "name": "customer-app-domain1.com"
      }
    },
    {
      "metadata": {
        "guid": "6b0bc3cf-4224-4703-8826-1e68e6c49089",
        "url": "/v2/shared_domains/6b0bc3cf-4224-4703-8826-1e68e6c49089",
        "created_at": "2015-07-06T23:23:06Z",
        "updated_at": null
      },
      "entity": {
        "name": "customer-app-domain2.com"
      }
    },
    {
      "metadata": {
        "guid": "9fcbaf87-00b3-4fa2-a99b-ec8c842d51c3",
        "url": "/v2/shared_domains/9fcbaf87-00b3-4fa2-a99b-ec8c842d51c3",
        "created_at": "2015-07-06T23:23:12Z",
        "updated_at": null
      },
      "entity": {
        "name": "domain-22.example.com"
      }
    },
    {
      "metadata": {
        "guid": "6daf38fb-ae4c-43fa-a7c4-1e510e555faa",
        "url": "/v2/shared_domains/6daf38fb-ae4c-43fa-a7c4-1e510e555faa",
        "created_at": "2015-07-06T23:23:12Z",
        "updated_at": null
      },
      "entity": {
        "name": "domain-23.example.com"
      }
    },
    {
      "metadata": {
        "guid": "e51bd650-1172-48c1-933a-c7a792d8f065",
        "url": "/v2/shared_domains/e51bd650-1172-48c1-933a-c7a792d8f065",
        "created_at": "2015-07-06T23:23:12Z",
        "updated_at": null
      },
      "entity": {
        "name": "domain-24.example.com"
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 56fd2854-5e50-4c6f-a6f3-16750f9e012a
Content-Length: 1666
X-Content-Type-Options: nosniff