Bloomreach Cloud API - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS

Bloomreach Cloud API

The API documentation is available at https://api.<stack-name>.bloomreach.cloud/v3/docs. In order to determine the stack name, the easiest is to look at the URL of Mission Control: the word that comes after 'https://missioncontrol-' is the stack name.

It is best to use HTTP 1.1 to access the API to avoid side-effects of HTTP 2. Also notice that when doing CI/CD, the authentication token expires after 10 minutes, so it is best to have a single function that takes cares of the login and refresh of the token when 9 minutes have elapsed (see API docs on /v3/authn/refresh_token).


On a UNIX system, you can use curl to make API calls from the command line.

First, log in:

$ curl -X POST -H "Content-Type: application/json" -d '{"username":"[email protected]","password":"yourpassword"}' https://api.<stack-name>.bloomreach.cloud/v3/authn/access_token

Note the authentication token in the response:

{"token_type":"Bearer","access_token":"eyJhbG.......nkwZUWBBc","refresh_token":"d0ce....8cc3ee7c6"}

Next, use the authentication token from the previous response in subsequent calls.

For example, to upload a distribution:

curl -H "Authorization: Bearer eyJhbG.......nkwZUWBBc" -X POST https://api.<stack-name>.bloomreach.cloud/v3/distributions -F '[email protected]/path/to/distribtution/distribution.tar.gz'
Note that in the above command the curl -F option will set the correct content type. If you are using other tools please refer to the API documentation and the tooling documentation to create the correct call.

You can also use the following script to add new user, though you require groovy to execute it. Replace the desired value in 'apiBase', you are good to add new users. Note that it does not do error handling/feedback very well.

 

Set up Continuous Deployment of your brXM Project in brCloud using Jenkins on the Bloomreach Developer Blog provides an example of how to set up continuous deployment using the Bloomreach Cloud API.

Tip: make sure you do not add a trailing slash to the end of the path. This will result in an error.

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?