Back to top

BloomReach Cloud API

API that drives the BloomReach Cloud platform

Resource Group

Authentication

All authentication related endpoints

Login
POST/v3/authn/access_token

Create a JWT access token from the submitted credentials.

Token lifetimes:

  • The access token is valid for 10 minutes.

  • The refresh token is valid for 24 hours.

Example URI

POST /v3/authn/access_token
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "username": [your-username],
    "password": [your-password]
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "token_type": "bearer",
    "access_token": [jwt-token]
    "refresh_token": [refresh-token]
}
Response  401
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "error_code": "AuthenticationFailed",
    "error_detail": [detail message]
}

Validate access token
GET/v3/authn/verify_token

Example URI

GET /v3/authn/verify_token
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: bearer 5262d64b892e8d4341000001
Response  200
HideShow
Headers
X-User-Id: [ user-id ]
X-User-Role: [ user-role ]
Response  401

Generate new access token from refresh token
POST/v3/authn/verify_token

Example URI

POST /v3/authn/verify_token
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "grant_type": "refresh_token",
    "refresh_token": [your-refresh-token]
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "token_type": "bearer",
    "access_token": [jwt-token]
}
Response  401

Delete refresh token
DELETE/v3/authn/refresh_token

Example URI

DELETE /v3/authn/refresh_token
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "grant_type": "refresh_token",
    "refresh_token": [your-refresh-token]
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8

Logout
POST/v3/authn/logout

Logout user by invalidating all user’s access tokens

Example URI

POST /v3/authn/logout
Request
HideShow
Headers
Authorization: [ access token ]
Response  200
Response  401

Distributions

Handles the distribution file operations

List distributions
GET/v3/distributions

List distribution files

Example URI

GET /v3/distributions
Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "offset": 0,
  "max": 100,
  "count": 6,
  "more": false,
  "total": 6,
  "items": [
    {
      "ID": "4B36A01A8EBA74B7",
      "name": "cms-4.1.0-distribution.tar.gz",
      "createdAt": "2017-12-07T15:12:35+00:00",
      "createdBy": "john.doe@bloomreach.com",
      "modifiedAt": "2017-12-07T15:12:35+00:00",
      "modifiedBy": "john.doe@bloomreach.com",
    }
  ]
}
Response  400

Upload distribution
POST/v3/distributions

Upload a distribution file

Example URI

POST /v3/distributions
Request
HideShow
Headers
Authorization: [ authentication token ]
Content-type: [ multipart/form-data ]
Body
dist_file: [ file path location of the distribution file ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "4B36A01A8EBA74B7",
  "distributionName": "dist_file",
  "createdBy": "john.doe@bloomreach.com",
  "createdAt": "2018-12-07T15:12:35+00:00",
  "modifiedAt": "",
  "modifiedBy": "",
  "md5hash": "a9e1ad378cce8be60be89c1f7f1682a7"
}
Response  400

Distribution Info
GET/v3/distributions/{ID}

Retrieve distribution file information. The modifiedXx fields are updated when the file is renamed.

Example URI

GET /v3/distributions/ID
URI Parameters
HideShow
ID
string (required) 

Distribution file ID

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "E2E3927146F011A3",
  "name": "cms-5.2-tar.gz",
  "createdAt": "2017-12-07T15:12:35+00:00",
  "createdBy": "john.doe@bloomreach.com",
  "modifiedAt": "2017-15-07T15:13:45+00:00",
  "modifiedBy": "marry.doe@bloomreach.com",
  "md5hash": "a9e1ad378cce8be60be89c1f7f1682a7"
}

Rename distribution
PATCH/v3/distributions/{ID}

Rename a distribution file. The modifiedXx fields are updated when the file is renamed.

Example URI

PATCH /v3/distributions/ID
URI Parameters
HideShow
ID
string (required) 

Distribution file ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
  "name": "new_distribution_file_name.tgz"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "E2E3927146F011A3",
  "name": "new_distribution_file_name.tgz",
  "createdAt": "2017-12-07T15:12:35+00:00",
  "createdBy": "john@bloomreach.com",
  "modifiedAt": "2017-12-07T15:12:35+00:00",
  "modifiedBy": "marry@bloomreach.com",
  "md5hash": "a9e1ad378cce8be60be89c1f7f1682a7"
}

Delete a distribution
DELETE/v3/distributions/{ID}

Delete a distribution file

Example URI

DELETE /v3/distributions/ID
URI Parameters
HideShow
ID
string (required) 

Distribution file ID

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
true

