The Site Factory REST API allows developers to interact with their Site Factory platform. API docs are also available on Acquia Developer Portal, these docs might not be 100% accurate and always check against your factory version.
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 service status information
GET /api/v1/statusModify service 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-themeTransfer the site ownership.
POST /api/v1/site-ownership/{site_id}Trigger the site variables set up on the sites.
POST /api/v1/site-variablesGet the site variables for a given site.
GET /api/v1/site-variables/{site_id}Change a site variable for a given site.
PUT /api/v1/site-variables/{site_id}Clear all site variables for a given site.
DELETE /api/v1/site-variables/{site_id}Remove a site variable for a given site.
DELETE /api/v1/site-variables/{site_id}/{variable_key}List 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/groups/{group_id}/updateDelete 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}/adminsAdd site(s) to a site group.
POST /api/v1/groups/{group_id}/sitesRemove members from a group
DELETE /api/v1/groups/{group_id}/membersRemove group admin from members
DELETE /api/v1/groups/{group_id}/adminsRemove site(s) from a site group.
DELETE /api/v1/groups/{group_id}/sitesList sites in a group.
GET /api/v1/groups/{group_id}/sitesSend 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 list of available stacks.
GET /api/v1/stacksEdit stack information.
PUT /api/v1/stacks/{codebase_id}Get details of available stacks.
GET /api/v1/stacks/detailsGet all domains.
GET /api/v1/domainsGet domains
GET /api/v1/domains/{node_id}Get domain status
GET /api/v1/domains/status/{domain_name}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 service 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 of the services.
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": "",
"site_duplication": "2022-02-17T05:06:55-08:00",
"domain_management": "",
"bulk_operations": "2022-02-17T05:06:55-08:00"
}
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,
"created": 1616611353,
"owner": "John Drupal",
"site": "site1",
"db_name": "bdpref191",
"stack_id": 1,
"domain": "domain1.site-factory.com",
"groups": [
91
],
"site_collection": 176,
"is_primary": true
},
{
"id": 196,
"created": 1616611353,
"owner": "John Drupal",
"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 1000). minimum: 1, maximum: 1000 | 10 |
page | int | no | A positive integer. minimum: 1 | 1 |
canary | bool | no | No value necessary. | false |
show_incomplete | bool | no | Show sites that are incomplete. | false |
stack_id | int | no | Show sites on a specific stack. |
|
domain_contains | string | no | Show sites whose domain contains this value. |
|
domain_not_contains | string | no | Show sites whose domain does not contain this value. |
|
has_custom_domain | bool | no | Whether to only show sites with custom domains. |
|
site_owner | int[] | no | Either a user id or a comma separated list of user ids. |
|
show_custom_domain | bool | no | Return the first custom domain if the site has one instead of the internal one. |
|
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"
}
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
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[] | yes | 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
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
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_id | int | yes | Site ID |
|
site_name | string | yes | The new site name. |
|
group_ids | int[] | 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 |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
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 | string[] | 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"
],
"complete": true
},
{
"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"
],
"complete": false
}
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
limit | int | no | A positive integer (max 100). minimum: 1, maximum: 100 | 10 |
page | int | no | A positive integer. minimum: 1 | 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 |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
backup_id | int | yes | Backup ID |
|
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 |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
backup_id | int | yes | Backup ID |
|
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 |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
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 | string[] | 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
}
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
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"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID. |
|
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 |
---|---|---|---|---|
site_id | int | yes | Site ID. |
|
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"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID. |
|
Transfer the site ownership.
curl 'https://www.demo.acquia-cc.com/api/v1/site-ownership/123' \
-v -u {user_name}:{api_key} -X POST \
-H 'Content-Type: application/json' \
-d '{"username": "john.doe"}'
{
"message" : "To transfer your site, please follow the instructions in the e-mail that was sent to site-owner@email.com"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
username | string | no | New owner username to which site needs to be transferred (either username or email field is required). |
|
email | string | no | New owner email id to which site needs to be transferred. |
|
force_transfer | boolean | no | Transfer site ownership without mail confirmation from owner and recipient. |
|
Trigger the site variables set up on the sites.
curl 'https://www.demo.acquia-cc.com/api/v1/site-variables' \
-v -u {user_name}:{api_key} -X POST \
-H 'Content-Type: application/json'
{
"task_ids" : {
"glitch.01live.01update" : "1901",
"glitch2.01live.01liveup" : "1906"
},
"time" : "2022-11-23T12:49:57+00:00"
}
Get the site variables for a given site.
curl 'https://www.demo.acquia-cc.com/api/v1/site-variables/1234' \
-v -u {user_name}:{api_key} -X GET \
-H 'Content-Type: application/json'
{
"time" : "2022-11-23T12:38:06+00:00",
"vars" : {
"external_service_api_key" : {
"id" : 1,
"nid" : 101,
"scrub_during_stage" : 1,
"variable_key" : "external_service_api_key",
"variable_value" : "apikey-value2"
},
"external_service_api_key_non-secret" : {
"id" : 11,
"nid" : 101,
"scrub_during_stage" : 0,
"variable_key" : "external_service_api_key_non-secret",
"variable_value" : "apikey-value xx1234"
}
}
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
Change a site variable for a given site.
curl 'https://www.demo.acquia-cc.com/api/v1/site-variables/1234' \
-v -u {user_name}:{api_key} -X PUT \
-H 'Content-Type: application/json' \
-d '{"variable_key": "external_service_api_key", "variable_value": "apikey-value", "variable_scrub": 1}'
{
"message" : "The configuration options have been saved.",
"time" : "2022-01-19T08:38:09+00:00"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
variable_key | string | yes | The variable key. |
|
variable_value | string | yes | The variable value. |
|
variable_scrub | int | no | If the variable should be removed during staging. |
|
Clear all site variables for a given site.
curl 'https://www.demo.acquia-cc.com/api/v1/site-variables/1234' \
-v -u {user_name}:{api_key} -X DELETE \
-H 'Content-Type: application/json'
{
"message" : "The configuration options have been saved.",
"time" : "2022-01-19T08:38:09+00:00"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
Remove a site variable for a given site.
curl 'https://www.demo.acquia-cc.com/api/v1/site-variables/1234/external_service_api_key' \
-v -u {user_name}:{api_key} -X DELETE \
-H 'Content-Type: application/json'
{
"message" : "The configuration options have been saved.",
"time" : "2022-01-19T08:38:09+00:00"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
site_id | int | yes | Site ID |
|
variable_key | string | yes | The variable key. |
|
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
],
"customer_standard_domains": [
"collection2-coll.example.com"
]
}
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
remove_empty | boolean | no | True to only return collections containing active sites. | false |
limit | int | no | A positive integer (max 100). minimum: 1, maximum: 100 | 10 |
page | int | no | A positive integer. minimum: 1 | 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
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
collection_id | int | yes | Collection ID. |
|
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|int[] | yes | Either a single site ID, or an array of site IDs. |
|
group_ids | int|int[] | 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."
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
collection_id | int | yes | Collection ID. |
|
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 |
---|---|---|---|---|
collection_id | int | yes | Collection ID. |
|
site_ids | int|int[] | yes | A 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 |
---|---|---|---|---|
collection_id | int | yes | Collection ID. |
|
site_ids | int|int[] | yes | A 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 |
---|---|---|---|---|
collection_id | int | yes | Collection ID. |
|
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 |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
limit | int | no | A positive integer (max 1000). minimum: 1, maximum: 1000 | 10 |
page | int | no | A positive integer. minimum: 1 | 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
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
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,
"parent_name": "foo",
"parent_id": 4242,
"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. minimum: 1, maximum: 100 | 10 |
page | int | no | A positive integer. minimum: 1 | 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_id | int | yes | Group ID. |
|
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
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
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 |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
uids | int|int[] | yes | 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 |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
uids | int|int[] | yes | A single user ID, or an array of user IDs. |
|
Add site(s) to a site group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/191/sites' \
-X POST -H 'Content-Type: application/json' \
-d '{"site_ids": [101, 121, 126]}' \
-v -u {user_name}:{api_key}
{
"group_id": 191,
"name": "foobargroup",
"time": "2020-04-20T10:58:18+00:00",
"site_ids_added": [
121
],
"message": "One site was successfully added to the site group.",
"site_ids_skipped": [
101,
126
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
site_ids | int|int[] | yes | Either a single site ID, or an array of site 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 |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
uids | int|int[] | yes | 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 |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
uids | int|int[] | yes | A single user ID, or an array of user IDs. |
|
Remove site(s) from a site group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/191/sites' \
-X DELETE -H 'Content-Type: application/json' \
-d '{"site_ids": [121, 101, 126]}' \
-v -u {user_name}:{api_key}
{
"group_id": 191,
"name": "foobargroup",
"time": "2020-04-20T10:58:18+00:00",
"site_ids_removed": [
121
],
"message": "One site was successfully removed from the site group.",
"site_ids_skipped": [
101,
126
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
site_ids | int|int[] | yes | Either a single site ID, or an array of site IDs. |
|
Get the sites of a group.
curl 'https://www.demo.acquia-cc.com/api/v1/groups/{group_id}/sites?limit=20' \
-v -u {user_name}:{api_key}
{
"time": "2021-02-19T12:54:23+00:00",
"group_id": 101,
"count": 2,
"sites": [
{
"id": 151,
"db_name": "iade151",
"site": "site1",
"stack_id": 1,
"domain": "{base_url}",
"groups": [
91
],
"site_collection": 5,
"is_primary": true
},
{
"id": 156,
"db_name": "iade156",
"site": "site2",
"stack_id": 1,
"domain": "{base_url}",
"groups": [
91
],
"site_collection": 6,
"is_primary": true
}
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
group_id | int | yes | Group id. |
|
limit | int | no | A positive integer (max 1000). minimum: 1, maximum: 1000 | 10 |
page | int | no | A positive integer. minimum: 1 | 1 |
Sends 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". pattern: "^(theme|site|group|global)$" |
|
event | string | yes | The type of theme event. Either "create", "modify", or "delete". pattern: "^(create|modify|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". |
|
Fetches the list of available stacks.
curl 'https://www.demo.acquia-cc.com/api/v1/stacks' \
-v -u {user_name}:{api_key} -X GET
{
"stacks": {
"1": "abcde",
"2": "fghij"
}
}
Edit stack information.
curl 'https://www.demo.acquia-cc.com/api/v1/stacks/1' \
-v -u {user_name}:{api_key} -X PUT \
-H 'Content-Type: application/json' \
-d '{"name": "new-name", "description": "new-description", "tangle_alias":"tangle1"}'
{
"message" : "Stack details are updated successfully."
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
codebase_id | integer | yes | Id of stack whose details are to be changed. |
|
name | string | no | New stack name to be updated. |
|
description | string | no | Stack description to be updated. |
|
tangle_alias | string | no | New tangle alias name for tangle associated with that stack. |
|
Fetches the details of available stacks.
curl 'https://www.demo.acquia-cc.com/api/v1/stacks/details' \
-v -u {user_name}:{api_key} -X GET
{
"1": {
"id": 1,
"name": "abcd",
"description": "stack description",
"tangle_alias": "tangle1"
},
"2": {
"id": 2,
"name": "fghj",
"description": "stack description 2",
"tangle_alias": "tangle2"
}
}
Get all domains known to Site Factory.
Possible domain types: simple|collectionLive|collectionInternal|factoryStandard.
curl 'https://www.demo.acquia-cc.com/api/v1/domains?limit=20&page=2' \
-v -u {user_name}:{api_key}
{
"count": 111,
"domains": [
{
"nid": 2,
"domain": "foobar.com",
"type": "simple",
"readonly": true
},
{
"nid": 6,
"domain": "zoofoo.com",
"type": "factoryStandard",
"readonly": false
}
]
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
limit | int | no | A positive integer (max 1000). minimum: 1, maximum: 1000 | 10 |
page | int | no | A positive integer. minimum: 1 | 1 |
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"
]
}
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
node_id | int | yes | Site node id. |
|
Get domain status.
curl 'https://www.demo.acquia-cc.com/api/v1/domains/status/www.example.com' \
-v -u {user_name}:{api_key}
{
"domain_name": "www.example.com",
"associated_status": "registered|registered_unstable|unregistered|unregistered_unstable",
"node_id": 123,
"node_type": "site",
"stack_id": 1,
"time": "2016-10-28T09:25:26+00:00"
}
Name | Data type | Mandatory | Possible values | Default |
---|---|---|---|---|
domain_name | string | yes | The domain name. |
|
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 |
---|---|---|---|---|
node_id | int | yes | Site node id. |
|
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 |
---|---|---|---|---|
node_id | int | yes | Site node id. |
|
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. |
|