Domain services API
List applied services
List services applied to a domain.
GET /:account/domains/:domain/services
Parameters
Name | Type | Description |
---|---|---|
:account |
integer |
The account id |
:domain |
string , integer
|
The domain name or id |
Example
List applied services for domain with ID 1
in the account 1010
:
curl -H 'Authorization: Bearer <token>' \
-H 'Accept: application/json' \
https://api.dnsimple.com/v2/1010/domains/1/services
Response
Responds with HTTP 200 on success.
{
"data": [
{
"id": 1,
"name": "WordPress",
"sid": "wordpress",
"description": "Share with the world, your community, or your closest friends.",
"setup_description": null,
"requires_setup": true,
"default_subdomain": "blog",
"created_at": "2013-11-05T18:06:50Z",
"updated_at": "2016-03-04T09:23:27Z",
"settings": [
{
"name": "site",
"label": "Site",
"append": null,
"description": "Your Wordpress.com subdomain",
"example": null,
"password": false
}
]
}
],
"pagination": {
"current_page": 1,
"per_page": 30,
"total_entries": 1,
"total_pages": 1
}
}
Errors
Responds with HTTP 401 in case of case of authentication issues.
Apply a service
Applies a service to a domain.
POST /:account/domains/:domain/services/:service
Parameters
Name | Type | Description |
---|---|---|
:account |
integer |
The account id |
:domain |
string , integer
|
The domain name or id |
:service |
string , integer
|
The service name or id |
Example
Apply a service with ID 2
to domain with ID 1
, in the account 1010
:
curl -H 'Authorization: Bearer <token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-X POST \
-d '<json>' \
https://api.dnsimple.com/v2/1010/domains/1/services/2
Input
Name | Type | Description |
---|---|---|
settings |
hash |
Optional hash of settings for some specific services, corresponding to the service fields. For instance, Heroku requires a settings[app] setting. |
Response
Responds with HTTP 204 on success.
Errors
Responds with HTTP 400 if the service cannot be applied to the domain.
Responds with HTTP 401 in case of case of authentication issues.
Unapply a service
Unapplies a service from a domain.
DELETE /:account/domains/:domain/services/:service
Parameters
Name | Type | Description |
---|---|---|
:account |
integer |
The account id |
:domain |
string , integer
|
The domain name or id |
:service |
string , integer
|
The service name or id |
Example
Unapply the service with ID 2
from domain with ID 1
, in the account 1010
:
curl -H 'X-DNSimple-Token: <email>:<token>' \
-H 'Accept: application/json' \
-X DELETE \
https://api.dnsimple.com/v2/1010/domains/1/services/2
Response
Responds with HTTP 204 on success.
Errors
Responds with HTTP 400 if the service cannot be unapplied.
Responds with HTTP 401 in case of case of authentication issues.