<!-- https://staircase.co/delivery/distribution/environment -->
# Environment

# Environment

Creating, configuring, cost-tracking, budgeting and tearing down a dedicated cloud environment over HTTP.

An environment here is a whole cloud account, not a namespace: its own domain, its own certificates, its own API key, its own stack set. It is created, configured, metered against a budget and destroyed through calls.

Teardown is a first-class path with scripted removal of stacks, storage and identity, rather than an operational runbook someone follows by hand.

## How it works

Cost attribution reaches down to individual model conversations and up to a per-environment budget. Metering at that granularity is what makes a budget enforceable instead of advisory — a budget that can only be checked after the invoice arrives cannot stop anything.

A configuration check returns a vector of policy answers rather than a pass or fail, so an environment that is out of policy names which control it fell out of.

## Operations

<!--source:api-specifications-->

### Activate Key
<!--/source-->

`POST` `/activate-key`

<!--source:api-specifications-->

#### Activate Key for Environment
<!--/source-->

`activateKey`

<!--source:api-specifications-->
Activate key used to activate a key for being used in the environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `api_key`required | `string` | <!--source:api-specifications-->X-api-key to be activated in the environment<!--/source-->Example `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Key activated.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `fqdn`required | `string` | <!--source:api-specifications-->Fully qualified domain name of the environment where the key was activated.<!--/source--> |
| `status`required | `string` | <!--source:api-specifications-->Status of the key activation.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Message about the key activation.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error`required | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error`required | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Key Activation error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error`required | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`403`

<!--source:api-specifications-->

### Budgets
<!--/source-->

`PUT` `/budgets/{fqdn}`

<!--source:api-specifications-->

#### Update environment budget
<!--/source-->

`updateBudget`

<!--source:api-specifications-->
This API allows the Staircase Finance team to update the budget of a given environment.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "products": [
 {
 "product_name": "Language",
 "monthly_budget": 1500
 },
 {
 "product_name": "Batch",
 "monthly_budget": 750
 },
 {
 "product_name": "Datalake",
 "monthly_budget": 750
 }
 ]
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY received via email upon account creation<!--/source--> |
| `fqdn` required | `string` path | `example.staircaseapi.com` | <!--source:api-specifications-->Environment fully qualified domain name.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `products`required | `object[]` | <!--source:api-specifications-->List of products and their monthly budget.<!--/source--> |
| `product_name`required | `string` | <!--source:api-specifications-->Name of the product.<!--/source-->Example `Environment` |
| `monthly_budget`required | `number` | <!--source:api-specifications-->Monthly budget for the product.<!--/source-->Example `1000` |

##### Response `201``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation In-progress.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `domain_name`required | `string` | <!--source:api-specifications-->Fully qualified domain name of the environment.<!--/source--> |
| `monthly_budget`required | `object` | <!--source:api-specifications-->Monthly budget for the environment.<!--/source--> |
| `products` | `object[]` | <!--source:api-specifications-->List of products and their monthly budget.<!--/source--> |
| `product_name`required | `string` | <!--source:api-specifications-->Name of the product.<!--/source-->Example `Environment` |
| `monthly_budget`required | `number` | <!--source:api-specifications-->Monthly budget for the product.<!--/source-->Example `1000` |
| `last_update_datetime`required | `string` | <!--source:api-specifications-->Last update time stamp.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`PUT` `/budgets`

<!--source:api-specifications-->

#### Create or update budget for products owned by team
<!--/source-->

`createOrUpdateTeamBudget`

<!--source:api-specifications-->
Create or update team budget
<!--/source-->

<!--source:api-specifications-->
This API manages and monitors daily spending on products for each company by storing budget information and summing all related spending per company and product. If spending exceeds the budget, it sends alerts to the company’s Slack #alerts-negative channel for each additional dollar spent.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "budget_per_day": 25,
 "product_identifier": "c20994b0-be01-4421-a075-8dcea035d155",
 "company_identifier": "01G52C9RCP0Q5C6JYEPE4487VV"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Environment creation In-progress.

