With Copilot
Acquia Copilot is a conversational AI connected into our product documentation and knowledge base. Ask Copilot about product features, technical details, troubleshooting and how to get started with Acquia products.
Sign in to use Acquia Copilot
Site Factory includes a REST API that you can use to create and manage your hosted websites, and to obtain the status of jobs in your Site Factory Management Console.
Note
You cannot use the Cloud Platform API to access or interact with Site Factory environments.
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:
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.
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 the developer or release engineer role.
Attempting to access the Site Factory API as an anonymous user, or not having the appropriate role when signing in to the Site Factory Management Console, will cause the Site Factory API website to not display all available endpoints.
Similar to many other APIs, the Site Factory API uses standard HTTP methods to communicate with the service, including GET, PUT, and POST.
After you ensure that you can access all of the available endpoints in the Site Factory API, you can view the list of API calls on your instance of Site Factory, along with specific parameters and examples of their use, at the following URLs (where [site_URL] is the URL of your Site Factory interface):
https://[site_URL]/api/v1
https://[site_URL]/api/v2You can also review complete documentation for all of the available Site Factory API methods by visiting the Site Factory API Reference or view customer Factory API examples.
Here are some examples of the methods provided in the Site Factory API:
| REST API call | Description |
|---|---|
groups | Obtain a group listing, or create a group |
ping | Determine if the API is responding |
sites | Create, duplicate, or manage backups and third-party themes for a website |
stage | Start the staging process |
status | Obtain or modify the status of the factory |
theme | Retrieve the deployment key, required by third-party theme repositories |
users | Create, modify, list, or delete user accounts in the factory |
For complete documentation, see the Site Factory API Reference.
When you first start using the Site Factory API, we encourage you to use the ping call to test your connection to the API. To do this, complete the following steps:
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 ConsoleVerify that the API call returns results similar to the following:
{"message":"pong","server_time":"2014-11-18T13:44:57+00:00"}Staging environments do not have access to the SSL certificates that are made available to production environments, so you must append the -k command line switch to your curl command when you make calls to a staging environment using the Site Factory API.
For example, using the ping call on a staging environment would require a command similar to the following:
curl 'https://[site_URL]/api/v1/ping' -u [user_name]:[api_key] -kSite Factory administrators can use the Site Factory Management Console or the Site Factory API to reset API keys of an individual user, or all users. Users can also reset their own API key. For more information, see Resetting API keys on Site Factory.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.