Home
Version 3
Domains (deprecated) API

Domains (deprecated) API

List all Domains (deprecated)

GET /v2/domains

Fields

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.

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, space_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.

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwNiIsImVtYWlsIjoiZW1haWwtMjMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNTJ9.Rm7IwTIn_UmG47FvLhY2sQo2K1Ebv1z2_fznsteHcTI
Host: example.org
Cookie: 

Route

GET /v2/domains

cURL

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

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 88e0d620-a64b-4532-a562-426b6465cf50
X-Cf-Warnings: Endpoint+deprecated
Content-Length: 1583
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "total_results": 4,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "63706107-17bf-44b0-9ab0-8a3bdd852f23",
        "url": "/v2/domains/63706107-17bf-44b0-9ab0-8a3bdd852f23",
        "created_at": "2014-11-05T01:02:30+00:00",
        "updated_at": null
      },
      "entity": {
        "name": "customer-app-domain1.com"
      }
    },
    {
      "metadata": {
        "guid": "d5f8600e-2b15-4cc9-9803-033dcd105cb2",
        "url": "/v2/domains/d5f8600e-2b15-4cc9-9803-033dcd105cb2",
        "created_at": "2014-11-05T01:02:30+00:00",
        "updated_at": null
      },
      "entity": {
        "name": "customer-app-domain2.com"
      }
    },
    {
      "metadata": {
        "guid": "5cd4738c-ff0c-4456-b22b-04c8dc24426a",
        "url": "/v2/domains/5cd4738c-ff0c-4456-b22b-04c8dc24426a",
        "created_at": "2014-11-05T01:02:30+00:00",
        "updated_at": null
      },
      "entity": {
        "name": "vcap.me",
        "owning_organization_guid": "e826fefe-e65b-4976-b0c9-9be4c6859b12",
        "owning_organization_url": "/v2/organizations/e826fefe-e65b-4976-b0c9-9be4c6859b12",
        "spaces_url": "/v2/domains/5cd4738c-ff0c-4456-b22b-04c8dc24426a/spaces"
      }
    },
    {
      "metadata": {
        "guid": "033a2f1c-6952-4256-9f50-c2db239f0421",
        "url": "/v2/domains/033a2f1c-6952-4256-9f50-c2db239f0421",
        "created_at": "2014-11-05T01:02:32+00:00",
        "updated_at": null
      },
      "entity": {
        "name": "domain-53.example.com"
      }
    }
  ]
}