```
{
 "budget_per_day": 25,
 "product_identifier": "c20994b0-be01-4421-a075-8dcea035d155",
 "company_identifier": "01G52C9RCP0Q5C6JYEPE4487VV"
}
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY received via email upon account creation<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `budget_per_day`required | `number` | <!--source:api-specifications-->US dollars per day.<!--/source-->Example `25` |
| `product_identifier`required | `string` | <!--source:api-specifications-->Product identifier.<!--/source-->Example `c20994b0-be01-4421-a075-8dcea035d155` |
| `company_identifier`required | `string` | <!--source:api-specifications-->Company identifier from<!--/source-->Example `01G52C9RCP0Q5C6JYEPE4487VV` |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation In-progress.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `budget_per_day`required | `number` | <!--source:api-specifications-->US dollars per day.<!--/source-->Example `25` |
| `product_identifier`required | `string` | <!--source:api-specifications-->Product identifier.<!--/source-->Example `c20994b0-be01-4421-a075-8dcea035d155` |
| `company_identifier`required | `string` | <!--source:api-specifications-->Company identifier from<!--/source-->Example `01G52C9RCP0Q5C6JYEPE4487VV` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

<!--source:api-specifications-->

### Costs
<!--/source-->

`GET` `/costs`

<!--source:api-specifications-->

#### Retrieve product costs
<!--/source-->

`getProductCosts`

<!--source:api-specifications-->
Retrieve the detailed product costs across the organization.

Due to the monthly billing cycle, the values will change until the end of the month is reached, and the final adjustments are applied.

The authorization access token for using this service can be obtained from Comply Authentication

<!--/source-->

##### Response

<!--source:api-specifications-->
200400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Response body with the detailed costs of a given product across all environments.

```
{
 "total_cost": "$ 1785.4194 USD",
 "costs_unit": "USD",
 "total_cost_raw": 1785.4194,
 "product_name": "Test",
 "environments_count": 330,
 "average_environment_cost": 5.4104,
 "costs_by_environment": [
 {
 "costs": 146.4983,
 "organization_id": "01G5XXXXXXXXXX93E41X70MXS",
 "environment_domain": "my-subdomain.staircaseapi.com"
 }
 ],
 "costs_by_service": [
 {
 "aws_service": "Amazon EC2 Container Registry (ECR)",
 "cost": 654.9967
 },
 {
 "aws_service": "AWS Key Management Service",
 "cost": 318.5916
 },
 {
 "aws_service": "Amazon Simple Storage Service",
 "cost": 13.0348
 },
 {
 "aws_service": "AWS Lambda",
 "cost": 7.3645
 },
 {
 "aws_service": "AWS WAF",
 "cost": 5.8065
 },
 {
 "aws_service": "Amazon DynamoDB",
 "cost": 1.9304
 },
 {
 "aws_service": "AmazonCloudWatch",
 "cost": 0.6591
 },
 {
 "aws_service": "Amazon Simple Queue Service",
 "cost": 0.5514
 },
 {
 "aws_service": "CodeBuild",
 "cost": 0
 }
 ],
 "costs_by_period": [
 {
 "time_period": "2022-08-01-2022-08-02",
 "cost": 70.3507
 },
 {
 "time_period": "2022-08-02-2022-08-03",
 "cost": 76.8517
 }
 ]
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
5
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token.<!--/source--> |
| `product_name` required | `string` query | `Environment` | <!--source:api-specifications-->Product name<!--/source--> |
| `start_date` required | `string` query | `2022-01-01` | <!--source:api-specifications-->start date for the time range<!--/source--> |
| `end_date` required | `string` query | `2022-01-31` | <!--source:api-specifications-->end date for the time range<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
8 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the detailed costs of a given product across all environments.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `total_costs`required | `string` | <!--source:api-specifications-->Formatted total costs for the given product name.<!--/source--> |
| `costs_unit`required | `string` | <!--source:api-specifications-->Unit for the costs values.<!--/source--> |
| `total_costs_raw`required | `number` | <!--source:api-specifications-->Total costs for the given product name.<!--/source--> |
| `environments_count`required | `number` | <!--source:api-specifications-->Number of environments in which the product is deployed.<!--/source--> |
| `average_environment_cost`required | `number` | <!--source:api-specifications-->Average cost per environments.<!--/source--> |
| `costs_by_environment`required | `object[]` | <!--source:api-specifications-->List of Product costs per environment<!--/source--> |
| `product_by_environment_costs` | `object` | <!--source:api-specifications-->Data object containing the Product costs per environment<!--/source--> |
| `environment_domain` | `string` | <!--source:api-specifications-->Domain of the environment<!--/source--> |
| `costs` | `number` | <!--source:api-specifications-->Product costs of the environment<!--/source--> |
| `organization_id` | `string` | <!--source:api-specifications-->Domain of the environment<!--/source--> |
| `costs_by_service`required | `object` | <!--source:api-specifications-->Product costs by AWS service<!--/source--> |
| `costs_by_period` | `object` | <!--source:api-specifications-->Product costs by day<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`GET` `/environment-costs/{api_key}`

<!--source:api-specifications-->

#### Retrieve environment costs
<!--/source-->

`getEnvironmentCosts`

<!--source:api-specifications-->
Retrieve environment costs.

When resource_details is set to true, the output will show the costs detailed by service instead of the component.

Due to the monthly billing cycle, the values will change until the end of the month is reached, and the final adjustments are applied.

This service only provides data for last 14 days. The authorization access token for using this service can be obtained from Comply Authentication

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
6
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token.<!--/source--> |
| `api_key` required | `string` path | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for the environment to query<!--/source--> |
| `start_date` required | `string` query | `2022-01-01` | <!--source:api-specifications-->start date for the time range<!--/source--> |
| `end_date` required | `string` query | `2022-01-31` | <!--source:api-specifications-->end date for the time range<!--/source--> |
| `resource_details` | `boolean` query | `true` | <!--source:api-specifications-->If enabled it will show the Environment resources usage detail, resource details cannot be used with more that 14 days old dates.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
4 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the list of stacks deployed in a given environment.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `unit`required | `string` | <!--source:api-specifications-->Currency<!--/source--> |
| `total_cost`required | `string` | <!--source:api-specifications-->Total cost for the given environment.<!--/source--> |
| `time_range`required | `object` | <!--source:api-specifications-->Time range queried.<!--/source--> |
| `start_date`required | `string` | <!--source:api-specifications-->Start date for the time range queried<!--/source--> |
| `end_date`required | `string` | <!--source:api-specifications-->End date for the time range queried<!--/source--> |
| `usage_details`required | `object[]` | <!--source:api-specifications-->Usage details of the environment by stack name.<!--/source--> |
| `service`required | `string` | <!--source:api-specifications-->Name of the resource service.<!--/source--> |
| `cost`required | `string` | <!--source:api-specifications-->Total cost generated by the resource.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

<!--source:api-specifications-->

### EnvironmentCosts
<!--/source-->

`POST` `/costs`

<!--source:api-specifications-->

#### Save Costs
<!--/source-->

`save-costs`

<!--source:api-specifications-->
For tracking non AWS related costs.
<!--/source-->

<!--source:api-specifications-->
Use this API for reporting usage of external services that are not tracked by AWS. For example, this API is used by the Bot product to report the price of conversation for specific bot.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "usage": 3,
 "name": "Personal Identity Collector",
 "invocation_id": "1234567890"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `usage`required | `number` | <!--source:api-specifications-->Usage of the external service, in US Cents.<!--/source-->Example `100` |
| `name`required | `string` | <!--source:api-specifications-->Name of the external service.<!--/source-->Example `Personal Identity Collector` |
| `invocation_id` | `string` | <!--source:api-specifications-->Unique identifier for the invocation of the external service.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response body with confirmation of the saved costs.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message`required | `string` | <!--source:api-specifications-->Confirmation message.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

<!--source:api-specifications-->

### Environment
<!--/source-->

`POST` `/environment`

<!--source:api-specifications-->

#### Create Environment
<!--/source-->

`createEnvironment`

<!--source:api-specifications-->
Create environment
<!--/source-->

<!--source:api-specifications-->
This service allows you to create a staircase environment for with a given subdomain.

You can also include a callback URL with an optional payload to get notified automatically after your environment creation is finished;

After the environment is created it is subscribed to Environment and Deploy products automatically.

- Callback payload request example:

```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "subdomain": "my-env",
 "organization_id": "26d4253f8509"
 "callback_url": "",
 "callback_payload": {"callback_id":"identifier_callback"}
}
```

- Callback payload response example:

```
{
 "environment_status": "ACTIVE",
 "environment_fqdn": "my-env.staircaseapi.com",
 "message": "Environment ready to use",
 "callback_payload": {"callback_id":"identifier_callback"}
}
```

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "subdomain": "mysubdomain",
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "organization_id": "26d4253f8509",
 "callback_url": "https://mycallbak_url.com/callback_url",
 "callback_payload": {
 "callback_id": "identifier_callback"
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY received via email upon account creation<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `subdomain`required | `string` | <!--source:api-specifications-->Subdomain for the New Staircase environment.<!--/source-->Example `marketplace` |
| `api_key`required | `string (uuid)` | <!--source:api-specifications-->API-KEY received via email upon account creation<!--/source-->Example `<redacted>` |
| `organization_id` | `string` | <!--source:api-specifications-->Organization ID to which the account belongs to<!--/source-->Example `b665gncdb891` |
| `callback_url` | `string` | <!--source:api-specifications-->Callback URL POST endpoint to be called upon environment creation completion<!--/source-->Example `https://mycallbak_url.com/callback_url` |
| `callback_payload` | `object` | <!--source:api-specifications-->User defined payload to be sent to the callback URL supplied<!--/source-->Example `{'callback_id':'identifier_callback'}` |

##### Response `201``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation In-progress.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `staircase_environment`required | `object` | <!--source:api-specifications-->Staircase Environment creation status.<!--/source--> |
| `api_key`required | `string` | <!--source:api-specifications-->Unique identifier for the environment.<!--/source--> |
| `status_url`required | `string` | <!--source:api-specifications-->URL for checking the status while it's not Active.<!--/source--> |
| `status`required | `string` | <!--source:api-specifications-->Status of the environment creation.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Status description message.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`PUT` `/environment`

<!--source:api-specifications-->

#### Update Environment Data
<!--/source-->

`updateEnvironmentData`

