Query Available Domain Names

Query the available domain names in specific region(s).

Request URL

GET {base_url}/dm/open_api/v1/cluster/domains

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Query parameters
Parameter Required Type Description
regionIds Yes Array <Integer> The ID(s) of the desired region(s).
Note: You can query the region ID using Query Available Regions.

Response parameters

Parameter Type Description
data Array <Details> The detailed information.
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
Details
Parameter Type Description
regionId Integer The ID of the region.
domainId Integer The ID of the domain name.
domain String Domain name.

Example

Request example

Query the available domain names in region A (ID: 3) and region B (ID: 4).
GET /dm/open_api/v1/cluster/domains?regionIds=3,4 HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwidmVyc2lvbiI6MTY2Mzc0MTEyNSwicmVmcmVzaFZlcnNpb24iOjE2NjQyNzU2MjV9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0Mjc3NDI1LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiIyM2QyOTk1ZS02ODhkLTRmYWEtYTM5Zi1hNGJlMzNiMzlmZjIiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9.xMTMXwuhVOy9xlZ8CDVLt7gxRPHQ6evJ9SQdO1NDsKI
Response example
HTTP/1.1 200 OK
{
  "data": [
    {
      "regionId": 3,
      "domainId": 1,
      "domain": "test.yeastarcloud.com"
    },
    {
      "regionId": 3,
      "domainId": 2,
      "domain": "test2.yeastarcloud.com"
    },
    {
      "regionId": 4,
      "domainId": 3,
      "domain": "test3.yeastarcloud.com"
    },
    {
      "regionId": 4,
      "domainId": 4,
      "domain": "test4.yeastarcloud.com"
    }
  ],
  "requestId": "431153be-6f82-4667-9723-853311af410a",
  "status": "Success",
  "time": 1664275635
}