The Site Factory REST API allows developers to interact with their Site Factory platform.
Version | v1 |
Endpoint | https://www.demo.acquia-cc.com/api/v1 |
Format | JSON |
Authentication | HTTP Basic Auth over SSL |
Credentials | Username and API key (found on your user profile page) |
Status codes | Standard HTTP status codes |
API functions are listed below, first summarized by category, then followed with complete documentation including parameters, return values, and an example curl command.
Check service response
GET /api/v1/pingGet status information
GET /api/v1/statusModify status
PUT /api/v1/statusList sites
GET /api/v1/sitesSite details
GET /api/v1/sites/{site_id}Create a site
POST /api/v1/sitesSite delete
DELETE /api/v1/sites/{site_id}Duplicate a site
POST /api/v1/sites/{site_id}/duplicateCreate a site backup
POST /api/v1/sites/{site_id}/backupList site backups
GET /api/v1/sites/{site_id}/backupsGet a temporary site backup URL
GET /api/v1/sites/{site_id}/backups/{backup_id}/urlDelete a site backup
DELETE /api/v1/sites/{site_id}/backups/{backup_id}Restore a site backup
POST /api/v1/sites/{site_id}/restoreClear a site's caches
POST /api/v1/sites/{site_id}/cache-clearSite external theme refresh
POST /api/v1/sites/{site_id}/external-theme-refreshSet site external theme
PUT /api/v1/sites/{site_id}/external-themeDelete site external theme
DELETE /api/v1/sites/{site_id}/external-themeList site collections
GET /api/v1/collectionsSite collection details
GET /api/v1/collections/{collection_id}Create a site collection
POST /api/v1/collectionsDelete a site collection
DELETE /api/v1/collections/{collection_id}Add site(s) to a site collection.
POST /api/v1/collections/{collection_id}/addRemove site(s) from a site collection.
POST /api/v1/collections/{collection_id}/removeSet the primary site of a site collection.
POST /api/v1/collections/{collection_id}/set-primaryList group members
GET /api/v1/groups/{group_id}/membersGet a group
GET /api/v1/groups/{group_id}List groups
GET /api/v1/groupsCreate a group
POST /api/v1/groupsEdit a group
PUT /api/v1/groupsDelete a group
DELETE /api/v1/groups/{group_id}Add members to a group
POST /api/v1/groups/{group_id}/membersMake members group admin
POST /api/v1/groups/{group_id}/adminsRemove members from a group
DELETE /api/v1/groups/{group_id}/membersRemove group admin from members
DELETE /api/v1/groups/{group_id}/adminsSend a theme notification
POST /api/v1/theme/notificationExternal theme repository deploy key
GET /api/v1/theme/deploy-keyProcess theme modifications
POST /api/v1/theme/processGet domains
GET /api/v1/domains/{node_id}Add domain
POST /api/v1/domains/{node_id}/addRemove domain
POST /api/v1/domains/{node_id}/removeRegenerate ALL users API keys
DELETE /api/v1/users/all/api-keysRegenerate a user's API key
DELETE /api/v1/users/{user_id}/api-keysChecks whether the API is responding.
curl 'https://www.demo.acquia-cc.com/api/v1/ping' \
-v -u {user_name}:{api_key}
{
"message": "pong",
"server_time": "2014-02-16T20:04:12-06:00"
}
Get a status report.
curl 'https://www.demo.acquia-cc.com/api/v1/status' \
-v -u {user_name}:{api_key}
{
"site_creation": "Disabled",
"site_duplication": "Enabled",
"domain_management": "Disabled until 2014-02-14T11:52:17-05:00",
"bulk_operations": "Disabled until 2014-02-14T11:52:17-05:00"
}
Modify the status.
curl 'https://www.demo.acquia-cc.com/api/v1/status' \
-X PUT -d '{"all": "on"}' \
-H 'Content-Type: application/json' \
-v -u {user_name}:{api_key}
{
"site_creation": null,
"site_duplication": null,
"domain_management": null,
"bulk_operations": null
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
all | string | no | on, off, or something strtotime accepts |
|
site_creation | string | no | on, off, or something strtotime accepts |
|
site_duplication | string | no | on, off, or something strtotime accepts |
|
domain_management | string | no | on, off, or something strtotime accepts |
|
bulk_operations | string | no | on, off, or something strtotime accepts |
|
Gets a list of sites.
curl 'https://www.demo.acquia-cc.com/api/v1/sites?limit=20&page=2' \
-v -u {user_name}:{api_key}
{
"count": 111,
"sites": {
{
"id": 191,
"site": "site1",
"db_name": "bdpref191",
"stack_id": 1,
"domain": "domain1.site-factory.com"
"groups": [
91
],
"site_collection": 176,
"is_primary": true
},
{
"id": 196,
"site": "site2",
"db_name": "bdpref196",
"stack_id": 2,
"domain": "domain2.site-factory.com",
"groups": [
91,
105
],
"site_collection": false,
"is_primary": true
}
}
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
limit | int | no | A positive integer (max 100). | 10 |
page | int | no | A positive integer. | 1 |
canary | bool | no | No value necessary. | false |
show_incomplete | bool | no | No value necessary. | false |
Get detailed information about a site.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123' \
-v -u {user_name}:{api_key}
{
"id": 123,
"created": 1397483647,
"owner": "John Drupal",
"site": "site1",
"stack_id": 1,
"db_name": "bdpref196",
"domains": [
"domain1.site-factory.com",
"domain2.site-factory.com"
],
"groups": [
91
],
"part_of_collection": true,
"is_primary": true,
"collection_id": 241,
"collection_domains": [
"domain241.example.com",
"anotherdomain.com"
],
"external_theme": {
"vcs_url": "git@github.com:username\/drupal-theme-repo.git",
"vcs_path": "master"
}
}
Create a new site.
curl 'https://www.demo.acquia-cc.com/api/v1/sites' \
-X POST -H 'Content-Type: application/json' \
-d '{"site_name": "mysite"}' \
-v -u {user_name}:{api_key}
{
"id": 191,
"site": "site1",
"domains": [
"mysite.site-factory.com"
],
"task_id": 12345
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_name | string | yes | The new site name. |
|
group_ids | int|array | no | Either a single group ID, or an array of group IDs. |
|
install_profile | string | no | The install profile to be used to install the site. |
|
stack_id | int | if multiple stacks exist | The stack id where the site should go. |
|
Delete a site.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123' \
-X DELETE -v -u {user_name}:{api_key}
{
"id": 123,
"owner": "johnsmith",
"site": "unicorns",
"time": "1970-01-01T01:02:03+00:00",
"task_id": 16
}
Duplicate a site.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123/duplicate' \
-X POST -H 'Content-Type: application/json' \
-d '{"site_name": "mysite2", "exact_copy": true}' \
-v -u {user_name}:{api_key}
{
"id": 183,
"site": "mysite2"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_name | string | yes | The new site name. |
|
group_ids | int|array | no | Either a single group ID, or an array of group IDs. |
|
exact_copy | bool | no | A boolean indicating whether or not to create an exact copy. | false |
Create a site backup.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123/backup' \
-X POST -H 'Content-Type: application/json' \
-d '{"label": "Weekly", "callback_url": "http://mysite.com", "callback_method": "GET"}' \
-v -u {user_name}:{api_key}
{
"task_id": 183
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
label | string | no | The human-readable description of this backup. |
|
callback_url | string | no | The callback URL, which is invoked upon completion. |
|
callback_method | string | no | The callback method, "GET", or "POST". Uses "POST" if empty. |
|
caller_data | string | no | Data that should be included in the callback, json encoded. |
|
components | array | no | Array of components to be included in the backup. The following component names are accepted: codebase, database, public files, private files, themes. When omitting this parameter it will default to a backup with every component. |
|
List site backups.
Note that the results are sorted from newest backup to oldest.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123/backups?limit=20&page=2' \
-v -u {user_name}:{api_key}
{
"backups": [
{
"id": 6,
"nid": 123,
"status": 1,
"uid": 16,
"timestamp": 1415044083,
"bucket": "sitefactorybackups",
"directory": "oldschool",
"file": "oldschool_91_1415044083.tar.gz",
"label": "Weekly",
"componentList": [
"codebase",
"database",
"public files",
"private files",
"themes"
]
},
{
"id": 1,
"nid": 123,
"status": 1,
"uid": 16,
"timestamp": 1415042116,
"bucket": "sitefactorybackups",
"directory": "oldschool",
"file": "oldschool_91_1415042116.tar.gz",
"label": "Monthly",
"componentList": [
"codebase",
"database",
"public files",
"private files",
"themes"
]
}
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
limit | int | no | A positive integer (max 100). | 10 |
page | int | no | A positive integer. | 1 |
Get temporary site backup URL.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123/backups/101/url?lifetime=300' \
-v -u {user_name}:{api_key}
{
"url": "https:\/\/s3.amazonaws.com\/sitefactorybackups\/site\/backup1_101_1415643727.tar.gz?AWSAccessKeyId=AKIAINAAC2EGOVCRW4WA\u0026Expires=1415713064\u0026Signature=pWucd8b6T%2FqzoNewXH6EuTyIr1g%3D",
"lifetime": 300
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
lifetime | int | no | The number of seconds the temporary URL is good for. | 60 |
Delete a site backup.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123/backups/101' \
-X DELETE -H 'Content-Type: application/json' \
-d '{"callback_url": "http://mysite.com", "callback_method": "GET"}' \
-v -u {user_name}:{api_key}
{
"task_id": 16
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
callback_url | string | no | The callback URL, which is invoked upon completion. |
|
callback_method | string | no | The callback method, "GET", or "POST". Uses "POST" if empty. |
|
caller_data | string | no | Data that should be included in the callback, json encoded. |
|
Restore a site backup.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123/restore' \
-X POST -H 'Content-Type: application/json' \
-d '{"target_site_id": 456, "backup_id": 789, "callback_url": "http://mysite.com", "callback_method": "GET"}' \
-v -u {user_name}:{api_key}
{
"task_id": 1024
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
target_site_id | int | no | ID of the site to restore the backup onto. |
|
backup_id | int | no | ID of the backup to restore defaults to the most recent. |
|
callback_url | string | no | The callback URL, which is invoked upon completion. |
|
callback_method | string | no | The callback method, "GET", or "POST". Uses "POST" if empty. |
|
caller_data | string | no | Data that should be included in the callback, json encoded. |
|
components | array | no | Array of components to be restored from the backup. The following component names are accepted: database, public files, private files, themes. When omitting this parameter it will default to the backup's every component. |
|
Clear Drupal and Varnish caches for a site.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/123/cache-clear' \
-X POST -H 'Content-Type: application/json' \
-v -u {user_name}:{api_key}
{
"id" : 123,
"time" : "2017-05-04T09:25:26+00:00",
"task_ids": {
'drupal_cache_clear' : 1234,
'varnish_cache_clear' : 1234
}
}
Refreshes the site's themes from the external theme repository.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/121/external-theme-refresh' \
-X POST -H 'Content-Type: application/json' \
-v -u {user_name}:{api_key}
{
"id": 121,
"accepted": true,
"time": "2024-05-11T18:15:19+00:00"
}
Sets the site's external theme data.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/121/external-theme' \
-X PUT -H 'Content-Type: application/json' \
-d '{"vcs_url": "git@github.com:user/repo.git", "vcs_path": "tag2"}' \
-v -u {user_name}:{api_key}
{
"id": 121,
"vcs_url": "git@github.com:user\/repo.git",
"vcs_path": "master",
"time": "2020-01-09T15:57:24+00:00"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
vcs_url | string | no | The external theme repository's url. |
|
vcs_path | string | yes | The VCS path to use. |
|
Deletes the site's external theme data.
curl 'https://www.demo.acquia-cc.com/api/v1/sites/121/external-theme' \
-v -u {user_name}:{api_key} -X DELETE \
-H 'Content-Type: application/json'
{
"id": 121,
"accepted": true,
"time": "2024-05-11T18:15:19+00:00"
}
Gets a list of site collections.
curl 'https://www.demo.acquia-cc.com/api/v1/collections?limit=20&page=2' \
-v -u {user_name}:{api_key}
{
"count": 111,
"time" : "2016-11-25T13:18:44+00:00",
"collections": [
{
"id": 196,
"name": "collection2",
"internal_domain": "domain1.site-factory.com",
"primary_site": 220,
"site_count": 2,
"groups": [
91
],
}
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
limit | int | no | A positive integer (max 100). | 10 |
page | int | no | A positive integer. | 1 |
Get detailed information about a site collection.
curl 'https://www.demo.acquia-cc.com/api/v1/collections/123' \
-v -u {user_name}:{api_key}
{
"id": 261,
"time": "2016-11-25T13:18:44+00:00",
"created": 1489075420,
"owner": "admin",
"name": "collection1",
"internal_domain": "collection1.site-factory.com",
"external_domains": [
"domain1.site-factory.com"
],
"groups": [
91
],
"sites": [
236,
231
],
"primary_site": 236
}
Create a new site collection.
curl 'https://www.demo.acquia-cc.com/api/v1/collections' \
-X POST -H 'Content-Type: application/json' \
-d '{"name": "mycollection", "site_ids": [100, 200], "group_ids": [2]}' \
-v -u {user_name}:{api_key}
{
"id": 191,
"name": "mycollection",
"time": "2016-11-25T13:18:44+00:00",
"internal_domain": "mycollecton.site-factory.com"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
name | string | yes | The name of the new site collection. |
|
site_ids | int|array | yes | Either a single site ID, or an array of site IDs. |
|
group_ids | int|array | yes | Either a single group ID, or an array of group IDs. |
|
internal_domain_prefix | string | no | The site collection's internal domain prefix. Uses the "name" parameter's value if not set. |
|
Delete a site collection.
curl 'https://www.demo.acquia-cc.com/api/v1/collections/101' \
-X DELETE \
-v -u {user_name}:{api_key}
{
"id" : 101,
"time" : "2016-10-28T09:25:26+00:00",
"deleted" : true,
"message" : "Your site collection was successfully deleted."
}
Add site(s) to a site collection.
curl 'https://www.demo.acquia-cc.com/api/v1/collections/191/add' \
-X POST -H 'Content-Type: application/json' \
-d '{"site_ids": [101, 121, 126]}' \
-v -u {user_name}:{api_key}
{
"id": 191,
"name: "foobarcollection",
"time": "2017-04-20T10:58:18+00:00",
"site_ids_added": [
121
],
"added": true,
"message": "One site was successfully added to the site collection.",
"warning": [
"The site aabbcc (site ID: 101) is already part of the current site collection.; The site ddeeff (site ID: 126) is already part of the current site collection.",
"Site xxyyzz (site ID: 121) was removed from examplegroup (group ID: 91)."
],
"site_ids_skipped": [
101,
126
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_ids | int|array | yes | Either a single site ID, or an array of site IDs. |
|
Remove site(s) from a site collection.
curl 'https://www.demo.acquia-cc.com/api/v1/collections/191/remove' \
-X POST -H 'Content-Type: application/json' \
-d '{"site_ids": [121]}' \
-v -u {user_name}:{api_key}
{
"id": 191,
"name: "foobarcollection",
"time": "2017-04-20T10:58:18+00:00",
"site_ids_removed": [
121
],
"removed": true,
"message": "One site was successfully removed from the site collection."
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_ids | int|array | yes | Either a single site ID, or an array of site IDs. |
|
Set the primary site of a site collection.
curl 'https://www.demo.acquia-cc.com/api/v1/collections/191/set-primary' \
-X POST -H 'Content-Type: application/json' \
-d '{"site_id": 101}' \
-v -u {user_name}:{api_key}
{
"id": 191,
"name": "foobarcollection",
"time": "2017-04-20T10:58:18+00:00",
"primary_site_id: 101,
"switched": true,
"message": "It can take a few minutes to switch over to the new primary site."
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | A single site ID. |
|
Get the members of a group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}/members?limit=20' \
-v -u {user_name}:{api_key}
{
"time": "2016-11-25T13:18:44+00:00",
"group_id": 123,
"count": 3,
"members": [
{
"uid": 101,
"group owner": true,
"group administrator": true
},
{
"uid": 106,
"group owner": false,
"group administrator": true
},
{
"uid": 111,
"group owner": false,
"group administrator": false
}
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
limit | int | no | A positive integer (max 100). | 10 |
page | int | no | A positive integer. | 1 |
Get a group by group ID.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}' \
-v -u {user_name}:{api_key}
{
"created": 1399421609,
"group_id": 123,
"group_name": "mygroup",
"owner": "user_name",
"owner_id": 456,
"parent_id": 789,
"parent_name": "parentgroup",
"live_site_count": 1,
"total_site_count": 3,
"status": 1
}
Get a list of groups.
curl 'https://www.demo.acquia-cc.com/api/v1/groups?page=2&limit=20' \
-v -u {user_name}:{api_key}
{
"count": 123,
"groups": [
{
"group_name": "test",
"group_id": 10002246,
"owner": "user_name",
"owner_id": 10000461,
"status": 1,
"created": 1473142941,
"live_site_count": 1,
"total_site_count": 2
},
{
"group_name": "subgroup",
"group_id": 10002251,
"owner": "user_name",
"owner_id": 10000461,
"parent_name": "test",
"parent_id": 10002246,
"status": 1,
"created": 1473142941,
"live_site_count": 0,
"total_site_count": 1
}
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
limit | int | no | A positive integer not higher than 100. | 10 |
page | int | no | A positive integer. | 1 |
Create a site group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups' \
-X POST -H 'Content-Type: application/json' \
-d '{"group_name": "mygroup"}' \
-v -u {user_name}:{api_key}
{
"group_id": 123,
"group_name": "mygroup"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
group_name | string | yes | The name of the site group to create. |
|
parent_id | int | no | The parent group ID, if applicable. |
|
Edit a group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}/update' \
-X PUT -H 'Content-Type: application/json' \
-d '{"group_name": "mygroup"}' \
-v -u {user_name}:{api_key}
{
"time": "2016-11-25T13:18:44+00:00",
"group_id": 123,
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
group_name | string | yes | New name for the group. |
|
Delete a site group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}' \
-X DELETE \
-v -u {user_name}:{api_key}
{
"time": "2016-11-25T13:18:44+00:00",
"group_id": 123,
}
Add members to a group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}/members' \
-X POST -H 'Content-Type: application/json' \
-d '{"uids": [66, 71]}' \
-v -u {user_name}:{api_key}
{
"time": "2016-11-25T13:18:44+00:00",
"group_id": 123,
"uids_added": [66]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
uids | int|array | yes | Either a single user ID, or an array of user IDs. |
|
Make members group admin.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}/admins' \
-X POST -H 'Content-Type: application/json' \
-d '{"uids": [66, 71]}' \
-v -u {user_name}:{api_key}
{
"time": "2016-11-25T13:18:44+00:00",
"group_id": 123,
"uids_promoted": [66]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
uids | int|array | yes | Either a single user ID, or an array of user IDs. |
|
Remove members from a group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}/members' \
-X DELETE -H 'Content-Type: application/json' \
-d '{"uids": [66, 71]}' \
-v -u {user_name}:{api_key}
{
"time": "2016-11-25T13:18:44+00:00",
"group_id": 123,
"uids_removed": [66]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
uids | int|array | yes | Either a single user ID, or an array of user IDs. |
|
Remove group admin from members.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}/admins' \
-X DELETE -H 'Content-Type: application/json' \
-d '{"uids": [66, 71]}' \
-v -u {user_name}:{api_key}
{
"time": "2016-11-25T13:18:44+00:00",
"group_id": 123,
"uids_demoted": [66]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
uids | int|array | yes | Either a single user ID, or an array of user IDs. |
|
Receives a theme event notification.
curl 'https://www.demo.acquia-cc.com/api/v1/theme/notification' \
-v -u {user_name}:{api_key} -X POST \
-H 'Content-Type: application/json' \
-d '{"scope": "site", "event": "modify", "nid": 123}'
{
"message": "The site.modify notification has been received.",
"time": "2014-02-16T20:04:12-06:00",
"notification": {
"scope": "site",
"event": "modify",
"nid": 123
}
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
scope | string | yes | The scope. Either "theme", "site", "group", or "global". |
|
event | string | yes | The type of theme event. Either "create", "modify", or "delete". |
|
nid | int | no | The node ID of the related entity (site or group). Not relevant for the "global" scope. |
|
theme | string | no | The system name of the theme. Only relevant for "theme" scope notifications. |
|
uid | int | no | The user id owning the notification and who should get notified if an error occurs during processing. |
|
Gets the deploy key that needs to be added to external theme repositories.
Add this deploy key to your theme repositories, so that the Acquia Cloud Site Factory platform gets access to your repository and is able to deploy updated themes to your sites.
curl 'https://www.demo.acquia-cc.com/api/v1/theme/deploy-key' \
-v -u {user_name}:{api_key}
{
"deploy_key": "ssh-rsa...== id_rsa_external_theme",
"time": "2034-05-11T18:15:19+00:00"
}
Processes the stored theme change notifications.
curl 'https://www.demo.acquia-cc.com/api/v1/theme/process' \
-H 'Content-Type: application/json' \
-X POST -d '{"sitegroup_id": "tangle001"}' \
-v -u {user_name}:{api_key}
{
"message": "The request to process theme notification has been accepted.",
"sitegroups": [
"tangle001"
],
"time": "2014-05-02T16:21:25+00:00"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
sitegroup_id | string | no | The ID of a specific sitegroup to process e.g. "tangle001". |
|
Get domains by node ID.
curl 'https://www.demo.acquia-cc.com/api/v1/domains/{node_id}' \
-v -u {user_name}:{api_key}
{
"node_id": 121,
"node_type": "site collection",
"time": "2016-10-28T09:25:26+00:00",
"domains": {
"protected_domains": [
"site.example.sfdev.acquia-test.co"
],
"custom_domains": [
"www.abc.com/def",
"www.xyz.com"
]
}
}
Adds a domain.
curl 'https://www.demo.acquia-cc.com/api/v1/domains/{node_id}/add' \
-X POST -H 'Content-Type: application/json' \
-d '{"domain_name": "www.domaintoadd.com" }' \
-v -u {user_name}:{api_key}
{
"node_id": 121,
"node_type": "site collection",
"domain": "www.domaintoadd.com",
"time": "2016-10-28T09:25:26+00:00",
"added": true,
"messages": [
"Your domain name was successfully added to the site collection."
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
domain_name | string | yes | The domain name to add. |
|
Removes a domain.
curl 'https://www.demo.acquia-cc.com/api/v1/domains/{node_id}/remove' \
-X POST -H 'Content-Type: application/json' \
-d '{"domain_name": "www.domaintoremove.com" }' \
-v -u {user_name}:{api_key}
{
"node_id": 121,
"node_type": "site collection",
"domain": "www.domaintoremove.com",
"time": "2016-10-28T09:25:26+00:00",
"removed": true,
"message": "Your domain name has been successfully removed from <site collection name>."
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
domain_name | string | yes | The domain name to remove. |
|
Regenerate ALL users API keys.
curl 'https://www.demo.acquia-cc.com/api/v1/users/all/api-keys' \
-X DELETE -H 'Content-Type: application/json' \
-v -u {user_name}:{api_key}
{
"message": "API keys will be regenerated in a few minutes",
"server_time": "2014-02-16T20:04:12-06:00",
"task_id": 1234
}
Regenerate a user's API key.
curl 'https://www.demo.acquia-cc.com/api/v1/users/32/api-keys' \
-X DELETE -H 'Content-Type: application/json' \
-v -u {user_name}:{api_key}
{
"message": "The API key for user 32 was regenerated.",
"server_time": "2014-02-16T20:04:12-06:00"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
user_id | int | yes | The user ID of the user. |
|