<!--source:api-specifications-->
This service allows you to update the environment data such as organization ID

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "organization_id": "26d4253f8509"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY received via email upon account creation<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `api_key`required | `string (uuid)` | <!--source:api-specifications-->API-KEY received via email upon account creation<!--/source-->Example `<redacted>` |
| `organization_id`required | `string` | <!--source:api-specifications-->Organization ID to which the account belongs to<!--/source-->Example `b665gncdb891` |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Environment Data Update.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message`required | `string` | <!--source:api-specifications-->Status description message.<!--/source--> |
| `status`required | `string` | <!--source:api-specifications-->Status of the operation executed<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`DELETE` `/environment`

<!--source:api-specifications-->

#### Disable Environment
<!--/source-->

`disableEnvironment`

<!--source:api-specifications-->
This service allows you to disable a given environment. Disabling an environment will delete all the resources in it and the environment will not be recoverable The authorization access token for using this service can be obtained from Comply Authentication The token requires an admin level permission

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Account-key received via email upon account creation.<!--/source--> |
| `environment_fqdn` required | `string` query | `my-env.staircaseapi.com` | <!--source:api-specifications-->Fully qualified domain name of the staircase environment.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Environment Data Update.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environment_fqdn`required | `string` | <!--source:api-specifications-->Fully qualified domain name of the environment.<!--/source--> |
| `organization_id`required | `string` | <!--source:api-specifications-->Organization ID of the queried environment.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/environment`

<!--source:api-specifications-->

#### Get Environment Data
<!--/source-->

`getEnvironmentData`

<!--source:api-specifications-->
This service allows you to retrieve the environment data such as organization ID

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Account-key received via email upon account creation.<!--/source--> |
| `environment_fqdn` required | `string` query | `my-env.staircaseapi.com` | <!--source:api-specifications-->Fully qualified domain name of the staircase environment.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->
<!--source:api-specifications-->
Environment Data Update.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environment_fqdn`required | `string` | <!--source:api-specifications-->Fully qualified domain name of the environment.<!--/source--> |
| `organization_id`required | `string` | <!--source:api-specifications-->Organization ID of the queried environment.<!--/source--> |
| `environment_owner`required | `string` | <!--source:api-specifications-->Owner email of the queried environment.<!--/source--> |
| `company_name`required | `string` | <!--source:api-specifications-->Company name of queried environment.<!--/source--> |
| `last_updated_at`required | `string` | <!--source:api-specifications-->When environment was updated.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`DELETE` `/environment/delete`

<!--source:api-specifications-->

#### Clean Environment
<!--/source-->

`disableEnvironment`

<!--source:api-specifications-->
This service allows you to clean a given environment. Cleaning an environment will delete all the resources in it and the environment will not be recoverable

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "target_account_id": "123456789033"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "target_account_id must be provided."
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `target_account_id`required | `string` | <!--source:api-specifications-->AWS account ID of the environment to be cleaned. The account ID must be a 12-digit number within Staircase organization.<!--/source--> |
| `callback_url` | `string (uri)` | <!--source:api-specifications-->URL to be called when the cleaning process is complete. The URL must be accessible from the internet.s<!--/source--> |
| `resources_to_retain` | `object` | <!--source:api-specifications-->Object specifying arrays of S3 and Glue resources to be retained during cleanup. Each array contains objects representing individual resources. A report will be generated post-cleanup detailing retained and removed resources. In case of errors in retaining a specified resource, the user will be notified for manual intervention.<!--/source--> |
| `S3` | `object[]` | <!--source:api-specifications-->Array of objects, each representing an S3 bucket name to be retained.<!--/source--> |
| `bucket_name`required | `string` | <!--source:api-specifications-->Name of the S3 bucket to be retained.<!--/source--> |
| `Glue` | `object[]` | <!--source:api-specifications-->Array of objects, each representing a Glue resource to be retained.<!--/source--> |
| `database_name`required | `string` | <!--source:api-specifications-->Name of the Glue database to be retained.<!--/source--> |
| `IAMUser` | `string` | <!--source:api-specifications-->IAM User to be retained.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Ok.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `job_id`required | `string` | <!--source:api-specifications-->ID of the cleaning job.<!--/source-->Example `01GXQZV8M1V57GEZHK29SR1J3J` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

`POST` `/`

<!--source:api-specifications-->

#### Add region
<!--/source-->

`addRegion`

<!--source:api-specifications-->
This service allows you to configure new region is this environment, so it will be ready to get Staircase bundles deployed in it WAF distribution will be created. The distribution ID will be available inside the environment token data. api.subdomain.staircaseapi.com custom API GW domain name will be created. {region_name}.subdomain.staircaseapi.com custom API GW domain name will be created. Route53 failover configuration will be created for api.subdomain.staircaseapi.com and used for the health checks managed by the Environment product. Route53 us-east-1.domain.com to direct to API Gateway on us-east-1

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "region_name": "us-east-2"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
200400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Ok.

```
{
 "message": "Region added"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Request data invalid

```
{
 "message": "Request body is invalid."
}
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `region_name`required | `string` | <!--source:api-specifications-->Region name<!--/source-->`us-east-2``us-west-1``us-west-2`Example `us-east-2` |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Ok.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->message<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Request data invalid
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message<!--/source--> |

`GET` `/stacks/{api_key}`

<!--source:api-specifications-->

#### Retrieve environment products
<!--/source-->

`getProductsDeployed`

<!--source:api-specifications-->
Retrieve the environment products
<!--/source-->

<!--source:api-specifications-->
Get environment components Fetch list of deployed components in a given environment. The authorization access token for using this service can be obtained from Comply Authentication

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token.<!--/source--> |
| `api_key` required | `string` path | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API-KEY<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the list of stacks deployed in a given environment.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `stacks`required | `object[]` | <!--source:api-specifications-->List of stacks in the environment<!--/source--> |
| `stack_name` | `string` | <!--source:api-specifications-->Name of the stack deployed.<!--/source--> |
| `stack_status`required | `string` | <!--source:api-specifications-->Current status of the stack.<!--/source--> |
| `created_at`required | `string` | <!--source:api-specifications-->Creation time stamp.<!--/source--> |
| `last_updated_at`required | `string` | <!--source:api-specifications-->Last update time stamp.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

<!--source:api-specifications-->

### Hello
<!--/source-->

`POST` `/hello-world`

<!--source:api-specifications-->

#### Hello
<!--/source-->

`execute_query`

<!--source:api-specifications-->
Hello World
<!--/source-->

<!--source:api-specifications-->
Dummy hello world endpoint

<!--/source-->

##### Response

<!--source:api-specifications-->
application/json Copy Ok.

```
{
 "message": "ok"
}
```

<!--/source-->

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Ok.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Hello message.<!--/source-->Example `ok` |

<!--source:api-specifications-->

### Products
<!--/source-->

`GET` `/product-deployments`

<!--source:api-specifications-->

#### Retrieve products deployments
<!--/source-->

`getProductDeployments`

<!--source:api-specifications-->
Retrieve product deployments
<!--/source-->

