Acquia Site Factory REST API (1.0.0)

OpenAPI 3.0 specification for Acquia Site Factory REST API

Regenerate ALL users API keys

Regenerate ALL users API keys.

Responses

Response samples

Content type
application/json
{
  • "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

Regenerate a user's API key.

path Parameters
user_id
required
integer

The user ID of the user.

Responses

Response samples

Content type
application/json
{
  • "message": "The API key for user 32 was regenerated.",
  • "server_time": "2014-02-16T20:04:12-06:00"
}

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

Content type
application/json
{
  • "count": 1,
  • "changes": [
    ]
}

Get current centralized role management settings.

Get current centralized role management settings.

Responses

Response samples

Content type
application/json
{
  • "content editor": {
    },
  • "platform admin": {
    },
  • "site builder": {
    },
  • "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

Content type
application/json
{
  • "site_role": "string"
}

Response samples

Content type
application/json
{
  • "content editor": {
    },
  • "platform admin": {
    },
  • "site builder": {
    },
  • "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

Content type
application/json
{
  • "content editor": {
    },
  • "platform admin": {
    },
  • "site builder": {
    },
  • "time": "2022-01-19T08:38:09+00:00"
}

Get list of available stacks.

Fetches the list of available stacks.

Responses

Response samples

Content type
application/json
{
  • "stacks": {
    }
}

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

Content type
application/json
{
  • "name": "string",
  • "command": "string",
  • "interval": "string",
  • "sites_affected": "string",
  • "enabled": 0,
  • "thread_percentage": 0,
  • "stacks": [
    ]
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "time": "2021-11-25T13:18:44+00:00",
  • "count": 2,
  • "cronjobs": [
    ]
}

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

Content type
application/json
{
  • "name": "string",
  • "command": "string",
  • "interval": "string",
  • "sites_affected": "string",
  • "enabled": 0,
  • "thread_percentage": 0,
  • "stacks": [
    ]
}

Response samples

Content type
application/json
{
  • "time": "2021-11-25T13:18:44+00:00",
  • "message": "The cron job has been saved"
}

Delete a cron job.

Delete a cron job.

path Parameters
job_id
required
integer

Cron job id.

Responses

Response samples

Content type
application/json
{
  • "time": "2021-11-25T13:18:44+00:00",
  • "message": "The cron job has been deleted"
}

Get cron job

Get cron job by its id.

path Parameters
job_id
required
integer

Cron job id

Responses

Response samples

Content type
application/json
{
  • "nid": 101,
  • "name": "cron job 1",
  • "stacks": [
    ],
  • "sites_affected": "dev-sites",
  • "interval": "14 0,12 * * *",
  • "drush_command": "cron",
  • "thread_percentage": 60
}

Get domains

Get domains by node ID.

path Parameters
node_id
required
integer

Site node id.

Responses

Response samples

Content type
application/json
{
  • "node_id": 121,
  • "node_type": "site collection",
  • "time": "2016-10-28T09:25:26+00:00",
  • "domains": {
    }
}

Get domain status

Get domain status.

path Parameters
domain_name
required
string

The domain name.

Responses

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "domain_name": "string"
}

Response samples

Content type
application/json
{
  • "node_id": 121,
  • "node_type": "site collection",
  • "domain": "www.domaintoadd.com",
  • "time": "2016-10-28T09:25:26+00:00",
  • "added": true,
  • "messages": [
    ]
}

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

Content type
application/json
{
  • "domain_name": "string"
}

Response samples

Content type
application/json
{
  • "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>."
}

Backfill the current factory standard domain templates.

Backfill the current factory standard domain templates.

Responses

Response samples

Content type
application/json
{
  • "task_id": 1234,
  • "message": "Task has been queued.",
  • "time": "2022-02-16T08:38:09+00:00"
}

Get the current factory standard domain templates.

Get the current factory standard domain templates.

Responses

Response samples

Content type
application/json
{
  • "site_prod": [
    ],
  • "site_nonprod": [
    ],
  • "collection_prod": [
    ],
  • "collection_nonprod": [
    ],
  • "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

Content type
application/json
{
  • "new_template": [
    ]
}

Response samples

Content type
application/json
{
  • "site_prod": [
    ],
  • "site_nonprod": [
    ],
  • "collection_prod": [
    ],
  • "collection_nonprod": [
    ],
  • "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

Content type
application/json
{
  • "site_prod": [
    ],
  • "site_nonprod": [
    ],
  • "collection_prod": [
    ],
  • "collection_nonprod": [
    ],
  • "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

Content type
application/json
{
  • "time": "2016-11-25T13:18:44+00:00",
  • "group_id": 123,
  • "count": 3,
  • "members": [
    ]
}

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

Content type
application/json
{
  • "uids": 0
}

Response samples

Content type
application/json
{
  • "time": "2016-11-25T13:18:44+00:00",
  • "group_id": 123,
  • "uids_added": [
    ]
}

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

Content type
application/json
{
  • "time": "2016-11-25T13:18:44+00:00",
  • "group_id": 123,
  • "uids_removed": [
    ]
}

Get a group

Get a group by group ID.

path Parameters
group_id
required
integer

Group id.

Responses

Response samples

Content type
application/json
{
  • "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
}

Delete a group

Delete a site group.

path Parameters
group_id
required
integer

Group id.

Responses

Response samples

Content type
application/json
{
  • "time": "2016-11-25T13:18:44+00:00",
  • "group_id": 123
}

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

Content type
application/json
{
  • "count": 123,
  • "groups": [
    ]
}

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

Content type
application/json
{
  • "group_name": "string",
  • "parent_id": 0
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "group_name": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "uids": 0
}

Response samples

Content type
application/json
{
  • "time": "2016-11-25T13:18:44+00:00",
  • "group_id": 123,
  • "uids_promoted": [
    ]
}

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

Content type
application/json
{
  • "time": "2016-11-25T13:18:44+00:00",
  • "group_id": 123,
  • "uids_demoted": [
    ]
}

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

Content type
application/json
{
  • "site_ids": 0
}

Response samples

Content type
application/json
{
  • "group_id": 191,
  • "name": "foobargroup",
  • "time": "2020-04-20T10:58:18+00:00",
  • "site_ids_added": [
    ],
  • "message": "One site was successfully added to the site group.",
  • "site_ids_skipped": [
    ]
}

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

Content type
application/json
{
  • "group_id": 191,
  • "name": "foobargroup",
  • "time": "2020-04-20T10:58:18+00:00",
  • "site_ids_removed": [
    ],
  • "message": "One site was successfully removed from the site group.",
  • "site_ids_skipped": [
    ]
}

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

Content type
application/json
{
  • "time": "2021-02-19T12:54:23+00:00",
  • "group_id": 101,
  • "count": 2,
  • "sites": [
    ]
}

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

Content type
application/json
{
  • "profiles": [
    ],
  • "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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "count": 1,
  • "time": "2016-11-25T13:18:44+00:00",
  • "most_recent_data": "2016-11-23",
  • "dynamic_requests": {
    }
}

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

Content type
application/json
{
  • "count": 1,
  • "time": "2016-11-25T13:18:44+00:00",
  • "most_recent_data": "2016-11-23",
  • "dynamic_requests": {
    }
}

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

Content type
application/json
{
  • "paused": true,
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "paused": true,
  • "level": "string"
}

Response samples

Content type
application/json
{
  • "message": "Task processing has been paused.",
  • "task_id": 123,
  • "level": "family"
}

Check service response

Checks whether the API is responding.

Responses

Response samples

Content type
application/json
{
  • "message": "pong",
  • "server_time": "2014-02-16T20:04:12-06:00"
}

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

Content type
application/json
{
  • "count": 4,
  • "roles": {
    }
}

Create a role

Create a role.

Request Body schema: application/json
name
required
string

The name of the role.

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "role_id": 16,
  • "role_name": "content editor"
}

Retrieve a role

Retrieve a role by role ID.

path Parameters
role_id
required
integer

The role ID of the user role.

Responses

Response samples

Content type
application/json
{
  • "rid": 32,
  • "name": "platform admin"
}

Delete a role

Delete a role.

path Parameters
role_id
required
integer

The role ID of the user role.

Responses

Response samples

Content type
application/json
{
  • "role_id": 76,
  • "deleted": true
}

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

Content type
application/json
{
  • "new_name": "string"
}

Response samples

Content type
application/json
{
  • "role_id": 32,
  • "updated": true
}

Get the version of the Site Factory

Gets the (release) version the Site Factory is on.

Responses

Response samples

Content type
application/json
{
  • "factory_version": "2.59.0",
  • "time": "2017-05-11T18:15:19+00:00"
}

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

Content type
application/json
{
  • "count": 111,
  • "time": "2016-11-25T13:18:44+00:00",
  • "collections": [
    ]
}

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

Content type
application/json
{
  • "name": "string",
  • "site_ids": 0,
  • "group_ids": 0,
  • "internal_domain_prefix": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "id": 261,
  • "time": "2016-11-25T13:18:44+00:00",
  • "created": 1489075420,
  • "owner": "admin",
  • "name": "collection1",
  • "internal_domain": "collection1.site-factory.com",
  • "external_domains": [
    ],
  • "groups": [
    ],
  • "sites": [
    ],
  • "primary_site": 236
}

Delete a site collection

Delete a site collection.

path Parameters
collection_id
required
integer

Collection ID.

Responses

Response samples

Content type
application/json
{
  • "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.

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

Content type
application/json
{
  • "site_ids": 0
}

Response samples

Content type
application/json
{
  • "id": 191,
  • "name": "foobarcollection",
  • "time": "2017-04-20T10:58:18+00:00",
  • "site_ids_added": [
    ],
  • "added": true,
  • "message": "One site was successfully added to the site collection.",
  • "warning": [
    ],
  • "site_ids_skipped": [
    ]
}

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

Content type
application/json
{
  • "site_ids": 0
}

Response samples

Content type
application/json
{
  • "id": 191,
  • "name": "foobarcollection",
  • "time": "2017-04-20T10:58:18+00:00",
  • "site_ids_removed": [
    ],
  • "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

Content type
application/json
{
  • "site_id": 0
}

Response samples

Content type
application/json
{
  • "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."
}

Get current site guard config.

Get current site guard config.

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "message": "Please log in",
  • "password": "password1",
  • "time": "2022-03-28T08:46:11+00:00",
  • "username": "test"
}

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

Content type
application/json
{
  • "message": "string",
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "message": "The configuration options have been saved.",
  • "time": "2022-01-19T08:38:09+00:00"
}

Disable the site guard config.

Disable the site guard config.

Responses

Response samples

Content type
application/json
{
  • "message": "The configuration options have been saved.",
  • "time": "2022-01-19T08:38:09+00:00"
}

Get current site ownership settings.

Get current site ownership settings.

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "uid": 1234,
  • "username": "john.doe",
  • "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

Content type
application/json
{
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "message": "The configuration options have been saved.",
  • "time": "2022-01-19T08:38:09+00:00"
}

Delete the site ownership settings.

Delete the site ownership settings.

Responses

Response samples

Content type
application/json
{
  • "message": "Site ownership assignment feature has been disabled.",
  • "time": "2022-01-19T08:38:09+00:00"
}

Get current site update priority.

Get current site update priority.

Responses

Response samples

Content type
application/json
{
  • "priority": {
    },
  • "time": "2022-03-16T10:03:26+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

Content type
application/json
{
  • "priority": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "The configuration options have been saved.",
  • "time": "2022-01-19T08:38:09+00:00"
}

Reset the site update priority.

Reset the site update priority.

Responses

Response samples

Content type
application/json
{
  • "message": "Site update priority has been removed.",
  • "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

Content type
application/json
{
  • "count": 111,
  • "sites": [
    ]
}

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

Content type
application/json
{
  • "site_name": "string",
  • "group_ids": [
    ],
  • "install_profile": "string",
  • "stack_id": 0
}

Response samples

Content type
application/json
{
  • "id": 191,
  • "site": "site1",
  • "domains": [
    ],
  • "task_id": 12345
}

Site details

Get detailed information about a site.

path Parameters
site_id
required
integer

Site ID

Responses

Response samples

Content type
application/json
{
  • "id": 123,
  • "created": 1397483647,
  • "owner": "John Drupal",
  • "site": "site1",
  • "stack_id": 1,
  • "db_name": "bdpref196",
  • "domains": [
    ],
  • "groups": [
    ],
  • "part_of_collection": true,
  • "is_primary": true,
  • "collection_id": 241,
  • "collection_domains": [
    ],
  • "external_theme": {
    }
}

Site delete

Delete a site.

path Parameters
site_id
required
integer

Site ID

Responses

Response samples

Content type
application/json
{
  • "id": 123,
  • "owner": "johnsmith",
  • "site": "unicorns",
  • "time": "1970-01-01T01:02:03+00:00",
  • "task_id": 16
}

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

Content type
application/json
{
  • "site_name": "string",
  • "group_ids": [
    ],
  • "exact_copy": true
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "label": "string",
  • "callback_url": "string",
  • "callback_method": "string",
  • "caller_data": "string",
  • "components": [
    ]
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "backups": [
    ]
}

Get a temporary site backup URL

Get temporary site backup URL.

path Parameters
site_id
required
integer

Site ID

backup_id
required
integer

Backup ID

query Parameters
lifetime
integer

The number of seconds the temporary URL is good for.

Responses

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "target_site_id": 0,
  • "backup_id": 0,
  • "callback_url": "string",
  • "callback_method": "string",
  • "caller_data": "string",
  • "components": [
    ]
}

Response samples

Content type
application/json
{
  • "task_id": 1024
}

Clear a site's caches

Clear Drupal and Varnish caches for a site.

path Parameters
site_id
required
integer

Site ID

Responses

Response samples

Content type
application/json
{
  • "id": 123,
  • "time": "2017-05-04T09:25:26+00:00",
  • "task_ids": {
    }
}

Retrieve available environments

Retrieves available environments user can stage to.

Responses

Response samples

Content type
application/json
{
  • "environments": {
    }
}

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

Content type
application/json
{
  • "to_env": "string",
  • "sites": [
    ],
  • "wipe_target_environment": true,
  • "wipe_stacks": [
    ],
  • "synchronize_all_users": true,
  • "detailed_status": true,
  • "skip_site_files": true,
  • "skip_site_files_overwrite": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Staging deployment has been initiated - WIP123.",
  • "task_id": 123
}

Get service status information

Get a service status report.

Responses

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "all": "string",
  • "site_creation": "string",
  • "site_duplication": "string",
  • "domain_management": "string",
  • "bulk_operations": "string"
}

Response samples

Content type
application/json
{
  • "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 class information.

Return data about WIP classes

path Parameters
type
required
string

Either "softpaused" or "softpause-for-update"

Responses

Response samples

Content type
application/json
[
  • "Acquia\\SfSite\\SiteInstall"
]

(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

Content type
application/json
[
  • {
    }
]

(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

Content type
application/json
[
  • {
    }
]

Delete tasks from the work pool.

Delete a task and its descendants.

path Parameters
task_id
required
integer

Task ID.

Responses

Response samples

Content type
application/json
{
  • "message": "Task 123 has been deleted.",
  • "time": "1970-01-01T00:00:00+00:00",
  • "task_id": 123
}

Terminate tasks in the work pool.

Terminate a task and its descendants.

path Parameters
task_id
required
integer

Task ID.

Responses

Response samples

Content type
application/json
{
  • "message": "Task 123 has been queued for termination.",
  • "time": "1970-01-01T00:00:00+00:00",
  • "task_id": 123
}

Get current task log settings.

Get current task log settings.

Responses

Response samples

Content type
application/json
{
  • "wip_log_maximum_level": {
    },
  • "wip_log_level": {
    }
}

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

Content type
application/json
{
  • "wip_log_level": "string",
  • "wip_log_maximum_level": "string"
}

Response samples

Content type
application/json
{
  • "message": "The configuration options have been saved.",
  • "time": "2022-01-19T08:38:09+00:00"
}

Reset task log settings.

Reset task log settings.

Responses

Response samples

Content type
application/json
{
  • "message": "The configuration options have been reset to their default values.",
  • "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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "sitegroup_id": "string"
}

Response samples

Content type
application/json
{
  • "message": "The request to process theme notification has been accepted.",
  • "sitegroups": [
    ],
  • "time": "2014-05-02T16:21:25+00:00"
}

Site external theme refresh

Refreshes the site's themes from the external theme repository.

path Parameters
site_id
required
integer

Site ID.

Responses

Response samples

Content type
application/json
{
  • "id": 121,
  • "accepted": true,
  • "time": "2024-05-11T18:15:19+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

Content type
application/json
{
  • "vcs_url": "string",
  • "vcs_path": "string"
}

Response samples

Content type
application/json
{
  • "id": 121,
  • "vcs_url": "git@github.com:user/repo.git",
  • "vcs_path": "master",
  • "time": "2020-01-09T15:57:24+00:00"
}

Delete site external theme

Deletes the site's external theme data.

path Parameters
site_id
required
integer

Site ID.

Responses

Response samples

Content type
application/json
{
  • "id": 121,
  • "accepted": true,
  • "time": "2024-05-11T18:15:19+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

Content type
application/json
{
  • "scope": "string",
  • "event": "string",
  • "nid": 0,
  • "theme": "string",
  • "uid": 0
}

Response samples

Content type
application/json
{
  • "message": "The site.modify notification has been received.",
  • "time": "2014-02-16T20:04:12-06:00",
  • "notification": {
    }
}

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).

email
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

Content type
application/json
{
  • "username": "string",
  • "email": "string",
  • "force_transfer": true
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "message": "Update initiated.",
  • "task_id": 123
}

List updates

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

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

Content type
application/json
{
  • "statuses": {
    },
  • "message": "Update complete",
  • "percentage": 100,
  • "start_time": 1423862773,
  • "end_time": 1423865337,
  • "id": 4726,
  • "docroot_pairs": [
    ]
}

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

Content type
application/json
{
  • "pause": true
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "count": 6,
  • "users": [
    ]
}

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

Content type
application/json
{
  • "name": "string",
  • "mail": "string",
  • "pass": "string",
  • "status": 0,
  • "roles": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "uid": "32",
  • "name": "Mark",
  • "mail": "mark@example.com",
  • "created": "1449070860",
  • "login": "1449071036",
  • "status": "1",
  • "roles": {
    },
  • "tfa_status": "active"
}

Delete a user

Delete a user.

path Parameters
user_id
required
integer

The user ID of the user.

Responses

Response samples

Content type
application/json
{
  • "user_id": 76,
  • "deleted": true
}

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.

mail
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

Content type
application/json
{
  • "name": "string",
  • "mail": "string",
  • "pass": "string",
  • "status": 1,
  • "roles": "string",
  • "tfa_status": 1
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "available": [
    ],
  • "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

Content type
application/json
{
  • "wip_task": {
    },
  • "time": "2014-05-02T16:21:25+00:00"
}