域名

说明
专家级
API 密钥应作为请求的授权标头中的不记名令牌发送. 获取您的 API 密钥.
列表

API endpoint:

GET
https://goo.cm/api/v1/domains

请求示例:

curl --location --request GET 'https://goo.cm/api/v1/domains' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
类型
描述
search
optional string
The search query.
sort
optional string
排序. Possible values are: desc for 降序, asc for 升序. Defaults to: desc.
per_page
optional int
每页结果. Possible values are: 10 to 100. Defaults to: 10.
Show

API endpoint:

GET
https://goo.cm/api/v1/domains/{id}

请求示例:

curl --location --request GET 'https://goo.cm/api/v1/domains/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint:

POST
https://goo.cm/api/v1/domains

请求示例:

curl --location --request POST 'https://goo.cm/api/v1/domains' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
Parameter
类型
描述
name
required string
The space name.
index_page
optional string
The index page to redirect to.
not_found_page
optional string
The 404 page to redirect to.
Update

API endpoint:

PUT PATCH
https://goo.cm/api/v1/domains/{id}

请求示例:

curl --location --request PUT 'https://goo.cm/api/v1/domains/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
Parameter
类型
描述
index_page
optional string
The index page to redirect to.
not_found_page
optional string
The 404 page to redirect to.
删除

API endpoint:

DELETE
https://goo.cm/api/v1/domains/{id}

请求示例:

curl --location --request DELETE 'https://goo.cm/api/v1/domains/{id}' \
--header 'Authorization: Bearer {api_key}'