AppConfigFiles

An appConfigFile can be used as a configuration file for a distribution per environment. Note that it is not possible to view or download an appConfigFile for security reasons. So it is recommended to store configuration files in a secrets manager and/or put them under version control depending on the sensitivity of the content. Use the md5 hash to check the uploaded file against the local file. Since a cms deploy is tight to a distribution and its appConfigFiles, their file names need to be unique. We recommend semantic versioning for the appConfigFile names to ensure uniqueness. See the deploy end point for more information.

List appConfigFiles
GET/v3/appConfigFiles

List appConfigFiles

Example URI

GET /v3/appConfigFiles
Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  [
    {
      "ID": "4B36A01A8EBA74B7",
      "name": "cms-4.1.0-appConfigFile.tar.gz",
      "createdAt": "2017-12-07T15:12:35+00:00",
      "createdBy": "john.doe@bloomreach.com",
      "modifiedAt": "2017-12-07T15:12:35+00:00",
      "modifiedBy": "john.doe@bloomreach.com",
      "md5hash": "a9e1ad378cce8be60be89c1f7f1682a7"
    }
  ]
}
Response  400

Upload appConfigFile
POST/v3/appConfigFiles

Upload an appConfigFile file.

Example URI

POST /v3/appConfigFiles
Request
HideShow
Headers
Authorization: [ authentication token ]
Content-type: [ multipart/form-data ]
Body
appconfigfile: [ file path location of the appConfigFile ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "4B36A01A8EBA74B7",
  "name": "license.properties",
  "createdBy": "john.doe@bloomreach.com",
  "createdAt": "2018-12-07T15:12:35+00:00",
  "modifiedAt": "",
  "modifiedBy": "",
  "md5hash": "a9e1ad378cce8be60be89c1f7f1682a7"
}
Response  400

AppConfigFile Info
GET/v3/appConfigFiles/{ID}

Retrieve appConfigFile file information. The modifiedXx fields are updated when the file is renamed.

Example URI

GET /v3/appConfigFiles/ID
URI Parameters
HideShow
ID
string (required) 

appConfigFile ID

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "4B36A01A8EBA74B7",
  "name": "license.properties",
  "createdBy": "john.doe@bloomreach.com",
  "createdAt": "2018-12-07T15:12:35+00:00",
  "modifiedAt": "",
  "modifiedBy": "",
  "md5hash": "a9e1ad378cce8be60be89c1f7f1682a7"
}

Rename appConfigFile
PATCH/v3/appConfigFiles/{ID}

Rename an appConfigFile file. The modifiedXx fields are updated when the file is renamed.

Example URI

PATCH /v3/appConfigFiles/ID
URI Parameters
HideShow
ID
string (required) 

file ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
  "name": "newlicense.properties"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "E2E3927146F011A3",
  "name": "license.properties",
  "createdAt": "2017-12-07T15:12:35+00:00",
  "createdBy": "john@bloomreach.com",
  "modifiedAt": "2017-12-07T15:12:35+00:00",
  "modifiedBy": "marry@bloomreach.com",
  "md5hash": "a9e1ad378cce8be60be89c1f7f1682a7"
}

Delete appConfigFile
DELETE/v3/appConfigFiles/{ID}

Delete appConfigFile file

Example URI

DELETE /v3/appConfigFiles/ID
URI Parameters
HideShow
ID
string (required) 

Distribution file ID

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
true

Domains

Domains are used to direct incoming traffic with a host that matches the domain name to a specified environment.

List domains
GET/v3/domains

Example URI

GET /v3/domains
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ access token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "ID": "537980ce-beb3-467e-9f86-21a0cb4ee5a2",
    "name": "example.onehippo.io",
    "environmentId": "f69faf92-2ecd-4ade-a250-90172cb28d8c",
    "createdAt": "2018-02-21T16:27:04+00:00",
    "createdBy": "hippo-ondemand@bloomreach.com",
    "updatedAt": "",
    "updatedBy": ""
  }
]

Get domain
GET/v3/domains/{ID}

Example URI

GET /v3/domains/ID
URI Parameters
HideShow
ID
string (required) 

Domain ID

Request
HideShow
Headers
Authorization: [ access token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "537980ce-beb3-467e-9f86-21a0cb4ee5a2",
  "name": "example.onehippo.io",
  "environmentId": "f69faf92-2ecd-4ade-a250-90172cb28d8c",
  "createdAt": "2018-02-21T16:27:04+00:00",
  "createdBy": "hippo-ondemand@bloomreach.com",
  "updatedAt": "",
  "updatedBy": ""
}

