Environments Manager API
Overview
This document describes the way the Environments Manager API interacts and allows the Environments Manager to transfer applications' information between different OCP environments.
Authentication
Navigate to the API Authentication to learn more about Authorization Token Endpoint and Authentication process.
HTTP Code Responses
Omilia's HTTP response codes can be found on the HTTP Codes Responses page.
API Reference
Status
Get an application status
GET | {{baseUrl}}/envs-manager/api/status | Fetches API version, authentication parameters, and external services status. |
---|
Response 200 (Success)
{
"name": "envs-manager-api",
"version": "1.17.0",
"auth": {
"realm": "master",
"client_id": "ocp",
"url": "https://auth.aws-dev-m.ocp.ai/auth"
},
"meta": {
"server_start_time": "2024-09-30T11:31:52.091180+00:00",
"services_status": {}
}
}
Parameter | Type | Description | |
---|---|---|---|
| String | The name of the API. | |
| String | The version of the API currently running. | |
| Object | An object containing authentication parameters. | |
| String | The name of the realm. | |
| String | The ID of the client. | |
| String | The URL of the authentication service endpoint. | |
| Object | Metadata. | |
| String | The timestamp when the server was started, formatted in ISO 8601. For example: | |
| Map | Includes dynamic key-value pairs representing the status of various external services the application depends on. Each key within this object represents the name of a particular external service, and the associated value provides the status of that service. |
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
}
Property | Type | Description | |
---|---|---|---|
| Array of objects | A list of error objects providing details about the request failure. | |
| String | A unique error code representing the specific type of error. | |
| String | An explanation of the error. | |
| Object | An optional object containing additional metadata about the error. | |
| String | Indicates the location of the problem within the request. For example: | |
| Integer | Indicates the HTTP status code associated with the error. Check out HTTP Codes Responses for more information. | |
| String | A short summary of the error type. This helps to quickly understand the nature of the problem. Example: "Bad Request". |
Authentication
Get a token
POST | {{baseUrl}}/envs-manager/api/v1/auth/token | Acquires an access token by providing username and password. |
---|
Body parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The name of the user. |
| String | Yes | The user’s password. |
Response 200 (Success)
{
"access_token": "string"
}
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Introspect token
GET | {{baseUrl}}/envs-manager/api/v1/auth/token/introspect | Retrieves the endpoint to introspect tokens. |
---|
Response 200 (Success)
{
"data": {
"sub": "string",
"email": "string",
"preferred_username": "string",
"resource_access": {
"ocp": {
"roles": [
"string"
]
}
},
"ocp_groups": [],
"given_name": "string",
"family_name": "string"
}
}
Property | Type | Description | |||
---|---|---|---|---|---|
| Object | The object containing the details of the introspected token. | |||
| String | ||||
| String | The email address associated with the user. | |||
| String | The username the user uses to log in. | |||
| Object | ||||
| Object | ||||
| Array of strings | A list of standard and custom roles assigned to the user. | |||
| Array | A list of groups that the user belongs to. | |||
| String | The first name of the user. | |||
| String | The last name of the user. |
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Get permissions
GET | {{baseUrl}}/envs-manager/api/v1/auth/{group}/permissions | Retrieves available permissions for a user group. |
---|
Query parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The name of the group. |
Response 200 (Success)
{
{
"total": 0,
"data": [
"string"
]
}
}
Property | Type | Description |
---|---|---|
| Integer | The total number of available permissions for a group. |
| Array of strings | The list of available permissions for a group. |
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Get user groups
GET | {{baseUrl}}/envs-manager/api/v1/auth/user/groups | Retrieves groups available for a user. |
---|
Response 200 (Success)
{
{
"total": 0,
"data": [
"string"
]
}
}
Property | Type | Description |
---|---|---|
| Integer | The total number of available groups for a user. |
| Array of strings | The list of available groups for a user. |
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Applications
Export an application
GET | {{baseUrl}}/envs-manager/api/v1/apps/{{app_id}}/export | Exports an application. |
---|
Query parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application ID. |
Response 200 (Success)
{
"data": "string
}
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Export a tag
GET | {{baseUrl}}/envs-manager/api/v1/apps/{{app_id}}/tags/{{tag}}/export | Exports an application tag. |
---|
Body parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application ID. |
| String | Yes | The application tag. |
Response 200 (Success)
"string"
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Promote an application
POST | {{baseUrl}}/envs-manager/api/v1/apps/{{app_id}}/promote | Promotes an application. |
---|
URL parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application ID. |
Response 200 (Success)
{
"data": "string"
}
Response 202 (Accepted)
{
"data": "string"
}
Response 422 (Unprocessable Entity)
{
"errors": [
{
"status": 400,
"code": "1022",
"title": "Bad Request",
"detail": "Description too long",
"source": "/body/description",
"meta": {}
}
]
}
Response 409 (Conflict)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Promote a tag
POST | {{baseUrl}}/envs-manager/api/v1/apps/{{app_id}}/tags/{{tag}}/promote | Promotes an application tag. |
---|
Body parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application tag. |
| String | Yes | The application ID. |
Response 200 (Success)
{
"data": "string"
}
Response 202 (Accepted)
{
"data": "string"
}
Response 422 (Unprocessable Entity)
{
"errors": [
{
"status": 400,
"code": "1022",
"title": "Bad Request",
"detail": "Description too long",
"source": "/body/description",
"meta": {}
}
]
}
Response 409 (Conflict)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Import file
POST | {{baseUrl}}/envs-manager/api/v1/apps/import | Imports an application. |
---|
Headers
Content-type : multipart/form-data
Body parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application file. |
| String | No | The unique name of the application that is being imported. |
| String | Yes | Defines the group where the application will be imported. |
| Boolean | No | Defines whether NLUs that exist in target environment are included. Default is false. |
| Boolean | No | The parameter used to import NLUs without creating the models, only apps. (Default is false) |
Response 200 (Success)
{
"data": "string"
}
Response 202 (Accepted)
{
"data": "string"
}
Response 422 (Unprocessable Entity)
{
"errors": [
{
"status": 400,
"code": "1022",
"title": "Bad Request",
"detail": "Description too long",
"source": "/body/description",
"meta": {}
}
]
}
Response 409 (Conflict)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Import tag
POST | {{baseUrl}}/envs-manager/api/v1/apps/{{app_id}}/tags/import | Imports the resources provided in the ZIP file but only in the runtime. |
---|
URL Parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application ID. |
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application file. |
| String | No | The type of deployment. |
Response 202 (Accepted)
{
"data": "string"
}
Response 422 (Unprocessable Entity)
{
"errors": [
{
"status": 400,
"code": "1022",
"title": "Bad Request",
"detail": "Description too long",
"source": "/body/description",
"meta": {}
}
]
}
Response 409 (Conflict)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
List application tags
GET | {{baseUrl}}/envs-manager/api/v1/apps/{app_id}/{deployment_env}/tags | Retrieves all available tags for a selected application. |
---|
Query parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application ID. |
| String | Yes | The deployment environment. Supported values: |
Response 200 (Success)
{
"total": 0,
"data": [
"string"
]
}
Property | Type | Description |
---|---|---|
| Integer | The total number of the tags. |
| Array of strings | The list of available application tags names. |
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Delete application tag
DELETE | {{baseUrl}}/envs-manager/api/v1/apps/{{app_id}}/tags/{{tag}} | Deletes an application tag. |
---|
Body parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application tag. |
| String | Yes | The application ID. |
Response 200 (Success)
"string"
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Get applications
GET | {{baseUrl}}/envs-manager/api/v1/apps | Retrieves all the applications. |
---|
Response 200 (Success)
[
{
"id": "string",
"created_at": "2023-06-20T12:50:54.362Z",
"updated_at": "2023-06-20T12:50:54.362Z",
"user_id": "string",
"name": "string",
"group": "string",
"component_id": "string",
"sandbox_flowapp_id": "string",
"production_flowapp_id": "string"
}
]
Property | Type | Description |
---|---|---|
| String | The ID of the application. |
| String | The timestamp when the application was created, formatted in ISO 8601. For example: |
| String | The timestamp when the application was updated, formatted in ISO 8601. For example: |
| String | The ID of the user who created the application. |
| String | The name of the application. |
| String | The group the application belongs to. |
| String | An ID consisting of five following parts: |
| String | The ID of the sandbox application. |
| String | The ID of the production application. |
Response 422 (Unprocessable Entity)
{
"errors": [
{
"status": 400,
"code": "1022",
"title": "Bad Request",
"detail": "Description too long",
"source": "/body/description",
"meta": {}
}
]
}
Get an application
GET | {{baseUrl}}/envs-manager/api/v1/apps/{app_id} | Retrieves information about an application. |
---|
Path parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The application ID. |
Response 200 (Success)
[
{
"id": "string",
"created_at": "2023-06-20T12:50:54.362Z",
"updated_at": "2023-06-20T12:50:54.362Z",
"user_id": "string",
"name": "string",
"group": "string",
"component_id": "string",
"sandbox_flowapp_id": "string",
"production_flowapp_id": "string"
}
]
Find more information of the properties description in the response of the Get applications endpoint.
Response 422 (Unprocessable Entity)
{
"errors": [
{
"status": 400,
"code": "1022",
"title": "Bad Request",
"detail": "Description too long",
"source": "/body/description",
"meta": {}
}
]
}
Results
Get a result
GET | {{baseUrl}}/envs-manager/api/v1/results/{result_id} | Get result for an asyncronous application import and promotion. |
---|
Path parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The ID of the result. |
Response 200 (Success)
{
"data": "string"
}
Response 422 (Unprocessable Entity)
{
"errors": [
{
"status": 400,
"code": "1022",
"title": "Bad Request",
"detail": "Description too long",
"source": "/body/description",
"meta": {}
}
]
}
Variables Collections
List collections
GET | {{baseUrl}}/envs-manager/api/v1/variables-collections | List collections. |
---|
Query parameters
Parameter | Type | Required | Description |
---|---|---|---|
| Integer | No | The offset value. The default value is 0. |
| Integer | No | Default value: |
| String | No | The way the collections should be ordered. Default value: |
| String | No | The direction the variables should be order, either ascending or ascending. Default value: |
| String | No | The name of the application. |
| String | No | The name of the group. |
| String | No | The name of the tag. |
| String | No | Use this parameter to get results based on a specified search term. |
| Boolean | No | Indicates whether the list of variables should be included in the response. This option is applicable only when you specify the exact |
Response 200 (Success)
{
"total": 0,
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-10-11T15:02:28.538Z",
"updated_at": "2024-10-11T15:02:28.538Z",
"group": "string",
"name": "string",
"app_name": "string",
"path": "string",
"prd_path": "string",
"tag": "",
"variables": [
{
"key": "FL3jJuPvlmoEWjv4kYUC4dniTeKVeaJdnDu",
"masked": true,
"skip_overwrite": true,
"description": "",
"log": true
}
]
}
]
}
Property | Type | Description | ||
---|---|---|---|---|
| Integer | The total number of collections. | ||
| Array of strings | List of collections with the associated data. | ||
| String | The ID number of the collection. | ||
| String | The time and date of the collection creation. | ||
| String | The time and date of the collection update. | ||
| String | The group the application is assigned to | ||
| String | The name of the variable collection. | ||
| String | The name of the application the variable collection belongs to. | ||
| String | The ORN returned by the storage API, serving as a unique identifier for the location of the variables file in the SND environment. | ||
| String | The ORN returned by the storage API, serving as a unique identifier for the location of the variables file in the PRD environment. | ||
| String | The name of the application tag. | ||
| Array | The list of variables in the collection. | ||
| String | The name of the key. | ||
| Boolean | If true, the value will be treated as sensitive and will not be logged or overwritten. | ||
| Boolean | This property applies exclusively to unmasked variables! If true, the value will not be updated during the import. | ||
| String | An optional description for the variable. | ||
| Boolean | If false, the unmasked variables will not be logged to save space. |
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Create a collection
POST | {{baseUrl}}/envs-manager/api/v1/variables-collections | Creates a collection. |
---|
Request Body
{
"name": "string",
"group": "string",
"app_name": "string"
}
Parameter | Type | Required | Description | ||
---|---|---|---|---|---|
| String | Yes | The name of the collection that is being created. | ||
| String | Yes | The group the application is assigned to. | ||
| String | Yes | The name of the application the collection is being created for. |
Response 201 (Success)
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-10-14T11:11:47.958Z",
"updated_at": "2024-10-14T11:11:47.958Z",
"group": "string",
"name": "string",
"app_name": "string",
"path": "string",
"prd_path": "string",
"tag": "",
"variables": [
"string"
]
}
}
Property | Type | Description | |
---|---|---|---|
| Array of strings | The created collection with the associated data. | |
| String | The ID number of the collection. | |
| String | The time and date of the collection creation. | |
| String | The time and date of the collection update. | |
| String | The group the application is assigned to | |
| String | The name of the variable collection. | |
| String | The name of the application the variable collection belongs to. | |
| String | ||
| String | ||
| String | The name of the application tag. | |
| Array of strings | The list of variables in the collection. |
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Create a collection tag
POST | {{baseUrl}}/envs-manager/api/v1/variables-collections/{collection_id}/tag | Creates a collection tag. |
---|
Path parameters
Parameter | Type | Required | Description |
---|---|---|---|
| String | Yes | The ID of the collection. |
Request body
{
"tag": "string"
}
Response 200 (Success)
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-11-04T14:14:36.236Z",
"updated_at": "2024-11-04T14:14:36.236Z",
"group": "string",
"name": "string",
"app_name": "string",
"path": "string",
"prd_path": "string",
"tag": "",
"variables": [
"string"
]
}
}
Find the description of the response properties in the Create collection endpoint.
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Response 409 (Conflict)
{
"data": "string"
}
Get a collection
GET | {{baseUrl}}/envs-manager/api/v1/variables-collections/{collection_id} | Retrieves a collection. |
---|
Path parameters
Parameter | Type | Required | Description | ||
---|---|---|---|---|---|
| String | Yes | The ID of the collection. |
Response 200 (Success)
{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-10-11T15:02:28.538Z",
"updated_at": "2024-10-11T15:02:28.538Z",
"group": "string",
"name": "string",
"app_name": "string",
"path": "string",
"prd_path": "string",
"tag": "",
"variables": [
{
"key": "FL3jJuPvlmoEWjv4kYUC4dniTeKVeaJdnDu",
"masked": true,
"skip_overwrite": true,
"description": "",
"log": true
}
]
}
]
}
Find more information about this response in the List collection endpoint.
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Update a collection
PUT | {{baseUrl}}/envs-manager/api/v1/variables-collections/{collection_id} | Updates a collection. |
---|
Path parameters
Parameter | Type | Required | Description | ||
---|---|---|---|---|---|
| String | Yes | The ID of the collection. |
Request Body
{
"name": "string"
}
Response 200 (Success)
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-10-29T15:26:32.762Z",
"updated_at": "2024-10-29T15:26:32.762Z",
"group": "string",
"name": "string",
"app_name": "string",
"path": "string",
"prd_path": "string",
"tag": "",
"variables": [
{
"key": "j2vnKssSFMTYlKs2sX7z93jgkOVqnTw6meTasBgH41lnfYSl_D5Vda_yIiXvurprgc5dTJHXXbAxv5MRpywuPZMT9g7dwhpc7Wf",
"masked": true,
"skip_overwrite": true,
"description": "",
"log": true
}
]
}
}
Find more information about this response in the List collection endpoint.
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Delete a collection
DELETE | {{baseUrl}}/envs-manager/api/v1/variables-collections/{collection_id} | Deletes a collection. |
---|
Path parameters
Parameter | Type | Required | Description | ||
---|---|---|---|---|---|
| String | Yes | The ID of the collection. |
Response 204 (Success)
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}
Upsert variables
PATCH | {{baseUrl}}/envs-manager/api/v1/variables-collections/{collection_id}/variables | Update, Create or Delete variables. |
---|
Path parameters
Parameter | Type | Required | Description | ||
---|---|---|---|---|---|
| String | Yes | The ID of the collection. |
Request Body
[
{
"key": "iws8badIu1BfuptBAcSlUhKp_NHpYG4jFR",
"masked": true,
"skip_overwrite": true,
"description": "",
"log": true,
"snd_value": "string",
"prd_value": "string",
"_destroy": true
}
]
Parameter | Required | Type | Description |
---|---|---|---|
| Yes | String | The ID number of the collection. |
| Yes | Boolean | If true, the value will be treated as sensitive and will not be logged or overwritten. |
| No | Boolean | Only applicable for unmasked variables! If true, the value will not be updated during the application import. The default value is true. |
| No | String | An optional description for the variable. |
| No | Boolean | Only applicable for unmasked variables! If true, the unmasked variables will not be logged to save space. The default value is true. |
| Yes | String | Sandbox value for the variable. |
| Yes | String | Production value for the variable. |
| Yes | Boolean | If true, the variable with the specified key will be deleted. The default value is false. |
Response 200 (Success)
{
"total": 0,
"data": [
{
"key": "SPgsjDdnfxNhh_LKEETt6i2Zg87Dd_82xb82xFzV7W7fVr4gE5chxXht2pk6UkROVYu5lT_VLF8W5zyyE8Au7EPzfEeuxLVH",
"masked": true,
"skip_overwrite": true,
"description": "",
"log": true,
"snd_value": "string",
"prd_value": "string"
}
]
}
Response 422 (Unprocessable Entity)
{
"errors": [
{
"code": "1022",
"detail": "Description too long",
"meta": {},
"source": "/body/description",
"status": 400,
"title": "Bad Request"
}
]
}