ibm-cloudcompose-db

How to retrieve the APIKEY for a Compose database instance on Bluemix?


The Compose documentation describes how a backup can be initiated:

export APIKEY=your_apikey_here
export DEPLOYMENT=your_deployment_id

curl -X POST -H "Authorization: Bearer $APIKEY" -H "Content-Type: application/json" "https://api.compose.io/2016-07/deployments/${DEPLOYMENT}/backups"

I would like to execute this API call against a 'Standard' Compose database running on Bluemix (not Compose Enterprise).

The DEPLOYMENT_ID is available in the VCAP_SERVICES json, but I can't find the APIKEY - where can I find this?


Solution

  • The docs you refer to are specifically for the Compose native API and not for the IBM Cloud (now) Compose API.

    The IBM Cloud Compose API arrived in public in November - https://www.ibm.com/blogs/bluemix/2017/11/opening-the-compose-api-on-the-ibm-cloud/.

    Consult https://www.compose.com/articles/the-ibm-cloud-compose-api/ for details on how to use it and where to retrieve appropriate IBM Cloud API keys, which IBM Cloud endpoints to use and what Compose API calls are available (Spoiler: Yes, you can do on demand backups from there).