<!--source:api-specifications-->
Retrieve all the environments in which the product is deployed with their Health API KEY. The authorization access token for using this service can be obtained from Comply Authentication

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token.<!--/source--> |
| `base_path` required | `string` query | `code-tester` | <!--source:api-specifications-->The base path of the product you want to query<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the list of environments in which the product is deployed.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environments`required | `object[]` | <!--source:api-specifications-->List of environments with the base path given present.<!--/source--> |
| `domain_name`required | `string` | <!--source:api-specifications-->Name of the stack.<!--/source--> |
| `api_key`required | `string` | <!--source:api-specifications-->Health API KEY<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

<!--source:api-specifications-->

### EnvironmentManager
<!--/source-->

`DELETE` `/products`

<!--source:api-specifications-->

#### Delete deployed product
<!--/source-->

`deleteProductServices`

<!--source:api-specifications-->
This service triggers the deletion of a given product, if no specific services are given all the services deployed for the given product name will be deleted. Deletion of a given service or services will remove the resources and will cause loss of data. Admin level permissions are necessary for deleting products from a Staircase environment, unless you are the owner of the environment. The authorization access token for using this service can be obtained from Comply Authentication

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "product_name": "Test",
 "services": [
 {
 "service_name": "service-code-tester"
 }
 ]
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
201400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Environment creation In-progress.

```
[
 {
 "status": "SUBMITTED"
 }
]
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained through comply service.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `product_name`required | `string` | <!--source:api-specifications-->Name of the product to be deleted<!--/source-->Example `Test` |
| `services` | `object[]` | <!--source:api-specifications-->List of services to be deleted<!--/source--> |
| `service_name`required | `string` | <!--source:api-specifications-->Name of the service to be deleted<!--/source-->Example `service-code-tester` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation In-progress.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `status`required | `string` | <!--source:api-specifications-->Status of the deletion.<!--/source-->Example `SUBMITTED` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation failure.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/products`

<!--source:api-specifications-->

#### Get Deployed Products
<!--/source-->

`getDeployedProducts`

<!--source:api-specifications-->
Retrieve the products deployed in the environment
<!--/source-->

<!--source:api-specifications-->
Get deployed products Retrieves a list of the products deployed in the environment with their respective components. The authorization access token for using this service can be obtained from Comply Authentication

<!--/source-->

##### Response

<!--source:api-specifications-->
200400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Response body with the list of products and services deployed in the staircase environment.

```
[
 [
 {
 "product_name": "Environment",
 "services": [
 {
 "service_name": "environment-manager",
 "status": "UPDATED"
 },
 {
 "service_name": "environment-administrator",
 "status": "UPDATED"
 }
 ]
 }
 ]
]
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained through comply service.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the list of products and services deployed in the staircase environment.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `product_name`required | `string` | <!--source:api-specifications-->Product Name deployed in the staircase environment.<!--/source--> |
| `services`required | `object[]` | <!--source:api-specifications-->List of services attached to the product.<!--/source--> |
| `status`required | `string` | <!--source:api-specifications-->Deployment status of the service.<!--/source--> |
| `service_name`required | `string` | <!--source:api-specifications-->Name of the service deployed.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Product not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/products/{product_name}`

<!--source:api-specifications-->

#### Get Deployed Product
<!--/source-->

`getDeployedProductServices`

<!--source:api-specifications-->
Retrieve the details of a product deployed in the environment
<!--/source-->

<!--source:api-specifications-->
Get deployed products Retrieves the list of services deployed containing status and service name for the product name given, as log as it is deployed in the staircase environment. The authorization access token for using this service can be obtained from Comply Authentication

<!--/source-->

##### Response

<!--source:api-specifications-->
200400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Response body with the list of services deployed in the staircase environment for the provided product name.

```
[
 [
 {
 "service_name": "environment-manager",
 "status": "UPDATED"
 },
 {
 "service_name": "environment-administrator",
 "status": "UPDATED"
 }
 ]
]
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained through comply service.<!--/source--> |
| `product_name` required | `string` path | `Environment` | <!--source:api-specifications-->Name of the product to query<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the list of services deployed in the staircase environment for the provided product name.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `status`required | `string` | <!--source:api-specifications-->Deployment status of the service.<!--/source--> |
| `service_name`required | `string` | <!--source:api-specifications-->Name of the service deployed.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/service-key`

<!--source:api-specifications-->

#### Get Service Key
<!--/source-->

`get-service-key`

<!--source:api-specifications-->
Get service key
<!--/source-->

<!--source:api-specifications-->
Environment service API-KEY can be used for retrieving telemetry data. Health product accepts it as X-API-KEY header, enabling products and teams to querying metrics for products deployed in the environment. The authorization access token for using this service can be obtained from Comply Authentication

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained through comply service.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the environment status and, environment details
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `service_key`required | `string` | <!--source:api-specifications-->UUID value of the service key.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Service key error.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/budgets`

<!--source:api-specifications-->

#### Get Budgets
<!--/source-->

`get-budgets-list`

<!--source:api-specifications-->
List of currently applied budgets for this environment.
<!--/source-->

<!--source:api-specifications-->
List of currently applied budgets for this environment. It calculates only for resources tagged with "sc:product:name" tag with this value. Budget is always monthly.

<!--/source-->

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the environment current budgets per product.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `budgets` | `object[]` | <!--source:api-specifications-->List of budgets per product.<!--/source--> |
| `product`required | `string` | <!--source:api-specifications-->Product name. It calculates only for resources tagged with "sc:product:name" tag with this value.<!--/source--> |
| `amount`required | `string` | <!--source:api-specifications-->Budget amount in US Dollars per month.<!--/source--> |

`PATCH` `/budgets`

<!--source:api-specifications-->

#### Update Budgets
<!--/source-->

`update-budgets`

<!--source:api-specifications-->
Update the thresholds for the budgets.
<!--/source-->

<!--source:api-specifications-->
Update the threshold for specific products.

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the environment updated budgets.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `budgets` | `object[]` | <!--source:api-specifications-->List of budgets per product.<!--/source--> |
| `product`required | `string` | <!--source:api-specifications-->Product name. It calculates only for resources tagged with "sc:product:name" tag with this value.<!--/source--> |
| `amount`required | `string` | <!--source:api-specifications-->Budget amount in US Dollars per month.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

<!--source:api-specifications-->

### Reports
<!--/source-->

`GET` `/reports`

<!--source:api-specifications-->

#### Get Cost Reports
<!--/source-->

`getCostReports`

<!--source:api-specifications-->
Provides reports about AWS costs produced by Staircase Products deployed to Staircase Environments.

The unit type of the all costs in reports is presented in cents by default. You can change it to "USD" by passing it as a query parameter `costs_unit_type`.

If start_date and end_date are not specified, the default date range is the last 30 days.

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
6
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `start_date` | `string` query | `2023-01-01` | <!--source:api-specifications-->Start date.<!--/source--> |
| `end_date` | `string` query | `2023-02-01` | <!--source:api-specifications-->End date.<!--/source--> |
| `granularity` | `string` query | `DAILY` | <!--source:api-specifications-->Granularity.<!--/source--> |
| `customer_company_name` | `string` query | `Bank Of America` | <!--source:api-specifications-->Customer company name. Case insensitive.<!--/source--> |
| `staircase_team` | `string` query | `Cerf` | <!--source:api-specifications-->Staircase team name. Case insensitive.<!--/source--> |
| `costs_unit_type` | `string` query | `USD` | <!--source:api-specifications-->Costs unit type. If not specified, the default unit type is CENT.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->
<!--source:api-specifications-->
Response body
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `date_range`required | `object` | <!--source:api-specifications-->The date range for which the report is applicable.<!--/source--> |
| `start`required | `string` | <!--source:api-specifications-->The start date of the range in YYYY-MM-DD format.<!--/source--> |
| `end`required | `string` | <!--source:api-specifications-->The end date of the range in YYYY-MM-DD format.<!--/source--> |
| `costs_unit_type`required | `string` | <!--source:api-specifications-->The unit type of costs in reports.<!--/source-->`CENT``USD`Example `USD` |
| `granularity` | `string` | <!--source:api-specifications-->The dates granularity of the report.<!--/source-->`DAILY``MONTHLY``NONE`Example `DAILY` |
| `products`required | `object[]` | <!--source:api-specifications-->A list of Staircase products included in the report. Data bundles are united to a single "Data Bundles" product.<!--/source--> |
| `product_name` | `string` | <!--source:api-specifications-->The name of the product.<!--/source--> |
| `reports`required | `object[]` | <!--source:api-specifications-->A collection of cost reports, each corresponding to a single time period. If 'granularity' query parameter is not NONE, it might contain more than one report object.<!--/source--> |
| `type`required | `string` | <!--source:api-specifications-->The type of report.<!--/source-->`COSTS_PER_ENVIRONMENT_PER_PRODUCT` |
| `date_range` | `object` | <!--source:api-specifications-->The date range for which the report is applicable.<!--/source--> |
| `start`required | `string` | <!--source:api-specifications-->The start date of the range in YYYY-MM-DD format.<!--/source--> |
| `end`required | `string` | <!--source:api-specifications-->The end date of the range in YYYY-MM-DD format.<!--/source--> |
| `result`required | `object[]` | <!--source:api-specifications-->An array of results, each representing a different environment.<!--/source--> |
| `environment`required | `string` | <!--source:api-specifications-->The name or identifier of the environment.<!--/source--> |
| `total_cost`required | `integer` | <!--source:api-specifications-->The total cost associated with this environment.<!--/source--> |
| `costs_per_product_sum`required | `integer` | <!--source:api-specifications-->The sum of costs broken down per product.<!--/source--> |
| `costs_per_product`required | `object` | <!--source:api-specifications-->A breakdown of costs per product.<!--/source--> |
| `unknown_product_cost`required | `integer` | <!--source:api-specifications-->Costs associated with unknown or unclassified products.<!--/source--> |
| `staircase_team`required | `string` | <!--source:api-specifications-->The name of the Staircase team owning the environment.<!--/source--> |
| `customer_company_name`required | `string` | <!--source:api-specifications-->The name of the customer company owning the environment.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

<!--source:api-specifications-->

### Configurations
<!--/source-->

`POST` `/update-configurations`

<!--source:api-specifications-->

#### Update configurations
<!--/source-->

`update-configurations`

<!--source:api-specifications-->
Update Configurations
<!--/source-->

