Loading...


Related Products


Date Published: April 18, 2025

Delete a site backup in Site Factory

To delete a site backup in your Site factory, you need to call an  v1 REST API endpoint: DELETE /api/v1/sites/{site_id}/backups/{backup_id}

Check your API access

  • Get your API key.

Each of the Site Factory API calls requires you to enter your Site Factory username and API key to either complete the action or to return results. To obtain your API key, complete the following steps:

  1. Sign in to your Site Factory Management Console using an account with the platform admin role.
  2. In the admin menu, click your username.
  3. Click the API key tab.

Site Factory displays your API key. Due to the key being required for use by the different Site Factory API calls, save the key to a text file or some other secure location.

  • Check your Acquia Cloud Platform permissions for accessing API endpoints.

To view all documentation endpoints in the Site Factory API, you must first sign in to your Site Factory Management Console as a user with either the developer or release engineer role.

  • Test your connection with your Site Factory.
  1. Open a command prompt, and then enter the following command:

    curl 'https://[site_URL]/api/v1/ping' -u [user_name]:[api_key]

    Where:

    • [site URL] is the URL of your Site Factory Management Console.
    • [user_name] is your Site Factory Management Console user account name.
    • [api_key] is your user account's API key from the Site Factory Management Console.
  2. Verify that the API call returns results similar to the following:

    {"message":"pong","server_time":"2014-11-18T13:44:57+00:00"}

Call the endpoint

To call the endpoint you need the:

  • site_id
  • backup_id

You can call `GET /api/v1/sites` and `GET /api/v1/sites/{site_id}/backups` endpoints but it's easier to get both just by looking at the site backup page, and hovering the Download link.

In this example the site_id is 2296 and the backup_id is 401

curl 'https://[site_URL]/api/v1/sites/[site_id]/backups/[backup_id]' -X DELETE -H Content-Type: application/json -v -u username:apikey

The response is a task id. 

{
  "task_id": 16
}

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation