Information for: DEVELOPERS   PARTNERS

Developing with the Acquia Cloud API

To enable you to extend, enhance, and customize Acquia Cloud for your organization’s needs, Acquia Cloud includes the Acquia Cloud API, a RESTful web interface for these types of changes.

The Acquia Cloud API v2 (API documentation) includes over 200 endpoints to enhance developer workflow, website management, and provisioning capabilities, such as:

Note

For information regarding the now deprecated Acquia Cloud API v1, see Cloud API v1 authentication.

Getting started

To get started with your use of the Acquia Cloud API, select the version of the API you will be using:

Before you can use the Acquia Cloud API, you must generate your API token, as described in Cloud API v2 authentication.
For information about getting started with Acquia Cloud API v1, see Cloud API v1 authentication.

What can the Acquia Cloud API do?

You can use the Acquia Cloud API to do many of the tasks that are needed as part of your daily application development and continuous integration process.

  • Workflow: Deploy code, databases, and user-uploaded files across your Development, Staging, and Production environments. The Acquia Cloud API enables you to run any branch or tag from your Git repository in any environment as you can do from the Acquia Cloud interface. This allows you to automate these functions, instead of having to log in to the Acquia Cloud interface and manually drag elements from one environment to another.
  • Backups: Create, restore, and delete backups of your application’s databases. Acquia Cloud fully supports Drupal multisite installations, with as many databases per codebase as you need.
  • Application Information: Retrieve current information about your application and its environments, including deployed code, databases, backups, and tasks.
  • Task information: Check the progress and completion status of ongoing tasks that support the notificationUuid parameter.
  • User Roles and Permissions: The Acquia Cloud API allows you to work with roles and permissions as you would do from the Acquia Cloud interface. You can create and remove teams, add or remove members from teams, or modify which applications are associated to which teams. Automate any functions you perform on a regular basis.

Notable to the Acquia Cloud API is its integration with Cloud Hooks, which allows you automate nearly any action to be performed along with your workflow actions. You can do the following:

  • Perform Drupal database updates or run your test suite when new code is deployed, and roll back to a previous release if the tests fail.
  • Scrub your Production database when it is copied to Development or Staging by removing customer emails or disabling production-only modules.
  • Check the progress and completion status of ongoing tasks.
  • Integrate with third-party services, for example, by performing a Blitz.io performance test, when you deploy new code.

Comparing Acquia Cloud API versions

With more robust documentation and monitoring, the Acquia Cloud API v2 provides additional functionality as compared to Acquia Cloud API v1, as described in the following table:

Category Acquia Cloud API v2 Acquia Cloud API v1
Development focus Manage deployments, plus any other task available in the Acquia Cloud user interface Manage deployments
Documentation http://cloudapi-docs.acquia.com/ https://cloudapi.acquia.com/
Framework OpenAPI (none)
Authentication method Uses a key/secret pair to generate OAuth tokens HTTP Basic Authentication over SSL; uses a private key (viewable at cloud.acquia.com) to generate a token
How to call an endpoint Build your own tooling, or use open source tooling to get started, such as the Typhonius PHP SDK or Typhonius CLI. Drush commands

Permissions for accessing the Acquia Cloud API

The roles and permissions assigned to your Acquia Cloud account determine how you interact with the Acquia Cloud API, by version.

Unlike Acquia Cloud API v1, you are not required to have the Access the Cloud API permission to use the Acquia Cloud API.

For information about assigning permissions to users in your organization, see Working with roles and permissions.

Users must have the Access the Cloud API permission to use the Acquia Cloud API. By default, all users with the Team Lead, Senior Developer, and Administrator roles have the Access the Cloud API permission, while users with only the Developer role do not. Administrators can modify the permissions of existing roles, or add new custom roles with the desired permissions. For more information, see Editing a role.

Users who have the Access the Cloud API permission can use Acquia Cloud API to take most of the actions enabled by the Acquia Cloud interface, and are not constrained by any other permissions in their use of the Acquia Cloud API.

Rate limits in the Acquia Cloud API

To prevent a single user from adversely affecting shared resources, Acquia Cloud API calls are limited to 100 calls per minute. Acquia Cloud API calls exceeding the rate limit receive an HTTP 429 Too Many Requests status code response containing a Retry-After header, containing the number of seconds until Acquia Cloud API calls will be unblocked.

Additional resources