Acquia Site Factory REST API (1.0.0)
OpenAPI 3.0 specification for Acquia Site Factory REST API
List audit events
Gets a list of audit events.
query Parameters
limit | integer [ 1 .. 100 ] A positive integer (max 100). |
page | integer >= 1 A positive integer. |
order | string^(ASC|DESC)$ Either "ASC" or "DESC". |
source | string The source of the event. |
module | string The system name of the module. |
scope | string The general scope of the changes. |
type | string The specific type of changes. |
nid | integer An associated node ID. |
uid | integer The user who made the change. |
Responses
Response samples
- 200
{- "count": 1,
- "changes": [
- {
- "id": 1,
- "message": "Thing changed from @before to @after.",
- "before": "before_data",
- "after": "after_data",
- "type": "field_name",
- "scope": "context_name",
- "module": "system",
- "source": "Factory UI",
- "nid": 123,
- "uid": 456,
- "timestamp": 1403742194
}
]
}
Get current centralized role management settings.
Get current centralized role management settings.
Responses
Response samples
- 200
{- "content editor": {
- "enabled": false,
- "site_roles": [
- "string"
]
}, - "platform admin": {
- "enabled": true,
- "site_roles": [
- "site maintainer"
]
}, - "site builder": {
- "enabled": false,
- "site_roles": [
- "string"
]
}, - "time": "2022-01-19T08:38:09+00:00"
}
Set the centralized role management settings for a given role.
Set the centralized role management settings for a given role.
path Parameters
factory_role required | string The site factory role. Currently the only supported ones are "content_editor", "platform_admin" and "site_builder". |
Request Body schema: application/json
site_role required | string The corresponding role on the site. |
Responses
Request samples
- Payload
{- "site_role": "string"
}
Response samples
- 200
{- "content editor": {
- "enabled": true,
- "site_roles": [
- "newrole"
]
}, - "platform admin": {
- "enabled": true,
- "site_roles": [
- "site maintainer"
]
}, - "site builder": {
- "enabled": false,
- "site_roles": [
- "string"
]
}, - "time": "2022-01-19T08:38:09+00:00"
}
Disable the centralized role management settings for a given role.
Disable the centralized role management settings for a given role.
path Parameters
factory_role required | string The site factory role. Currently the only supported ones are "content_editor", "platform_admin" and "site_builder". |
Responses
Response samples
- 200
{- "content editor": {
- "enabled": true,
- "site_roles": [
- "newrole"
]
}, - "platform admin": {
- "enabled": true,
- "site_roles": [
- "site maintainer"
]
}, - "site builder": {
- "enabled": false,
- "site_roles": [
- "string"
]
}, - "time": "2022-01-19T08:38:09+00:00"
}
Create a new cron job.
Create a new cron job.
Request Body schema: application/json
name required | string The cron job name. |
command required | string The command that should be executed. |
interval required | string A unix cron expression. |
sites_affected required | string Possible values: dev-sites - sites without custom domains, prod-sites - sites with custom domains, all |
enabled required | integer If the cron should be enabled. |
thread_percentage required | integer The percentage of cron threads that should be used for this cron. Value has to be an integer between 0 and 100. |
stacks required | Array of integers An array of stack ids for which the cron should be enabled. |
Responses
Request samples
- Payload
{- "name": "string",
- "command": "string",
- "interval": "string",
- "sites_affected": "string",
- "enabled": 0,
- "thread_percentage": 0,
- "stacks": [
- 0
]
}
Response samples
- 200
{- "time": "2021-11-25T13:18:44+00:00",
- "nid": 1234,
- "message": "The cron job has been created"
}
Get cron jobs. sites_affected: dev-sites(without custom domains)|prod-sites(with custom domains)|all
Get all cron jobs (paged).
query Parameters
limit | integer [ 1 .. 1000 ] A positive integer (max 1000). |
page | integer >= 1 A positive integer. |
Responses
Response samples
- 200
{- "time": "2021-11-25T13:18:44+00:00",
- "count": 2,
- "cronjobs": [
- {
- "nid": 101,
- "name": "cron job 1",
- "stacks": [
- 1
], - "sites_affected": "dev-sites",
- "interval": "14 0,12 * * *",
- "drush_command": "cron",
- "thread_percentage": 60
}
]
}
Edit a cron job.
Edit a cron job.
path Parameters
job_id required | integer Cron job id. |
Request Body schema: application/json
name required | string The cron job name. |
command required | string The command that should be executed. |
interval required | string A unix cron expression. |
sites_affected required | string Possible values: dev-sites - sites without custom domains, prod-sites - sites with custom domains, all |
enabled required | integer If the cron should be enabled. |
thread_percentage required | integer The percentage of cron threads that should be used for this cron. Value has to be an integer between 0 and 100. |
stacks required | Array of integers An array of stack ids for which the cron should be enabled. |
Responses
Request samples
- Payload
{- "name": "string",
- "command": "string",
- "interval": "string",
- "sites_affected": "string",
- "enabled": 0,
- "thread_percentage": 0,
- "stacks": [
- 0
]
}
Response samples
- 200
{- "time": "2021-11-25T13:18:44+00:00",
- "message": "The cron job has been saved"
}
Response samples
- 200
{- "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"
]
}
}
Get domain status
Get domain status.
path Parameters
domain_name required | string The domain name. |
Responses
Response samples
- 200
{- "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"
}
Add domain
Adds a domain.
path Parameters
node_id required | integer Site node id. |
Request Body schema: application/json
domain_name required | string The domain name to add. |
Responses
Request samples
- Payload
{- "domain_name": "string"
}
Response samples
- 200
{- "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."
]
}
Remove domain
Removes a domain.
path Parameters
node_id required | integer Site node id. |
Request Body schema: application/json
domain_name required | string The domain name to remove. |
Responses
Request samples
- Payload
{- "domain_name": "string"
}
Response samples
- 200
{- "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>."
}
Get the current factory standard domain templates.
Get the current factory standard domain templates.
Responses
Response samples
- 200
{- "site_prod": [
- "template1-[sitename].example.com"
], - "site_nonprod": [
- "template1-[sitename]-[environment].example.com"
], - "collection_prod": [
- "template1-[sitename]-collection.example.com"
], - "collection_nonprod": [
- "template1-[sitename]-[environment]-collection.example.com"
], - "time": "2022-02-16T08:38:09+00:00"
}
Set the factory standard domain template.
Set the factory standard domain template.
path Parameters
template_name required | string The template name to change. Currently the only supported ones are "site_prod", "site_nonprod", "collection_prod" and "collection_nonprod". |
Request Body schema: application/json
new_template required | Array of strings The new template. |
Responses
Request samples
- Payload
{- "new_template": [
- "string"
]
}
Response samples
- 200
{- "site_prod": [
- "template1-[sitename].example.com"
], - "site_nonprod": [
- "template3-[sitename]-[environment].example.com"
], - "collection_prod": [
- "template1-[sitename]-collection.example.com"
], - "collection_nonprod": [
- "template1-[sitename]-[environment]-collection.example.com"
], - "time": "2022-02-16T08:38:09+00:00"
}
Remove the factory standard domain template.
Remove the factory standard domain template.
path Parameters
template_name required | string The template name to remove. Currently the only supported ones are "site_prod", "site_nonprod", "collection_prod" and "collection_nonprod". |
Responses
Response samples
- 200
{- "site_prod": [
- "template1-[sitename].example.com"
], - "site_nonprod": [
- "template3-[sitename]-[environment].example.com"
], - "collection_prod": [
- "string"
], - "collection_nonprod": [
- "template1-[sitename]-[environment]-collection.example.com"
], - "time": "2022-02-16T08:38:09+00:00"
}
List group members
Get the members of a group.
path Parameters
group_id required | integer Group id. |
query Parameters
limit | integer [ 1 .. 1000 ] A positive integer (max 1000). |
page | integer >= 1 A positive integer. |
Responses
Response samples
- 200
{- "time": "2016-11-25T13:18:44+00:00",
- "group_id": 123,
- "count": 3,
- "members": [
- {
- "uid": 101,
- "group owner": true,
- "group administrator": true
}
]
}
Add members to a group
Add members to a group.
path Parameters
group_id required | integer Group id. |
Request Body schema: application/json
required | integer or Array of integers A single user ID, or an array of user IDs. |
Responses
Request samples
- Payload
{- "uids": 0
}
Response samples
- 200
{- "time": "2016-11-25T13:18:44+00:00",
- "group_id": 123,
- "uids_added": [
- 66
]
}
Remove members from a group
Remove members from a group.
path Parameters
group_id required | integer Group id. |
query Parameters
required | integer or Array of integers A single user ID, or an array of user IDs. |
Responses
Response samples
- 200
{- "time": "2016-11-25T13:18:44+00:00",
- "group_id": 123,
- "uids_removed": [
- 66
]
}
Response samples
- 200
{- "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
}
List groups
Get a list of groups.
query Parameters
limit | integer [ 1 .. 100 ] A positive integer not higher than 100. |
page | integer >= 1 A positive integer. |
Responses
Response samples
- 200
{- "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
}
]
}
Create a group
Create a site group.
Request Body schema: application/json
group_name required | string The name of the site group to create. |
parent_id | integer The parent group ID, if applicable. |
Responses
Request samples
- Payload
{- "group_name": "string",
- "parent_id": 0
}
Response samples
- 200
{- "group_id": 123,
- "group_name": "mygroup"
}
Edit a group
Edit a group.
path Parameters
group_id required | integer Group ID. |
Request Body schema: application/json
group_name required | string New name for the group. |
Responses
Request samples
- Payload
{- "group_name": "string"
}
Response samples
- 200
{- "time": "2016-11-25T13:18:44+00:00",
- "group_id": 123
}
Make members group admin
Make members group admin.
path Parameters
group_id required | integer Group id. |
Request Body schema: application/json
required | integer or Array of integers A single user ID, or an array of user IDs. |
Responses
Request samples
- Payload
{- "uids": 0
}
Response samples
- 200
{- "time": "2016-11-25T13:18:44+00:00",
- "group_id": 123,
- "uids_promoted": [
- 66
]
}
Remove group admin from members
Remove group admin from members.
path Parameters
group_id required | integer Group id. |
query Parameters
required | integer or Array of integers A single user ID, or an array of user IDs. |
Responses
Response samples
- 200
{- "time": "2016-11-25T13:18:44+00:00",
- "group_id": 123,
- "uids_demoted": [
- 66
]
}
Add site(s) to a site group.
Add site(s) to a site group.
path Parameters
group_id required | integer Group id. |
Request Body schema: application/json
required | integer or Array of integers Either a single site ID, or an array of site IDs. |
Responses
Request samples
- Payload
{- "site_ids": 0
}
Response samples
- 200
{- "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
]
}
Remove site(s) from a site group.
Remove site(s) from a site group.
path Parameters
group_id required | integer Group id. |
query Parameters
required | integer or Array of integers Either a single site ID, or an array of site IDs. |
Responses
Response samples
- 200
{- "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
]
}
List sites in a group.
Get the sites of a group.
path Parameters
group_id required | integer Group id. |
query Parameters
limit | integer [ 1 .. 1000 ] A positive integer (max 1000). |
page | integer >= 1 A positive integer. |
Responses
Response samples
- 200
{- "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
}
]
}
List installation profiles.
List installation profiles.
query Parameters
stack_id | integer Get only the profiles on the given stack. |
is_enabled | boolean Get only the enabled/disabled profiles. |
Responses
Response samples
- 200
{- "profiles": [
- {
- "name": "acquia_acms",
- "stack_id": 1,
- "enabled": true,
- "rest_api_default": true,
- "description": "Ready-to-use solution designed to help create and publish websites more easily"
}
], - "count": 4,
- "time": "1970-01-01T01:02:03+00:00"
}
Enable installation profile.
Enable installation profile.
path Parameters
profile_name required | string The installation profile name. |
query Parameters
stack_id | integer The installation profile's stack. |
Responses
Response samples
- 200
{- "updated": true,
- "message": "Profile enabled successfully.",
- "profile_name": "standard",
- "stack_id": 1,
- "enabled": true,
- "rest_api_default": true,
- "time": "1970-01-01T01:02:03+00:00"
}
Disable installation profile.
Disable installation profile.
path Parameters
profile_name required | string The installation profile name. |
query Parameters
stack_id | integer The installation profile's stack. |
Responses
Response samples
- 200
{- "updated": true,
- "message": "Profile disabled successfully.",
- "profile_name": "standard",
- "stack_id": 1,
- "enabled": false,
- "rest_api_default": false,
- "time": "1970-01-01T01:02:03+00:00"
}
Sets the installation profile as default.
Sets the installation profile as default.
path Parameters
profile_name required | string The installation profile name. |
query Parameters
stack_id | integer The installation profile's stack. |
Responses
Response samples
- 200
{- "updated": true,
- "message": "Profile set as default successfully.",
- "profile_name": "standard",
- "stack_id": 1,
- "enabled": true,
- "rest_api_default": true,
- "time": "1970-01-01T01:02:03+00:00"
}
List monthly aggregated dynamic request statistics.
Gets the monthly aggregated dynamic request statistics.
query Parameters
stack_id required | integer The stack id for which to fetch the dynamic request statistics. If there is only one stack, this parameter can be omitted. |
start_from | string The first date from which to start showing the statistics in the format of YYYY-MM. |
sort_order | string The sort order direction. Either asc or desc. |
limit | integer [ 1 .. 120 ] The number of months to be listed. Maximum value is 120. |
page | integer >= 1 The page number to show in the list. |
Responses
Response samples
- 200
{- "count": 1,
- "time": "2016-11-25T13:18:44+00:00",
- "most_recent_data": "2016-11-23",
- "dynamic_requests": {
- "2016-10": {
- "date": "2016-10",
- "stack_id": 1,
- "total_dynamic_requests": 106,
- "2xx_dynamic_requests": 100,
- "3xx_dynamic_requests": 3,
- "4xx_dynamic_requests": 2,
- "5xx_dynamic_requests": 1,
- "total_runtime": 101.4,
- "2xx_runtime": 100,
- "3xx_runtime": 0.9,
- "4xx_runtime": 0.4,
- "5xx_runtime": 0.1
}
}
}
List monthly dynamic request statistics by domain.
Gets the monthly dynamic request statistics by domain.
query Parameters
stack_id required | integer The stack id for which to fetch the dynamic request statistics. If there is only one stack, this parameter can be omitted. |
date required | string The month in the format of YYYY-MM. |
domain_name | string Full domain name or a prefix for filtering the results. |
sort_order | string The sort order direction. Either asc or desc. |
limit | integer [ 1 .. 100 ] The number of domains to be listed. (max 100) |
page | integer >= 1 The page number to show in the list. |
Responses
Response samples
- 200
{- "count": 1,
- "time": "2016-11-25T13:18:44+00:00",
- "most_recent_data": "2016-11-23",
- "dynamic_requests": {
- "domain1.example.com": {
- "date": "2016-11",
- "stack_id": 1,
- "total_dynamic_requests": 106,
- "2xx_dynamic_requests": 100,
- "3xx_dynamic_requests": 3,
- "4xx_dynamic_requests": 2,
- "5xx_dynamic_requests": 1,
- "total_runtime": 101.4,
- "2xx_runtime": 100,
- "3xx_runtime": 0.9,
- "4xx_runtime": 0.4,
- "5xx_runtime": 0.1
}
}
}
Pause/resume task processing
Pause or resume task processing.
Request Body schema: application/json
paused required | boolean Pauses/resumes the WIP task processing. |
reason | string Brief explanation for pausing workers. |
Responses
Request samples
- Payload
{- "paused": true,
- "reason": "string"
}
Response samples
- 200
{- "message": "Task processing has been paused."
}
Pause/resume task processing for a specific task
Pause or resume task processing.
path Parameters
task_id required | integer TaskID. |
Request Body schema: application/json
paused required | boolean leave the task in paused or unpaused state. |
level | string pauses/unpauses just the specified task or all its children. |
Responses
Request samples
- Payload
{- "paused": true,
- "level": "string"
}
Response samples
- 200
{- "message": "Task processing has been paused.",
- "task_id": 123,
- "level": "family"
}
List roles
Gets a list of roles.
query Parameters
limit | integer [ 1 .. 100 ] A positive integer (max 100). |
page | integer >= 1 A positive integer. |
order | string^(ASC|DESC)$ Either "ASC" or "DESC". |
Responses
Response samples
- 200
{- "count": 4,
- "roles": {
- "property1": "string",
- "property2": "string"
}
}
Update (rename) a role
Update (rename) a role.
path Parameters
role_id required | integer The role ID of the user role. |
Request Body schema: application/json
new_name required | string The new name for the user role. |
Responses
Request samples
- Payload
{- "new_name": "string"
}
Response samples
- 200
{- "role_id": 32,
- "updated": true
}
List site collections
Gets a list of site collections.
query Parameters
remove_empty | boolean True to only return collections containing active sites. |
limit | integer [ 1 .. 100 ] A positive integer (max 100). |
page | integer >= 1 A positive integer. |
Responses
Response samples
- 200
{- "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
]
}
]
}
Create a site collection
Create a new site collection.
Request Body schema: application/json
name required | string The name of the new site collection. |
required | integer or Array of integers Either a single site ID, or an array of site IDs. |
required | integer or Array of integers Either a single group ID, or an array of group IDs. |
internal_domain_prefix | string The site collection's internal domain prefix. Uses the "name" parameter's value if not set. |
Responses
Request samples
- Payload
{- "name": "string",
- "site_ids": 0,
- "group_ids": 0,
- "internal_domain_prefix": "string"
}
Response samples
- 200
{- "id": 191,
- "name": "mycollection",
- "time": "2016-11-25T13:18:44+00:00",
- "internal_domain": "mycollecton.site-factory.com"
}
Site collection details
Get detailed information about a site collection.
path Parameters
collection_id required | integer Collection ID. |
Responses
Response samples
- 200
{- "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
], - "primary_site": 236
}
Add site(s) to a site collection.
Add site(s) to a site collection.
path Parameters
collection_id required | integer Collection ID. |
Request Body schema: application/json
required | integer or Array of integers A site ID or an array of site IDs. |
Responses
Request samples
- Payload
{- "site_ids": 0
}
Response samples
- 200
{- "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_ids_skipped": [
- 101
]
}
Remove site(s) from a site collection.
Remove site(s) from a site collection.
path Parameters
collection_id required | integer Collection ID. |
Request Body schema: application/json
required | integer or Array of integers A site ID, or an array of site IDs. |
Responses
Request samples
- Payload
{- "site_ids": 0
}
Response samples
- 200
{- "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."
}
Set the primary site of a site collection.
Set the primary site of a site collection.
path Parameters
collection_id required | integer Collection ID. |
Request Body schema: application/json
site_id required | integer A single site ID. |
Responses
Request samples
- Payload
{- "site_id": 0
}
Response samples
- 200
{- "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."
}
Enable and set the site guard settings.
Enable the site guard config.
Request Body schema: application/json
message required | string The message which the site guard should output. |
username required | string The username for the site guard. |
password required | string The password for the site guard. |
Responses
Request samples
- Payload
{- "message": "string",
- "username": "string",
- "password": "string"
}
Response samples
- 200
{- "message": "The configuration options have been saved.",
- "time": "2022-01-19T08:38:09+00:00"
}
Set the site ownership settings.
Set the site ownership settings.
Request Body schema: application/json
username required | string The default owner username. The user has to have the "Platform admin" role. |
Responses
Request samples
- Payload
{- "username": "string"
}
Response samples
- 200
{- "message": "The configuration options have been saved.",
- "time": "2022-01-19T08:38:09+00:00"
}
Set the site update priority.
Set the site update priority.
Request Body schema: application/json
priority required | Array of integers An array of site node ids in the desired update order. |
Responses
Request samples
- Payload
{- "priority": [
- 0
]
}
Response samples
- 200
{- "message": "The configuration options have been saved.",
- "time": "2022-01-19T08:38:09+00:00"
}
List sites
Gets a list of sites.
query Parameters
limit | integer [ 1 .. 1000 ] A positive integer (max 1000). |
page | integer >= 1 A positive integer. |
canary | boolean No value necessary. |
show_incomplete | boolean Show sites that are incomplete. |
stack_id | integer Show sites on a specific stack. |
domain_contains | string Show sites whose domain contains this value. |
domain_not_contains | string Show sites whose domain does not contain this value. |
has_custom_domain | boolean Whether to only show sites with custom domains. |
site_owner | Array of integers Either a user id or a comma separated list of user ids. |
show_custom_domain | boolean Return the first custom domain if the site has one instead of the internal one. |
Responses
Response samples
- 200
{- "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": 0,
- "is_primary": true
}
]
}
Create a site
Create a new site.
Request Body schema: application/json
site_name required | string The new site name. |
group_ids | Array of integers Either a single group ID, or an array of group IDs. |
install_profile | string The install profile to be used to install the site. |
stack_id | integer The stack id where the site should go. |
Responses
Request samples
- Payload
{- "site_name": "string",
- "group_ids": [
- 0
], - "install_profile": "string",
- "stack_id": 0
}
Response samples
- 200
{- "id": 191,
- "site": "site1",
- "domains": [
- "mysite.site-factory.com"
], - "task_id": 12345
}
Site details
Get detailed information about a site.
path Parameters
site_id required | integer Site ID |
Responses
Response samples
- 200
{- "id": 123,
- "created": 1397483647,
- "owner": "John Drupal",
- "site": "site1",
- "stack_id": 1,
- "db_name": "bdpref196",
- "domains": [
- "domain1.site-factory.com"
], - "groups": [
- 91
], - "part_of_collection": true,
- "is_primary": true,
- "collection_id": 241,
- "collection_domains": [
- "domain241.example.com"
], - "external_theme": {
- "vcs_url": "git@github.com:username/drupal-theme-repo.git",
- "vcs_path": "master"
}
}
Duplicate a site
Duplicate a site.
path Parameters
site_id required | integer Site ID |
Request Body schema: application/json
site_name required | string The new site name. |
group_ids | Array of integers Either a single group ID, or an array of group IDs. |
exact_copy | boolean A boolean indicating whether or not to create an exact copy. |
Responses
Request samples
- Payload
{- "site_name": "string",
- "group_ids": [
- 0
], - "exact_copy": true
}
Response samples
- 200
{- "id": 183,
- "site": "mysite2"
}
Create a site backup
Create a site backup.
path Parameters
site_id required | integer Site ID |
Request Body schema: application/json
label | string The human-readable description of this backup. |
callback_url | string The callback URL, which is invoked upon completion. |
callback_method | string The callback method, "GET", or "POST". Uses "POST" if empty. |
caller_data | string Data that should be included in the callback, json encoded. |
components | Array of strings 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. |
Responses
Request samples
- Payload
{- "label": "string",
- "callback_url": "string",
- "callback_method": "string",
- "caller_data": "string",
- "components": [
- "string"
]
}
Response samples
- 200
{- "task_id": 183
}
List site backups
List site backups.
Note that the results are sorted from newest backup to oldest.
path Parameters
site_id required | integer Site ID |
query Parameters
limit | integer [ 1 .. 100 ] A positive integer (max 100). |
page | integer >= 1 A positive integer. |
Responses
Response samples
- 200
{- "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"
], - "complete": true
}
]
}
Delete a site backup
Delete a site backup.
path Parameters
site_id required | integer Site ID |
backup_id required | integer Backup ID |
query Parameters
callback_url | string The callback URL, which is invoked upon completion. |
callback_method | string The callback method, "GET", or "POST". Uses "POST" if empty. |
caller_data | string Data that should be included in the callback, json encoded. |
Responses
Response samples
- 200
{- "task_id": 16
}
Restore a site backup
Restore a site backup.
path Parameters
site_id required | integer Site ID |
Request Body schema: application/json
target_site_id | integer ID of the site to restore the backup onto. |
backup_id | integer ID of the backup to restore defaults to the most recent. |
callback_url | string The callback URL, which is invoked upon completion. |
callback_method | string The callback method, "GET", or "POST". Uses "POST" if empty. |
caller_data | string Data that should be included in the callback, json encoded. |
components | Array of strings 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. |
Responses
Request samples
- Payload
{- "target_site_id": 0,
- "backup_id": 0,
- "callback_url": "string",
- "callback_method": "string",
- "caller_data": "string",
- "components": [
- "string"
]
}
Response samples
- 200
{- "task_id": 1024
}
Start staging process
Starts the staging process.
Request Body schema: application/json
to_env required | string Environment to deploy to. |
sites | Array of integers Node IDs of sites to deploy. |
wipe_target_environment | boolean Use this option to wipe the management console and all stacks on the selected environment before deploying sites. |
wipe_stacks | Array of integers Stack ids to wipe. It will be ignored if wipe_target_environment is true. |
synchronize_all_users | boolean Use this parameter to only stage the user accounts that are required for the provided sites and the related site collections and site groups. |
detailed_status | boolean Provide a status email for each site as it completes. |
skip_site_files | boolean Skip copying the staged down sites' files. |
skip_site_files_overwrite | Array of strings File patterns to skip copying during the stage down process. Ignored if skip_site_files is false. |
Responses
Request samples
- Payload
{- "to_env": "string",
- "sites": [
- 0
], - "wipe_target_environment": true,
- "wipe_stacks": [
- 0
], - "synchronize_all_users": true,
- "detailed_status": true,
- "skip_site_files": true,
- "skip_site_files_overwrite": [
- "string"
]
}
Response samples
- 200
{- "message": "Staging deployment has been initiated - WIP123.",
- "task_id": 123
}
Response samples
- 200
{- "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 service status
Modify the status of the services.
Request Body schema: application/json
all | string on, off, or something strtotime accepts |
site_creation | string on, off, or something strtotime accepts |
site_duplication | string on, off, or something strtotime accepts |
domain_management | string on, off, or something strtotime accepts |
bulk_operations | string on, off, or something strtotime accepts |
Responses
Request samples
- Payload
{- "all": "string",
- "site_creation": "string",
- "site_duplication": "string",
- "domain_management": "string",
- "bulk_operations": "string"
}
Response samples
- 200
{- "site_creation": "",
- "site_duplication": "2022-02-17T05:06:55-08:00",
- "domain_management": "",
- "bulk_operations": "2022-02-17T05:06:55-08:00"
}
(Internal use only) Get Task information.
Returns data about WIP tasks.
query Parameters
limit | integer [ 1 .. 100 ] A positive integer (max 100). |
page | integer >= 1 A positive integer. |
status | string processing, error or not-started |
class | string A WIP class name to filter on. |
group | string A WIP group name to filter on. |
Responses
Response samples
- 200
[- {
- "id": "7726",
- "parent": "0",
- "name": "CronController 151",
- "group_name": "CronController",
- "priority": "2",
- "object_id": "7726",
- "status": "8",
- "wake": "1645143240",
- "added": "1645103709",
- "started": "1645103715",
- "completed": "0",
- "taken": "0",
- "lease": "301",
- "max_run_time": "300",
- "paused": "0",
- "concurrency_exceeded": "0",
- "error_message": "",
- "nid": "0",
- "uid": "0",
- "class": "Acquia\\SfCron\\CronController"
}
]
(Internal use only) Get Task log information.
Returns log entries about WIP tasks.
path Parameters
task_id required | integer Task ID. |
query Parameters
level | string The minimum status level to display |
descendants | boolean Include the logs of all descendant tasks. |
Responses
Response samples
- 200
[- {
- "id": "755096",
- "timestamp": "1643297111",
- "object_id": "5566",
- "action": "",
- "level": "7",
- "message": "[ded-11|7376] - Task added for object id 5566.",
- "readable": "0"
}
]
Edit current task log settings.
Edit task log settings.
Request Body schema: application/json
wip_log_level | string Level of Wip log messages to keep on successful completion. |
wip_log_maximum_level | string The maximum log level that will be written to the log. |
Responses
Request samples
- Payload
{- "wip_log_level": "string",
- "wip_log_maximum_level": "string"
}
Response samples
- 200
{- "message": "The configuration options have been saved.",
- "time": "2022-01-19T08:38:09+00:00"
}
External theme repository deploy key
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.
Responses
Response samples
- 200
{- "deploy_key": "ssh-rsa...== id_rsa_external_theme",
- "time": "2034-05-11T18:15:19+00:00"
}
Process theme modifications
Processes the stored theme change notifications.
Request Body schema: application/json
sitegroup_id | string The ID of a specific sitegroup to process e.g. "tangle001". |
Responses
Request samples
- Payload
{- "sitegroup_id": "string"
}
Response samples
- 200
{- "message": "The request to process theme notification has been accepted.",
- "sitegroups": [
- "tangle001"
], - "time": "2014-05-02T16:21:25+00:00"
}
Set site external theme
Sets the site's external theme data.
path Parameters
site_id required | integer Site ID. |
Request Body schema: application/json
vcs_url | string The external theme repository's url. |
vcs_path required | string The VCS path to use. |
Responses
Request samples
- Payload
{- "vcs_url": "string",
- "vcs_path": "string"
}
Response samples
- 200
{- "id": 121,
- "vcs_url": "git@github.com:user/repo.git",
- "vcs_path": "master",
- "time": "2020-01-09T15:57:24+00:00"
}
Send a theme notification
Sends a theme event notification.
Request Body schema: application/json
scope required | string^(theme|site|group|global)$ The scope. Either "theme", "site", "group", or "global". |
event required | string^(create|modify|delete)$ The type of theme event. Either "create", "modify", or "delete". |
nid | integer The node ID of the related entity (site or group). Not relevant for the "global" scope. |
theme | string The system name of the theme. Only relevant for "theme" scope notifications. |
uid | integer The user id owning the notification and who should get notified if an error occurs during processing. |
Responses
Request samples
- Payload
{- "scope": "string",
- "event": "string",
- "nid": 0,
- "theme": "string",
- "uid": 0
}
Response samples
- 200
{- "message": "The site.modify notification has been received.",
- "time": "2014-02-16T20:04:12-06:00",
- "notification": {
- "scope": "site",
- "event": "modify",
- "nid": 123
}
}
Transfer the site ownership.
Transfer the site ownership.
path Parameters
site_id required | integer Site ID |
Request Body schema: application/json
username | string New owner username to which site needs to be transferred (either username or email field is required). |
string New owner email id to which site needs to be transferred. | |
force_transfer | boolean Transfer site ownership without mail confirmation from owner and recipient. |
Responses
Request samples
- Payload
{- "username": "string",
- "email": "string",
- "force_transfer": true
}
Response samples
- 200
{- "message": "To transfer your site, please follow the instructions in the e-mail that was sent to site-owner@email.com"
}
Start an update
Start the update process.
Request Body schema: application/json
scope | string Either "sites", "factory", or "both". |
start_time | string A start time string, parseable by strtotime(). Interpreted as UTC if no timezone is specified. |
sites_ref | string A VCS ref to deploy to the sites. |
factory_ref | string A VCS ref to deploy to the Factory. |
sites_type | string Either "code", "code, db", or "code, db, registry" |
factory_type | string Either "code" or "code, db" |
stack_id | integer The stack id to release to. |
site_update_fail_action | string Action to be performed on sites when updates fail. Either "online" or "offline" |
db_update_arguments | string Custom arguments to supply to the db-update hooks. Space separated alphanumeric characters only. |
Responses
Request samples
- Payload
{- "scope": "string",
- "start_time": "string",
- "sites_ref": "string",
- "factory_ref": "string",
- "sites_type": "string",
- "factory_type": "string",
- "stack_id": 0,
- "site_update_fail_action": "string",
- "db_update_arguments": "string"
}
Response samples
- 200
{- "message": "Update initiated.",
- "task_id": 123
}
Get update progress
Gets the status of a running update process.
path Parameters
required | integer or string Either int value or 'last'. |
Responses
Response samples
- 200
{- "statuses": {
- "not-started": 0,
- "in-progress": 0,
- "completed": "30",
- "warning": 0,
- "error": 0
}, - "message": "Update complete",
- "percentage": 100,
- "start_time": 1423862773,
- "end_time": 1423865337,
- "id": 4726,
- "docroot_pairs": [
- {
- "environment": {
- "site": "test",
- "env": "prod",
- "tangle": "tangle_test",
- "type": "live_env"
}, - "total": 30,
- "error_percentage": 0,
- "completed_percentage": 100
}
]
}
Pause an update
Pause a running update process.
Request Body schema: application/json
pause required | boolean leave the task in paused or unpaused state. |
Responses
Request samples
- Payload
{- "pause": true
}
Response samples
- 200
{- "message": "Site update processing has been paused."
}
List users
Gets a list of users.
query Parameters
limit | integer [ 1 .. 100 ] A positive integer (max 100). |
page | integer >= 1 A positive integer. |
order | string^(ASC|DESC)$ Either "ASC" or "DESC". |
ids | string A comma-separated list of user IDs. |
role_ids | string A comma-separated list of role IDs. |
status | string Either "active" or "blocked". |
uid_min | integer First uid value to start with. |
uid_max | integer Last uid value to fetch. |
created_min | integer Lowest 'created' value (timestamp). |
created_max | integer Highest 'created' value (timestamp). |
login_min | integer Lowest 'login' value (timestamp). |
login_max | integer Highest 'login' value (timestamp). |
tfa_status | string Either "active" or "disabled". |
fields | string A comma-separated list of Drupal user fields. |
Responses
Response samples
- 200
{- "count": 6,
- "users": [
- {
- "uid": "1",
- "name": "admin",
- "mail": "admin@example.com",
- "created": "1431525207",
- "access": "1431525447",
- "status": "blocked",
- "tfa_status": "not available",
- "roles": {
- "property1": "string",
- "property2": "string"
}
}
]
}
Create a user
Create a user.
Request Body schema: application/json
name required | string The name of the user. |
mail required | string The email address of the user. |
pass | string The user's password. (Included in the response, if not provided.) |
status | integer The user's status, either 0 or 1. |
string or Array of strings Either a single role name, or an array of role names. |
Responses
Request samples
- Payload
{- "name": "string",
- "mail": "string",
- "pass": "string",
- "status": 0,
- "roles": "string"
}
Response samples
- 200
{- "user_id": 16,
- "user_name": "Mark",
- "user_mail": "mark@example.com",
- "user_status": "active"
}
Retrieve a user
Retrieve a user by user ID.
path Parameters
user_id required | integer The user ID of the user. |
query Parameters
fields | string A comma-separated list of fields to retrieve. |
Responses
Response samples
- 200
{- "uid": "32",
- "name": "Mark",
- "mail": "mark@example.com",
- "created": "1449070860",
- "login": "1449071036",
- "status": "1",
- "roles": {
- "property1": "string",
- "property2": "string"
}, - "tfa_status": "active"
}
Update a user
Update a user.
path Parameters
user_id required | integer The user ID of the user. |
Request Body schema: application/json
name | string The name of the user. |
string The email address of the user. | |
pass | string The user's password. |
status | integer [ 0 .. 1 ] The user's status, either 0 or 1. |
string or Array of strings Single role name, or an array of them. | |
tfa_status | integer [ 0 .. 1 ] The user's TFA status, either 0 or 1. |
Responses
Request samples
- Payload
{- "name": "string",
- "mail": "string",
- "pass": "string",
- "status": 1,
- "roles": "string",
- "tfa_status": 1
}
Response samples
- 200
{- "user_id": 85,
- "updated": true
}
List deployable refs
Get a list of VCS refs.
query Parameters
type required | string Either "sites" or "factory". (Note: "factory" is restricted to Acquia employees.) |
stack_id | string The stack id. |
Responses
Response samples
- 200
{- "available": [
- "dev-branch"
], - "current": "tags/2.85.0.3085"
}
Wip task status
Gets the status of a Wip task.
path Parameters
task_id required | integer The Wip task ID |
Responses
Response samples
- 200
{- "wip_task": {
- "id": "476",
- "parent": "0",
- "name": "SiteArchive 111",
- "group_name": "SiteArchive customerstack1_01",
- "status": "16",
- "status_string": "Completed",
- "added": "1475051666",
- "started": "1475051667",
- "completed": "1475051765",
- "paused": "0",
- "error_message": "",
- "nid": "111",
- "uid": "21"
}, - "time": "2014-05-02T16:21:25+00:00"
}