Get domain by name
GET/v3/domains/?name=:domain_name

Example URI

GET /v3/domains/?name=:domain_name
Request
HideShow
Headers
Authorization: [ access token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "537980ce-beb3-467e-9f86-21a0cb4ee5a2",
  "name": "example.onehippo.io",
  "environmentId": "f69faf92-2ecd-4ade-a250-90172cb28d8c",
  "createdAt": "2018-02-21T16:27:04+00:00",
  "createdBy": "hippo-ondemand@bloomreach.com",
  "updatedAt": "",
  "updatedBy": ""
}

Add a new domain
POST/v3/domains

Add a new domain. This will direct incoming traffic with a host that matches the domain name to the specified environment. The name field is required and must be unique to add a domain. The name must resememble a domain like for example customer.com or www.customer.com and the name must match with one of the subject alternative names (SAN) in the customers SSL certificate.
This SSL certificate must be configured in the stack by the BRC team. The environmentId is optional. This allows the domains to be specified upfront and used later on.

Example URI

POST /v3/domains
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
    "name": "customer.com",
    "environmentId": "f69faf92-2ecd-4ade-a250-90172cb28d8c"",
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "537980ce-beb3-467e-9f86-21a0cb4ee5a2",
  "name": "example.onehippo.io",
  "environmentId": "f69faf92-2ecd-4ade-a250-90172cb28d8c",
  "createdAt": "2018-02-21T16:27:04+00:00",
  "createdBy": "hippo-ondemand@bloomreach.com",
  "updatedAt": "",
  "updatedBy": ""
}

Update an existing domain
PUT/v3/domains/{ID}

Update the fields ‘name’ and ‘environmentId’ of an existing domain by passing in the domain id on the path. See the section Add a new domain on the requirements of the field name.

Example URI

PUT /v3/domains/ID
URI Parameters
HideShow
ID
string (required) 

