Domains (deprecated) API

List all Domains (deprecated)

GET /v2/domains

Request

Route

GET /v2/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, owning_organization_guid
  • 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
wildcard Allow routes with non-empty hosts
  • true
  • false
owning_organization_guid The organization that owns the domain. If not specified, the domain is shared.

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MSIsImVtYWlsIjoiZW1haWwtMTg1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTV9.UYh92U9gmUQ4BXTkCK3er2x6cK75gHeTWH3Al4JJn3Q
Host: example.org
Cookie: 

cURL

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

Response

Status

200 OK

Body

{
  "total_results": 4,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "fa1385de-55ba-41d3-beb2-f83919c634d6",
        "url": "/v2/shared_domains/fa1385de-55ba-41d3-beb2-f83919c634d6",
        "created_at": "2016-06-08T16:41:33Z",
        "updated_at": "2016-06-08T16:41:26Z"
      },
      "entity": {
        "name": "customer-app-domain1.com",
        "router_group_guid": null,
        "router_group_type": null
      }
    },
    {
      "metadata": {
        "guid": "ca13b618-afb1-4ba4-b322-63b226b05d53",
        "url": "/v2/shared_domains/ca13b618-afb1-4ba4-b322-63b226b05d53",
        "created_at": "2016-06-08T16:41:33Z",
        "updated_at": "2016-06-08T16:41:26Z"
      },
      "entity": {
        "name": "customer-app-domain2.com",
        "router_group_guid": null,
        "router_group_type": null
      }
    },
    {
      "metadata": {
        "guid": "ef91529f-7659-424c-96ac-68c55decb7bf",
        "url": "/v2/private_domains/ef91529f-7659-424c-96ac-68c55decb7bf",
        "created_at": "2016-06-08T16:41:33Z",
        "updated_at": "2016-06-08T16:41:26Z"
      },
      "entity": {
        "name": "vcap.me",
        "owning_organization_guid": "a7aff246-5f5b-4cf8-87d8-f316053e4a20",
        "owning_organization_url": "/v2/organizations/a7aff246-5f5b-4cf8-87d8-f316053e4a20",
        "spaces_url": "/v2/domains/ef91529f-7659-424c-96ac-68c55decb7bf/spaces"
      }
    },
    {
      "metadata": {
        "guid": "493e1582-8b12-4fea-8a5f-b0d7171b146f",
        "url": "/v2/shared_domains/493e1582-8b12-4fea-8a5f-b0d7171b146f",
        "created_at": "2016-06-08T16:41:35Z",
        "updated_at": "2016-06-08T16:41:26Z"
      },
      "entity": {
        "name": "domain-33.example.com",
        "router_group_guid": null,
        "router_group_type": null
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6a41b0c3-91bd-4a19-80fe-389ee05560e1
X-Cf-Warnings: Endpoint+deprecated
Content-Length: 1802
X-Content-Type-Options: nosniff