Information for: DEVELOPERS   PARTNERS

Migrating from Cloud API v1 to v2

As part of your preparation for the end-of-life of Acquia Cloud API v1, you should perform the following steps to migrate your application from Acquia Cloud API v1 to v2:

Selecting your toolkit

Unlike v1, Acquia Cloud API v2 does not provide a Drush toolkit. You can create your own tooling, or use freely available frameworks for RESTful APIs. The following open-source tools do not include all v2 endpoints, but can assist you in developing your application:

Note

Although Acquia can’t provide the same level of support for these community projects as our own products, they’re included here because we’re aware many of our customers have found the tools helpful.

Create your authentication token

All Acquia Cloud API calls require authentication to work properly. Acquia Cloud API v2 authenticates using an OAuth token. For instructions on generating your token, see Cloud API v2 authentication.

Switching to v2 calls in your codebase

You will need to review any code that you have that uses Drush commands that depend on Acquia Cloud API v1. If you find any of these commands in your code, you must replace the commands with their equivalent Acquia Cloud API v2 endpoints.

Note

The Acquia Cloud API v2 endpoints included on this page are only those endpoints that correspond with the Acquia Cloud API v1-based Drush commands listed on this page.

For a complete list of endpoints, see the Acquia Cloud API v2 reference.

Drush commands not available in Acquia Cloud API v2

The following Acquia Cloud API v1-based Drush commands do not exist in the Acquia Cloud API v2, but have the following exact or approximate equivalents:

Drush command Acquia Cloud API v2 endpoint
ac-code-deploy POST /environments/{environmentId}/code
ac-code-path-deploy POST /environments/{environmentId}/code/actions/switch
ac-database-add POST /applications/{applicationUuid}/databases
ac-database-copy POST /environments/{environmentId}/databases
ac-database-delete DELETE /environments/{environmentId}/databases/{databaseName}/backups/{backupId}
ac-database-info GET /environments/{environmentId}/databases/{databaseName}
ac-database-instance-backup POST /environments/{environmentId}/databases/{databaseName}/backups
ac-database-instance-backup-delete DELETE /environments/{environmentId}/databases/{databaseName}/backups/{backupId}
ac-database-instance-backup-info GET /environments/{environmentId}/databases/{databaseName}/backups/{backupId}
ac-database-instance-backup-list GET /environments/{environmentId}/databases/{databaseName}/backups
ac-database-instance-backup-restore POST /environments/{environmentId}/databases/{databaseName}/backups/{backupId}/actions/restore
ac-database-instance-info GET /environments/{environmentId}/databases/{databaseName}
ac-database-instance-list GET /environments/{environmentId}/databases
ac-domain-add POST /environments/{environmentId}/domains
ac-domain-delete DELETE /environments/{environmentId}/domains/{domain}
ac-domain-info No exact equivalent; GET /environments/{environmentId}/domains is similar
ac-domain-move No exact equivalent; combine POST /environments/{environmentId}/domains and DELETE /environments/{environmentId}/domains/{domain} endpoints for similar results
ac-domain-purge POST /environments/{environmentId}/domains/actions/clear-varnish
ac-environment-info GET /environments/{environmentId}
ac-environment-install POST /environments/{environmentId}/code/actions/import
ac-environment-list GET /applications/{applicationUuid}/environments
ac-environment-livedev Enable: POST /environments/{environmentId}/livedev/actions/enable
Disable: POST /environments/{environmentId}/livedev/actions/disable
ac-files-copy POST /environments/{environmentId}/files
ac-server-info GET /environments/{environmentId}/servers/{serverId}
ac-server-list GET /environments/{environmentId}/servers
ac-site-info GET /applications/{applicationUuid}
ac-sshkey-add POST /account/ssh-keys
ac-sshkey-info GET /account/ssh-keys/{sshKeyUuid}
ac-task-info No exact equivalent; GET /applications/{applicationUuid}/tasks is similar
ac-task-list GET /applications/{applicationUuid}/tasks
acquia-update No exact equivalent; GET /account/drush-aliases/download is similar