Domain ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
    "name": "customer.com",
    "environmentId": """,
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "537980ce-beb3-467e-9f86-21a0cb4ee5a2",
  "name": "example.onehippo.io",
  "environmentId": "",
  "createdAt": "2018-02-21T16:27:04+00:00",
  "createdBy": "hippo-ondemand@bloomreach.com",
  "updatedAt": "2018-03-11T13:22:04+00:00",
  "updatedBy": "hippo-ondemand@bloomreach.com"
}

Delete a domain
DELETE/v3/domains/:domainId

Example URI

DELETE /v3/domains/:domainId
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Response  200
HideShow
Body
{}

Environments

An environment is the place where a cms deployment lives. An environment requires a distribution to be deployed, optionally together with configuration files (called AppConfigFiles). The required resources like a database and Elasticsearch are provided by the environment.

List environments
GET/v3/environments

List all the environments

Example URI

GET /v3/environments
Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "count": 4,
  "items": [
    {
      "ID": "F84A857BEBD63BEF",
      "name": "samefile",
      "url": "samefile-testing.onehippo.io",
      "createdAt": "2017-12-07T15:12:35+00:00",
      "createdBy": "john@bloomreach.com",
      "deployedAt": "2017-12-07T15:14:42+00:00",
      "deployedBy": "marry@bloomreach.com",
      "distributionId": "81DF6E9CDCDA1813",
      "state": "deployed",
      "configuration": {
      "bootstrap": false,
      "virtualHosts": ["samefile-testing.onehippo.io"]
    }
  ],
  "max": -1,
  "more": false,
  "offset": 0,
  "total": 4
}

Create Environment
POST/v3/environments

Create a new environment

Example URI

POST /v3/environments
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
  "name": "new-environment-name"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "5CE3C71610E60DE8",
  "name": "mar06-qa01",
  "url": "new-env-name-testing.onehippo.io",
  "createdAt": "2017-12-07T15:12:35+00:00",
  "createdBy": "hippo-ondemand@bloomreach.com",
  "deployedAt": "",
  "deployedBy": "",
  "distributionId": "",
  "state": "",
  "configuration": {
    "bootstrap": false,
    "virtualHosts": [
      "mar06-qa01-testing.onehippo.io"
    ]
  }
}

Deploy distribution
PUT/v3/environments/{environmentId}/deploy

Deploy a distribution to an environment. This will start the CMS application within the distribution.

The deploy payload has an optional field called ‘strategy’. If its value is “stopstart” then this means that BRC will first stop the environment and then deploy the distribution. Especially when developing the project this is useful as the initialization is triggered by one container and the other containers need to wait. If strategy is not specified, BRC will do a rolling update. This requires the new distribution to be backward compatible! It is safer for development purposes to do stopstart.

The deploy payload supports cms application configuration files (optional). The role of the file can be either ‘file’ which means it will be copied to the cms container as is or the role can be ‘systemproperty’. In the latter case the file is treated as a Java system property file and its key value pairs will be passed on as Java system properties to the Java runtime. If the role is ‘file’ then it is also possible to specify a new filename for the file to be copied (optional). Since configuration file names need to be unique, this comes in very handy as the distribution can use the same filename to read a configuration file.

Example URI

PUT /v3/environments/environmentId/deploy
URI Parameters
HideShow
environmentId
string (required) 

Environment ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
    "distributionId": "F8A4CFAF8740B2C8",
    "strategy" : "stopstart",

}
Response  202
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
""
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
  "distributionId": "F8A4CFAF8740B2C8",
  "appConfigFileRoles": [
    {
      "appConfigFileId": "4bbb1f9c-733f-4709-9ec3-3b7d3a40507c",
      "role": "file",
      "newFilename": "db.properties"
    },
    {
      "appConfigFileId": "533b4426-acb1-42dc-b062-d0e2f09d3f6e",
      "role": "systemproperty"
    }
  ]
}
Response  202
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
""

Get environment
GET/v3/environments/{environmentId}

Get environment information

Example URI

GET /v3/environments/environmentId
URI Parameters
HideShow
environmentId
string (required) 

Environment ID

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "8CA48B97CD9369F3",
  "name": "mar06-qa02",
  "url": "mar06-qa02-testing.onehippo.io",
  "createdAt": "2017-12-07T15:12:35+00:00",
  "createdBy": "joe@bloomreach.com",
  "deployedAt": "2017-12-07T15:14:42+00:00",
  "deployedBy": "wendy@bloomreach.com",
  "distributionId": "F8A4CFAF8740B2C8",
  "state": "deployed",
  "configuration": {
    "bootstrap": false,
    "virtualHosts": [
      "mar06-qa02-testing.onehippo.io"
    ]
  }
}

Get environment by name
GET/v3/environments?name={name}

Get environment information by passing in environment name as query parameter. Note that using the environment’s id in scripts is safer since environment names are not guaranteed to be unique in time.

Example URI

GET /v3/environments?name=name
URI Parameters
HideShow
name
string (required) 

name of the environment

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "8CA48B97CD9369F3",
  "name": "mar06-qa02",
  "url": "mar06-qa02-testing.onehippo.io",
  "createdAt": "2017-12-07T15:12:35+00:00",
  "createdBy": "joe@bloomreach.com",
  "deployedAt": "2017-12-07T15:14:42+00:00",
  "deployedBy": "wendy@bloomreach.com",
  "distributionId": "F8A4CFAF8740B2C8",
  "state": "deployed",
  "configuration": {
    "bootstrap": false,
    "virtualHosts": [
      "mar06-qa02-testing.onehippo.io"
    ]
  }
}

Generate "Download token"
POST/v3/environments/:environmentId/logs/download-token

Generate download token for environment’s CMS logs (cms, site, catalina, etc).

Example URI

POST /v3/environments/:environmentId/logs/download-token
Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "token": "0cef47e192e0786eeb3e4d082dc2653247fd0f97adebd0b985ed0a4b0c44350f"
}
Response  401

Download Environment CMS logs
GET/v3/environments/logs/download/:download_log_token

Download CMS logs of an environment (cms, site, catalina, etc) using the download token.

Example URI

GET /v3/environments/logs/download/:download_log_token
Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
accept-ranges: →bytes
content-disposition: →attachment; filename="cmslogs feb01qa01 2018-02-09 0910.tar.gz"
content-length: →13442
Response  404
HideShow
Body
{
  "error_code": "InvalidDownloadToken",
  "error_detail": "Download token '3b42c66d8b07a389dsafa1968ad8d7f25c1659b0a' not valid."
}

Delete an environment
DELETE/v3/environments/{environmentId}

Delete an existing environment

Example URI

DELETE /v3/environments/environmentId
URI Parameters
HideShow
environmentId
string (required) 

Environment ID

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
null

Mark an environment as production environment
PUT/v3/production/

An environment marked as production gets more resources from BloomReach Cloud to handle more load. You can mark an environment as a production environment by calling this api endpoint and passing in the old production environment id (optional) and the new environment id. It is also possible to make all domain rules point from the old to the new environment by setting the body field ‘changeDomainRules’ to true.

The max number of production environments is by default 1. In case you want to change this contact BloomReach. In case you exceed the max number of production environments a 404 with error MaxProdEnvsReached is returned. In case an environment is not a production environment (anymore), you can set ‘newProductionEnvironmentId’ to empty.

Example URI

PUT /v3/production/
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
  "currentProductionEnvironmentId": "8414f067-ba9e-9306-7c5c5cb3992f",
  "newProductionEnvironmentId": "45414f067-bc9e-1402-3c5cfab3432f",
  "changeDomainRules": "true"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
null

Protect the site and/or cms of an environment
PUT/v3/protect/

By enabling protection of the site and/or cms, the visitor needs to enter the environment name as username and the password as specified in the rest call. Protecting the site can be handy in case you do not want to expose the site to the public (yet). Protecting the CMS can be handy in case of maintenance. Only users with the password can access the CMS or the console. These users still need to login into the CMS or console as in normal conditions.

Example URI

PUT /v3/protect/
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
  "site": true,
  "sitepassword": "I love you",
  "cms": false,
  "cmspassword": "I love you more"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
null

Backup and Restore

API that drives backup and restore process across the BRC platform

List all backups
GET/v3/backups

Example URI

GET /v3/backups
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": "01b23258-eb79-41f0-8c3b-ad2a7d29b566",
    "environmentId": "cafebabe-1234",
    "createdBy": "user@bloomreach.com",
    "createdAt": "2017-12-07T15:12:35+00:00",
    "distributionId": "3791ED1FD651C039",
    "databases": [
      {
        "id": "011280fc-55da-4b52-8483-df7ef0164acd",
        "database": "green",
        "filePath": "/backups/environments/green/databases/green/abc123_green.gz"
      },
      {
        "id": "9807340d-d8b7-4477-96da-9ccf76c93d33",
        "database": "green_targeting",
        "filePath": "/backups/environments/green_/databases/green__targeting/92f4p5b9mr_green_targeting.gz"
      }
    ]
  },
  {
    "id": "f3412a37-2d65-4499-bdf9-5ec979ced6a9",
    "environmentId": "cafebabe-5678",
    "createdBy": "user@bloomreach.com",
    "createdAt": "2017-12-07T15:12:35+00:00",
    "distributionId": "",
    "databases": [
      {
        "id": "cdc004c2-8d06-4761-b67d-cbc9042ea04f",
        "database": "blue",
        "filePath": "/backups/environments/jan17qa01/databases/jan17qa01/j37o43hmi3_blue.gz"
      },
      {
        "id": "703123af-a265-4c96-b1e6-67393eb84e6e",
        "database": "blue_targeting",
        "filePath": "/backups/environments/blue/databases/blue_targeting/mookjrcnl1_blue_targeting.gz"
      }
    ]
  }
]
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "error_code": "QueryBackupFailed",
    "error_detail": [detail message]
}

Create a new backup
POST/v3/backups

Example URI

POST /v3/backups
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ access token ]
Body
{
    "environmentId": [environment id],
    "backupType": [Manual | StackSnapshot]
}
Response  202
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "id": "f3e3b02a-f5b4-4357-8255-da1e4685e6c3",
    "EnvironmentId": [environment id],
    "createdBy": "user@bloomreach.com",
    "createdAt": "2017-12-07T15:12:35+00:00",
    "distributionId": "CE039350EB4BA359"
}
Response  400
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "error_code": "InvalidParameters",
  "error_detail": "Empty environmentId"
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "error_code": "CreateBackupFailed",
  "error_detail": "Environment is not deployed"
}

Restore a backup
PUT/v3/backups/{backupId}/restore

Example URI

PUT /v3/backups/backupId/restore
URI Parameters
HideShow
backupId
string (required) 

The id of backup to restore

Request
HideShow
Headers
Authorization: [ authentication token ]
Body
{
    "environmentId": [target environment id]
}
Response  202
HideShow
Body
Response contains the restoring job id.

    {
        "jobId": "f3e3b02a-f5b4-4357-1234-da1e46855678"
    }
Response  400
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
        "error_code": "InvalidParameters",
        "error_detail": [detail message]
    }
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "error_code": "RestoreBackupFailed",
  "error_detail": "Failed to restore backup:..."
}

Monitor a running job
GET/v3/backups/jobs/{jobId}

Example URI

GET /v3/backups/jobs/jobId
URI Parameters
HideShow
jobId
string (required) 

The id in the responses of the creating backup call or the restoring backup call

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "jobId": [monitored jobId],
  "status": "completed"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "jobId": [monitored jobId],
  "status": "running"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "jobId": [monitored jobId],
  "status": "error"
}

Delete backup
DELETE/v3/backups/{backupId}

Delete forever the Backup from the repository. System created backups cannot be deleted.

Example URI

DELETE /v3/backups/backupId
URI Parameters
HideShow
backupId
string (required) 

The id of backup to delete

Request
HideShow
Headers
Authorization: [ authentication token ]
Response  200
Response  400
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "error_code": "InvalidParameters",
    "error_detail": [detail message]
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "error_code": "DeleteBackupFailed",
    "error_detail": [detail message]
}

Users

Listing users
GET/v3/users

Example URI

GET /v3/users
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ access token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "ID": "bca4bc54-61c7-42ca-b6a5-0b04bd1823ec",
    "username": "user1@bloomreach.com",
    "role": "root",
    "active": true
  },
  {
    "ID": "15d4d7c1-a48f-4567-b139-96c36e9ecbbe",
    "username": "user2@bloomreach.com",
    "role": "admin",
    "active": true
  }
]
Response  400
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "error_code": "RetrieveUsersFailed",
    "error_detail": [detail message]
}

Get user detail
GET/v3/users/{username}

Example URI

GET /v3/users/username
URI Parameters
HideShow
username
string (required) 

Username to query

Request
HideShow
Headers
Authorization: [ access token ]
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "ID": "15d4d7c1-a48f-4567-b139-96c36e9ecbbe",
    "username": "exampleuser@bloomreach.com",
    "role": "user",
    "active": true,
}
Response  400
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    "error_code": "RetrieveUsersFailed",
    "error_detail": [detail message]
}

Add a new user
POST/v3/users

Add a new user. Username, password, role (user, admin or root) and active fields are required to add an user. The username must be a valid email address. The password must be at least 8 characters long and contain digit, lower and upper case characters.

Example URI

POST /v3/users
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
    "username": "exampleuser@bloomreach.com",
    "password": [super secret password],
    "role": "user",
    "active": "true",
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "15d4d7c1-a48f-4567-b139-96c36e9ecbbe",
  "username": "exampleuser@bloomreach.com",
  "role": "user",
  "active": true
}
Response  400

Update an existing user
PUT/v3/users/{username}

Update the fields ‘active’ and ‘role’ of an existing user by passing in the username on the path. Username cannot be changed. Admin or root role required to update an user

Example URI

PUT /v3/users/username
URI Parameters
HideShow
username
string (required) 

Name of the user to update

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
    "active" : false
    "role": "user"
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "ID": "15d4d7c1-a48f-4567-b139-96c36e9ecbbe",
  "username": "exampleuser@bloomreach.com",
  "role": "user",
  "active": true
}
Response  400

Change user password
PUT/v3/users/{username}/password

Change or update passwords

Example URI

PUT /v3/users/username/password
URI Parameters
HideShow
username
string (required) 

The username to change password

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Body
{
  "currentPassword": "P4ssw0rd123",
  "newPassword": "N3wExamplePassword123"
}
Response  200
Response  401
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
        "error_code": "ChangePasswordFailed",
        "error_detail": [detail message]
    }

Send reset-password email
POST/v3/password-reset/{username}

Request reset-password token

Example URI

POST /v3/password-reset/username
URI Parameters
HideShow
username
string (required) 

The username to send reset-password email

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Response  200
Response  400

Verify reset-password token
GET/v3/password-reset/{token}

Verify the reset-password token and redirect to the change password page

Example URI

GET /v3/password-reset/token
URI Parameters
HideShow
token
string (required) 

The reset-password token sent by email.

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Response  302
HideShow
Headers
Location: [URL of the change password webpage]
Response  400

Set new password
PUT/v3/password-reset/password

Set the new password to the user referred by the reset token

Example URI

PUT /v3/password-reset/password
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
        "reset_token": [ generated reset-token ],
        "new_password": [new password]
    }
Response  200
Response  400

Delete a user
DELETE/v3/users/{username}

Example URI

DELETE /v3/users/username
URI Parameters
HideShow
username
string (required) 

Name of the user to be deleted

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: [ authentication token ]
Response  200
Response  400
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
        "error_code": "RemoveUserFailed",
        "error_detail": [detail message]
    }

Generated by aglio on 12 Sep 2018