<!--source:api-specifications-->
Update environment configurations validates the latest configurations of the environment and if they are not up-to-date it updates them.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained through comply service.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `api_key`required | `string (uuid)` | <!--source:api-specifications-->API-KEY received via email upon account creation<!--/source-->Example `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |

##### Response `201``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation In-progress.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `staircase_environment` | `object` | <!--source:api-specifications-->Staircase Environment creation status.<!--/source--> |
| `status`required | `string` | <!--source:api-specifications-->Status of the environment configurations update process.<!--/source-->`UPDATED``UPDATE_FAILED``UPDATING` |
| `message`required | `string` | <!--source:api-specifications-->Information message for the given status<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation failure.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/get-configurations/{api_key}`

<!--source:api-specifications-->

#### Get configurations
<!--/source-->

`get-configurations`

<!--source:api-specifications-->
Get the environment configurations Fetch the status of the environment configurations.

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token, obtained through comply service.<!--/source--> |
| `api_key` required | `string` path | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API-KEY<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
11 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the environment status and, environment details
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `MFA_Enabled`required | `string` | <!--source:api-specifications-->Status of the user with MFA_Enabled configuration.<!--/source-->`MISSING``OK` |
| `Login_Restricted`required | `string` | <!--source:api-specifications-->Status of the AWS console login restriction.<!--/source-->`MISSING``OK` |
| `Main_Certificate`required | `string` | <!--source:api-specifications-->Status of the Main Certificate configuration.<!--/source-->`MISSING``OK` |
| `Wild_Certificate`required | `string` | <!--source:api-specifications-->Status of the Wild Certificate configuration.<!--/source-->`MISSING``OK` |
| `Email_Domain`required | `string` | <!--source:api-specifications-->Status of the Email Domain configuration.<!--/source-->`MISSING``OK` |
| `DKIM_Verification`required | `string` | <!--source:api-specifications-->Status of the DKIM verification.<!--/source-->`MISSING``OK` |
| `MX_Records`required | `string` | <!--source:api-specifications-->Status of the MX DNS records.<!--/source-->`MISSING``OK` |
| `API_Gateway`required | `string` | <!--source:api-specifications-->Status of the API GW Configuration.<!--/source-->`MISSING``OK` |
| `Health_Service_Key`required | `string` | <!--source:api-specifications-->Status of the Health service API key configuration.<!--/source-->`MISSING``OK` |
| `VPC_Flow_Logs` | `string` | <!--source:api-specifications-->Status of the VPC Flow Log configuration.<!--/source-->`MISSING``OK` |
| `CloudFront_Distribution`required | `string` | <!--source:api-specifications-->Status of the CloudFront distribution configuration.<!--/source-->`MISSING``OK` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Server error.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

<!--source:api-specifications-->

### Status
<!--/source-->

`GET` `/environment/delete/{id}`

<!--source:api-specifications-->

#### Retrieve Cleaning Status
<!--/source-->

`getCleaningStatus`

<!--source:api-specifications-->
Foo

<!--/source-->

##### Response

<!--source:api-specifications-->
400404
<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Cleaning invocation was not found.

```
{
 "status": "NOT_FOUND"
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `id` required | `string` path | `490kokf3-aa93-409f-b4e7-756e019d83f5` | <!--source:api-specifications-->The cleaning invocation ID.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Cleaning job invocation status.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `status`required | `string` | <!--source:api-specifications-->Status of the cleaning job invocation.<!--/source-->`FAILED``IN_PROGRESS``NOT_FOUND``RUNNING``SUCCEEDED` |
| `logs`required | `string` | <!--source:api-specifications-->Logs of the cleaning invocation.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting an X-API-KEY.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Cleaning invocation was not found.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `status` | `string` | <!--source:api-specifications-->Status of the cleaning job.<!--/source-->`NOT_FOUND` |

<!--source:api-specifications-->

### Environment Creator
<!--/source-->

`POST` `/vendors/staircase/flows/env-create/jobs`

<!--source:api-specifications-->

#### Invoke Create Environment Flow
<!--/source-->

`invokeCreateEnvironmentFlow`

<!--source:api-specifications-->
This endpoint allows launching Create Environment Flow.

It is an asynchronous job, so response contains `job_id`, that allows to track the job's execution here. Result of the job will be sent to the `callback_url` specified in the appropriate field. If job finishes successfully, `job_status` will be "Completed"; `response_payload` will contain the `api_key`, `domain`, `subdomain` and `organization_id`, and it will look like this:

Show the rest
```
{
 "job_id": "e26ffa3d-4ae6-4582-8982-5d61f8a75c54",
 "job_status": "Completed",
 "transaction_id": "01F7S0N7CQ31DZQYVSVPN66GNK",
 "request_collection_id": "01F7S0X38J6R41HW279D8YP8KJ",
 "response_collection_id": "01F7S0YSQPGW9WC51378PR7TM3",
 "response_payload": {
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "domain": "organization-a1b2c3d4e5f6",
 "subdomain": "organization-a1b2c3d4e5f6.staircaseapi.com",
 "organization_id": "4321-4321-4321-4321-4321"
 }
}
```

If job fails to complete, `job_status` will be "Failed" and `response_payload` will contain detailed information about failed job (`Error` and `Cause` fields), and will look like this:

```
{
 "job_id": "98da2ca6-8fbb-4f00-bde9-91f8b33712f2",
 "job_status": "Failed",
 "transaction_id": "01FYRX3TTMKSR6XG070GA3MG17",
 "request_collection_id": null,
 "response_collection_id": null,
 "response_payload": {
 "Error": "CallVendorError",
 "Cause": {
 "errorMessage": {
 "message": "A company_organization with company \"X\" and organization \"X-org-1\" already exists."
 },
 "errorType": "CallVendorError",
 "requestId": "77a1db7e-12d4-42f3-887e-82387a2ca8cd"
 }
 },
 "status_code": null
}
```

For testing, you can use webhook.site service. With this, you instantly get a unique, random URL that you can put into the `callback_url` field and use it to receive HTTP requests.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "transaction_id": "01F7S0N7CQ31DZQYVSVPN66GNK",
 "callback_url": "https://webhook.site/cc87117a-36ee-4b8b-b098-e9cf209821a2",
 "request_payload": {
 "organization_name": "Org-1",
 "first_name": "John",
 "last_name": "Doe",
 "email": "john.doe@domain.com"
 }
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
202400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Request accepted

```
{
 "job_id": "160701d5-a034-41db-aade-26e4134ac8bb",
 "job_status": "Started"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request

```
{
 "message": {
 "schema_type": [
 "Must be one of: create, update."
 ]
 }
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `product_name` required | `string` query | `environment-creator` | <!--source:api-specifications-->This parameter is required to be `environment-creator`. Anything else would cause a failure<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
5 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `request_collection_id` | `string` | <!--source:api-specifications-->Request collection ID<!--/source--> |
| `response_collection_id` | `string` | <!--source:api-specifications-->Response collection ID<!--/source--> |
| `callback_url`required | `string (uri)` | <!--source:api-specifications-->Destination URL on which final result of the flow execution will be sent<!--/source--> |
| `request_payload`required | `object` | <!--source:api-specifications-->Data that have to passed into the flow<!--/source--> |
| `organization_name`required | `string` | <!--source:api-specifications-->Name of the Organization that Environment will belong to<!--/source--> |
| `first_name`required | `string` | <!--source:api-specifications-->First Name of the owner of Account that Environment will belong to<!--/source--> |
| `last_name`required | `string` | <!--source:api-specifications-->Last Name of the owner of Account that Environment will belong to<!--/source--> |
| `email`required | `string` | <!--source:api-specifications-->Email of the owner of Account that Environment will belong to<!--/source--> |

##### Response `202``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Request accepted
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `job_id` | `string` | <!--source:api-specifications-->Execution ID<!--/source--> |
| `job_status` | `string` | <!--source:api-specifications-->Execution status<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Either message or object with additional properties.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Forbidden
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Request forbidden -- authorization will not help<!--/source--> |
| `url` | `string (url)` | <!--source:api-specifications-->Indicates at which url the error occurs<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Partner or flow not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Nothing matches the given URI<!--/source--> |

`GET` `/vendors/staircase/flows/env-create/jobs/{job_id}`

<!--source:api-specifications-->

#### Retrieve Create Environment Flow Execution Status
<!--/source-->

`retrieveCreateEnvironmentFlowExecutionStatus`

<!--source:api-specifications-->
Retrieve flow execution status of Create Environment flow
<!--/source-->

<!--source:api-specifications-->
This endpoint allows getting status of the Create Environment Flow.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Execution status successfully retrieved

```
{
 "status": "FAILED",
 "executed_events": [
 "GetCredentials",
 "Wait1",
 "Wait2"
 ],
 "last_event": "Wait2",
 "details": [
 {
 "event_id": 2,
 "event_type": "stateEnteredEventDetails",
 "event_name": "GetCredentials",
 "timestamp": "2021-06-10 23:25:27.661000+03:00",
 "previous_event_id": 0,
 "input_details": {}
 },
 {
 "event_id": 6,
 "event_type": "stateExitedEventDetails",
 "event_name": "GetCredentials",
 "timestamp": "2021-06-10 23:25:30.280000+03:00",
 "previous_event_id": 5
 },
 {
 "event_id": 7,
 "event_type": "stateEnteredEventDetails",
 "event_name": "Wait1",
 "timestamp": "2021-06-10 23:25:30.289000+03:00",
 "previous_event_id": 6,
 "input_details": {}
 },
 {
 "event_id": 8,
 "event_type": "stateExitedEventDetails",
 "event_name": "Wait1",
 "timestamp": "2021-06-10 23:25:40.289000+03:00",
 "previous_event_id": 7
 },
 {
 "event_id": 9,
 "event_type": "stateEnteredEventDetails",
 "event_name": "Wait2",
 "timestamp": "2021-06-10 23:25:40.296000+03:00",
 "previous_event_id": 8,
 "input_details": {}
 },
 {
 "event_id": 10,
 "event_type": "executionFailedEventDetails",
 "timestamp": "2021-06-10 23:25:40.296000+03:00",
 "previous_event_id": 0,
 "error": {
 "type": "Runtime",
 "cause": "An error occurred while executing the state 'Wait2' (entered at the event id #9). The SecondsPath parameter does not reference an input value: $.request_payload.sec"
 }
 }
 ],
 "input": {
 "callback_url": "https://rock.site/09876ercftvghnj3iy4738c-3crv/",
 "transaction_id": "01FG3YHN4FCJ4EYW6326ZAQW6Y",
 "response_collection_id": "01FG3YHR1TYXTAAZZHMTX50HQV",
 "request_collection_id": "01FG3YHQW2TY3A2GVKX5SXAB4D"
 },
 "output": {
 "response_payload": {
 "api_key": "<redacted>",
 "domain": "organization-a1b2c3d4e5f6",
 "subdomain": "organization-a1b2c3d4e5f6.staircaseapi.com",
 "organization_id": "4321-4321-4321-432"
 }
 }
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request

```
{
 "message": {
 "schema_type": [
 "Must be one of: create, update."
 ]
 }
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
6
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `job_id` required | `string (uuid)` path | `7c668252-d2ba-job-id-896d-1f73236287d9` | <!--source:api-specifications-->Execution ID<!--/source--> |
| `product_name` required | `string` query | `environment-creator` | <!--source:api-specifications-->This parameter is required to be `environment-creator`. Anything else would cause a failure<!--/source--> |
| `detailed` | `string` query | `false` | <!--source:api-specifications-->Returns detailed execution history including execution data if set to `true`. Default `false`.<!--/source--> |
| `next_token` | `string` query | `oei09uo8yr7tvweyuni29eirv9kod` | <!--source:api-specifications-->If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.<!--/source--> |
| `reverse_order` | `string` query | `true` | <!--source:api-specifications-->Returns events in ascending order of their timeStamp if set to `false`. Default is descending `true`.<!--/source--> |
| `max_results` | `integer` query | `100` | <!--source:api-specifications-->The maximum number of results that are returned per call. You can use next-token to obtain further pages of results. The default is 50 and the maximum allowed page size is 1000. This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
6 fields
<!--/source-->
<!--source:api-specifications-->
Execution status successfully retrieved
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `status` | `string` | <!--source:api-specifications-->Execution status<!--/source-->`ABORTED``FAILED``RUNNING``SUCCEEDED``TIMED_OUT` |
| `executed_events` | `string[]` | <!--source:api-specifications-->List of executed events<!--/source--> |
| `last_event` | `string` | <!--source:api-specifications-->Last executed event<!--/source--> |
| `details` | `object[]` | <!--source:api-specifications-->Executed events details<!--/source--> |
| `input` | `object` | <!--source:api-specifications-->Short data you used for invoking the flow.<!--/source--> |
| `transaction_id`required | `string` | <!--source:api-specifications-->Transaction ID<!--/source--> |
| `request_collection_id`required | `string` | <!--source:api-specifications-->Request collection ID<!--/source--> |
| `response_collection_id`required | `string` | <!--source:api-specifications-->Response collection ID<!--/source--> |
| `callback_url`required | `string (uri)` | <!--source:api-specifications-->Destination URL on which final result of the flow execution was configured to be sent<!--/source--> |
| `output` | `object` | <!--source:api-specifications-->Short data of the output.<!--/source--> |
| `response_payload`required | `object` | <!--source:api-specifications-->Response payload.<!--/source--> |
| `api_key` | `string` | — |
| `domain` | `string` | — |
| `subdomain` | `string` | — |
| `organization_id` | `string` | — |
| `extraction_errors`required | `one of` | <!--source:api-specifications-->Extraction errors.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Either message or object with additional properties.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Forbidden
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Request forbidden -- authorization will not help<!--/source--> |
| `url` | `string (url)` | <!--source:api-specifications-->Indicates at which url the error occurs<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Partner, flow or execution not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Nothing matches the given URI<!--/source--> |

`POST` `/vendors/staircase/flows/env-create/jobs/{job_id}`

<!--source:api-specifications-->

#### Terminate Create Environment Flow Execution
<!--/source-->

`terminateCreateEnvironmentFlowExecution`

<!--source:api-specifications-->
Terminate execution of Create Environment Flow
<!--/source-->

<!--source:api-specifications-->
This endpoint allows stopping execution of Create Environment Flow.

<!--/source-->

##### Response

<!--source:api-specifications-->
201400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Execution successfully terminated

```
{
 "job_id": "9348765c-2eda-46d6-9214-7119c175dc5f",
 "status": "ABORTED",
 "stop_date": "2021-06-25 13:15:34.447000+03:00"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request

```
{
 "message": {
 "schema_type": [
 "Must be one of: create, update."
 ]
 }
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `job_id` required | `string (uuid)` path | `7c668252-d2ba-job-id-896d-1f73236287d9` | <!--source:api-specifications-->Execution ID<!--/source--> |
| `product_name` required | `string` query | `environment-creator` | <!--source:api-specifications-->This parameter is required to be `environment-creator`. Anything else would cause a failure<!--/source--> |

##### Response `201``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Execution successfully terminated
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `job_id` | `string` | <!--source:api-specifications-->Execution job id.<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Status of the execution.<!--/source--> |
| `stop_date` | `string` | <!--source:api-specifications-->Stop date.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Either message or object with additional properties.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Forbidden
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Request forbidden -- authorization will not help<!--/source--> |
| `url` | `string (url)` | <!--source:api-specifications-->Indicates at which url the error occurs<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Partner, flow or execution not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Nothing matches the given URI<!--/source--> |

`GET` `/vendors/staircase/flows/env-create/executions`

<!--source:api-specifications-->

#### List Create Environment Flow Executions
<!--/source-->

`listCreateEnvironmentFlowExecutions`

<!--source:api-specifications-->
Retrieve flow executions status
<!--/source-->

<!--source:api-specifications-->
This endpoint allows getting status of flow executions.

<!--/source-->

##### Response

<!--source:api-specifications-->
200400
<!--/source-->

<!--source:api-specifications-->
application/json Copy Executions list successfully retrieved

```
{
 "executions": [
 {
 "job_id": "6b54387a-fe7e-4fb0-ad2a-40c70ebd0f1c",
 "flow_name": "ocrolus-ide-classify-and-extract",
 "status": "SUCCEEDED",
 "start_date": "2021-06-25 13:34:56.441000+03:00",
 "stop_date": "2021-06-25 13:37:31.348000+03:00"
 },
 {
 "job_id": "a32f4f6b-a906-4b11-9f96-edaf1dcac592",
 "flow_name": "ocrolus-ide-classify-and-extract",
 "status": "ABORTED",
 "start_date": "2021-06-25 13:06:42.681000+03:00",
 "stop_date": "2021-06-25 13:15:34.447000+03:00"
 },
 {
 "job_id": "57340187-45f2-41ea-984a-cdc731a2d7f0",
 "flow_name": "ocrolus-ide-classify-and-extract",
 "status": "FAILED",
 "start_date": "2021-06-25 13:02:19.838000+03:00",
 "stop_date": "2021-06-25 13:11:07.252000+03:00"
 }
 ],
 "next_token": "AAAAKgAAAAIAAAAAAAAAAcsQMPbdXoFFnzT2rEqFsqrT0zHE/qEYZz+7bsEqn/szszKZGF+UqlAFcP48NpKsyXcxMIaopLnNb398gvFSPLP1AeV3K35+eWnxTNf0J8w+v3jiBLuzY/EaIPtvKlsUP7d1ARcA5Z2pppZqUkDNXgOqxMQTZPAbmyBNST+OdPbMylcX275vZ/0X4PyPvxnYgp53L97rJ0JMcQT/2+/Y8NAJQxsUESi00tv9E/glloA4hyvPAuFW6rZL8VY5bU7kh4LiPL9BmOhKaN+0QazQxaJZJmStj6jN2F27v0FpSkyl+ENTy4nZrw40PlRzg6Es8gZjxouPRD9erBiTahioV4lW9jpIu82rXX4N6e6lK5sfN+p68qNorq+F7jp9LokkC3idROMs4iB4OX2rX7YguDIbgg0NZneQndTE+Opph7eXlxMAXMIbxpSgI5TYyCQIP1GjsE66dCPldJBoogFv9IIEnt/38ZLpyOwwQnGVOLw8O/ARwH+Ev52AJIVUGVNqTA=="
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request

```
{
 "message": {
 "schema_type": [
 "Must be one of: create, update."
 ]
 }
}
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
4
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `product_name` required | `string` query | `environment-creator` | <!--source:api-specifications-->This parameter is required to be `environment-creator`. Anything else would cause a failure<!--/source--> |
| `next_token` | `string` query | `p9208y937gtyuhoivju38hry0gvy3ruhifnc3kcd` | <!--source:api-specifications-->If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.<!--/source--> |
| `status_filter` | `string` query | `ABORTED` | <!--source:api-specifications-->If specified, only list the executions whose current execution status matches the given filter.<!--/source--> |
| `max_results` | `integer` query | `100` | <!--source:api-specifications-->The maximum number of results that are returned per call. You can use next-token to obtain further pages of results. The default is 50 and the maximum allowed page size is 1000. This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Executions list successfully retrieved
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `next_token` | `string` | <!--source:api-specifications-->Pagination token to get next results<!--/source--> |
| `executions` | `object[]` | <!--source:api-specifications-->List of executions<!--/source--> |
| `job_id` | `string` | <!--source:api-specifications-->Execution ID<!--/source--> |
| `flow_name` | `string` | <!--source:api-specifications-->Flow name<!--/source--> |
| `status` | `string` | <!--source:api-specifications-->Execution status<!--/source--> |
| `start_date` | `string` | <!--source:api-specifications-->Execution start date<!--/source--> |
| `stop_date` | `string` | <!--source:api-specifications-->Execution stop date<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `one of` | <!--source:api-specifications-->Either message or object with additional properties.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Forbidden
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Request forbidden -- authorization will not help<!--/source--> |
| `url` | `string (url)` | <!--source:api-specifications-->Indicates at which url the error occurs<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Partner, flow or execution not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Nothing matches the given URI<!--/source--> |

<!--source:api-specifications-->

### Operations
<!--/source-->

`POST` `/activate-auth-token`

<!--source:api-specifications-->

#### Activate auth token
<!--/source-->

`activate-auth-token`

<!--source:api-specifications-->
Activates the authentication token on the given environment such token is used for performing operations of management in the environment where the environment product is deployed. IMPORTANT right after deploying environment manager this endpoint should be called, the environment token retrieved by the service should be stored as it is a one time only allowed operation

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
1
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `api_key`required | `string (uuid)` | <!--source:api-specifications-->API-KEY received via email upon account creation<!--/source-->Example `<redacted>` |

##### Response `200``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Token activated.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message`required | `string` | <!--source:api-specifications-->Successful token activation message.<!--/source-->`Auth Token activated successfully` |
| `token`required | `string` | <!--source:api-specifications-->Authorization Token<!--/source-->Example `<redacted>` |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access.<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation failure.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`POST` `/disable-environment`

<!--source:api-specifications-->

#### Disable environment
<!--/source-->

`disableEnvironment`

<!--source:api-specifications-->
Disable environment used to disable and delete all the resources of a staircase environment assigned to the API-KEY provided.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/jsonExample
<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "subdomain": "environment-manager"
}
```

<!--/source-->

<!--source:api-specifications-->
application/json Copy
```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "subdomain": "mycoolsubdomain"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->API-KEY for using the endpoint.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token.<!--/source--> |

##### Request body`application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `api_key`required | `string` | <!--source:api-specifications-->API-KEY assigned to the environment to be disabled<!--/source--> |
| `subdomain`required | `string` | <!--source:api-specifications-->Subdomain assigned to the environment to be disabled<!--/source--> |

##### Response `202``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Environment disabled.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `message`required | `string` | <!--source:api-specifications-->Disable process status message.<!--/source--> |
| `status`required | `string` | <!--source:api-specifications-->Status of the disabling process.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Unauthorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |
| `Message` | `string` | <!--source:api-specifications-->Access denied error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |
| `Message` | `string` | <!--source:api-specifications-->Access denied error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment disable failure.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`POST` `/documentation-activate-key`

<!--source:api-specifications-->

#### Documentation environment key activation
<!--/source-->

`activateKey`

<!--source:api-specifications-->
This service activates your API key and enables you to preview Staircase product APIs.

<!--/source-->

##### Request

<!--source:api-specifications-->
application/json Copy
```
{
 "api_key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Request body`application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `api_key`required | `string` | <!--source:api-specifications-->API-KEY to be activated in the documentation environment.<!--/source-->Example `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Key activated.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `fqdn`required | `string` | <!--source:api-specifications-->Fully qualified domain name of the environment where the key was activated.<!--/source--> |
| `status`required | `string` | <!--source:api-specifications-->Status of the key activation.<!--/source--> |
| `message`required | `string` | <!--source:api-specifications-->Message about the key activation.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Forbidden
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Key Activation error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/env-tools/maintenance-access`

<!--source:api-specifications-->

#### Maintenance access
<!--/source-->

<!--source:api-specifications-->
Retrieve a set of temporal credential for the environment to perform maintenance or support tasks

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad Request

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
4
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorizartion token<!--/source--> |
| `resource_type` | `string` query | `logs` | <!--source:api-specifications-->resource type for which the access will be granted<!--/source--> |
| `access_level` | `string` query | `read` | <!--source:api-specifications-->level of access to the resource<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
3 fields
<!--/source-->
<!--source:api-specifications-->
Temporal login credentials
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `username` | `string` | <!--source:api-specifications-->Username allowed for the temporal access.<!--/source--> |
| `account_alias` | `string` | <!--source:api-specifications-->Account alias to be used for accessing.<!--/source--> |
| `password` | `string` | <!--source:api-specifications-->One time Password.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Bad Request
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL of the documentation<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Access Denied
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting proper access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting proper access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Maintenance access failure.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

`GET` `/environment/{api_key}`

<!--source:api-specifications-->

#### Get environment status
<!--/source-->

`get-environment`

<!--source:api-specifications-->
Get environment Fetch environment status.

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |
| `api_key` required | `string` path | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->Environment API-KEY<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment creation failure.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`200`

`GET` `/list-environments`

<!--source:api-specifications-->

#### List active environments
<!--/source-->

`list-environments`

<!--source:api-specifications-->
List environments Fetch list of active environments.

<!--/source-->

##### Response

<!--source:api-specifications-->
400 application/json400 text/html
<!--/source-->

<!--source:api-specifications-->
application/json Copy Bad request.

```
Bad request
```

<!--/source-->

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
2
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token.<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the list of child environment active.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `environments`required | `object[]` | <!--source:api-specifications-->List of active child environments FQDN and service API-KEY<!--/source--> |
| `fqdn` | `string` | <!--source:api-specifications-->Domain name of the environment.<!--/source--> |
| `service-key` | `string` | <!--source:api-specifications-->API-KEY of the environment.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Environment not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `422``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Server error
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Other responses

`401`

`GET` `/service-key/{api_key}`

<!--source:api-specifications-->

#### Get service API-KEY
<!--/source-->

`get-service-key`

<!--source:api-specifications-->
Get service key Fetch service key value.

<!--/source-->

##### Response

<!--source:api-specifications-->
text/html Copy Bad request.

```
<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n</body>\r\n</html>\r\n
```

<!--/source-->

##### Parameters

<!--source:api-specifications-->
3
<!--/source-->

| Parameter | Type | Example | Description |
| --- | --- | --- | --- |
| `x-api-key` required | `string` header | `<redacted>` | <!--source:api-specifications-->X-API-KEY for using the service.<!--/source--> |
| `Authorization` required | `string` header | `<redacted>` | <!--source:api-specifications-->Authorization token.<!--/source--> |
| `api_key` required | `string` path | `<redacted>` | <!--source:api-specifications-->Environment API-KEY<!--/source--> |

##### Response `200``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Response body with the environment status and, environment details
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `service_key`required | `string` | <!--source:api-specifications-->UUID value of the service key.<!--/source--> |

##### Response `400``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Bad request.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `401``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `403``application/json`

<!--source:api-specifications-->
2 fields
<!--/source-->
<!--source:api-specifications-->
Not Authorized
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `url` | `string` | <!--source:api-specifications-->URL for getting access<!--/source--> |
| `message` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `404``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Not found
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

##### Response `500``application/json`

<!--source:api-specifications-->
1 fields
<!--/source-->
<!--source:api-specifications-->
Service key error.
<!--/source-->

| Field | Type | Description |
| --- | --- | --- |
| `error` | `string` | <!--source:api-specifications-->Error message.<!--/source--> |

## Errors

`400``401``403``404``422``500`

## More in Distribution

- Previous product: Console
- Next product: Finance
