Skip to main content
Skip table of contents

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.

Click to see the details

Response 200 (Success)

JSON
{
  "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

name

String

The name of the API.

version

String

The version of the API currently running.

auth

Object

An object containing authentication parameters.

realm

String

The name of the realm.

client_id

String

The ID of the client.

url

String

The URL of the authentication service endpoint.

meta

Object

Metadata.

server_start_time

String

The timestamp when the server was started, formatted in ISO 8601.

For example: 2023-12-08T13:50:22.371715+00:00

services_status

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)

JSON
{
  "errors": [
    {
      "code": "1022",
      "detail": "Description too long",
      "meta": {},
      "source": "/body/description",
      "status": 400,
      "title": "Bad Request"
    }
  ]
}
}

Property

Type

Description

errors

Array of objects

A list of error objects providing details about the request failure.

code

String

A unique error code representing the specific type of error.

detail

String

An explanation of the error.

meta

Object

An optional object containing additional metadata about the error.

source

String

Indicates the location of the problem within the request. For example: /body/description

status

Integer

Indicates the HTTP status code associated with the error. Check out HTTP Codes Responses for more information.

title

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.

Click to see the details

Body parameters

Parameter

Type

Required

Description

username

String

Yes

The name of the user.

password

String

Yes

The user’s password.

Response 200 (Success)

JSON
{
  "access_token": "string"
}

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Response 200 (Success)

JSON
{
  "data": {
    "sub": "string",
    "email": "string",
    "preferred_username": "string",
    "resource_access": {
      "ocp": {
        "roles": [
          "string"
        ]
      }
    },
    "ocp_groups": [],
    "given_name": "string",
    "family_name": "string"
  }
}

Property

Type

Description

data

Object

The object containing the details of the introspected token.

sub

String

email

String

The email address associated with the user.

preferred_username

String

The username the user uses to log in.

resource_access

Object

ocp

Object

roles

Array of strings

A list of standard and custom roles assigned to the user.

ocp_groups

Array

A list of groups that the user belongs to.

given_name

String

The first name of the user.

family_name

String

The last name of the user.

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Query parameters

Parameter

Type

Required

Description

group

String

Yes

The name of the group.

Response 200 (Success)

JSON
{
 {
  "total": 0,
  "data": [
    "string"
  ]
}
}

Property

Type

Description

total

Integer

The total number of available permissions for a group.

data

Array of strings

The list of available permissions for a group.

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Response 200 (Success)

JSON
{
 {
  "total": 0,
  "data": [
    "string"
  ]
}
}

Property

Type

Description

total

Integer

The total number of available groups for a user.

data

Array of strings

The list of available groups for a user.

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Query parameters

Parameter

Type

Required

Description

app_id

String

Yes

The application ID.

Response 200 (Success)

JSON
{
  "data": "string
}

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Body parameters

Parameter

Type

Required

Description

app_id

String

Yes

The application ID.

tag

String

Yes

The application tag.

Response 200 (Success)

JSON
"string"

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

URL parameters

Parameter

Type

Required

Description

app_id

String

Yes

The application ID.

Response 200 (Success)

JSON
{
  "data": "string"
}

Response 202 (Accepted)

JSON
{
  "data": "string"
}

Response 422 (Unprocessable Entity)

JSON
{
  "errors": [
    {
      "status": 400,
      "code": "1022",
      "title": "Bad Request",
      "detail": "Description too long",
      "source": "/body/description",
      "meta": {}
    }
  ]
}

Response 409 (Conflict)

JSON
{
  "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.

Click to see the details

Body parameters

Parameter

Type

Required

Description

tag

String

Yes

The application tag.

app_id

String

Yes

The application ID.

Response 200 (Success)

JSON
{
  "data": "string"
}

Response 202 (Accepted)

JSON
{
  "data": "string"
}

Response 422 (Unprocessable Entity)

JSON
{
  "errors": [
    {
      "status": 400,
      "code": "1022",
      "title": "Bad Request",
      "detail": "Description too long",
      "source": "/body/description",
      "meta": {}
    }
  ]
}

Response 409 (Conflict)

JSON
{
  "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.

Click to see the details

Headers

Content-type : multipart/form-data

Body parameters

Parameter

Type

Required

Description

file

String

Yes

The application file.

target_app_name

String

No

The unique name of the application that is being imported.

target_group

String

Yes

Defines the group where the application will be imported.

include_nlu

Boolean

No

Defines whether NLUs that exist in target environment are included. Default is false.

skip_nlu_models

Boolean

No

The parameter used to import NLUs without creating the models, only apps. (Default is false)

Response 200 (Success)

JSON
{
  "data": "string"
}

Response 202 (Accepted)

JSON
{
  "data": "string"
}

Response 422 (Unprocessable Entity)

JSON
{
  "errors": [
    {
      "status": 400,
      "code": "1022",
      "title": "Bad Request",
      "detail": "Description too long",
      "source": "/body/description",
      "meta": {}
    }
  ]
}

Response 409 (Conflict)

JSON
{
  "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.

Click to see the details

URL Parameters

Parameter

Type

Required

Description

app_id

String

Yes

The application ID.

Body Parameters

Parameter

Type

Required

Description

file

String

Yes

The application file.

deployment_type

String

No

The type of deployment.

Response 202 (Accepted)

JSON
{
  "data": "string"
}

Response 422 (Unprocessable Entity)

JSON
{
  "errors": [
    {
      "status": 400,
      "code": "1022",
      "title": "Bad Request",
      "detail": "Description too long",
      "source": "/body/description",
      "meta": {}
    }
  ]
}

Response 409 (Conflict)

JSON
{
  "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.

Click to see the details

Query parameters

Parameter

Type

Required

Description

app_id

String

Yes

The application ID.

deployment_env

String

Yes

The deployment environment.

Supported values: snd, prd.

Response 200 (Success)

JSON
{
  "total": 0,
  "data": [
    "string"
  ]
}

Property

Type

Description

total

Integer

The total number of the tags.

data

Array of strings

The list of available application tags names.

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Body parameters

Parameter

Type

Required

Description

tag

String

Yes

The application tag.

app_id

String

Yes

The application ID.

Response 200 (Success)

JSON
"string"

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Response 200 (Success)

JSON
[
  {
    "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

id

String

The ID of the application.

created_at

String

The timestamp when the application was created, formatted in ISO 8601.

For example: 2023-06-20T12:50:54.362Z

updated_at

String

The timestamp when the application was updated, formatted in ISO 8601.

For example: 2023-06-20T12:50:54.362Z

user_id

String

The ID of the user who created the application.

name

String

The name of the application.

group

String

The group the application belongs to.

component_id

String

An ID consisting of five following parts: user_id, name, block type, diamant_app and group name.

sandbox_flowapp_id

String

The ID of the sandbox application.

production_flowapp_id

String

The ID of the production application.

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Path parameters

Parameter

Type

Required

Description

app_id

String

Yes

The application ID.

Response 200 (Success)

JSON
[
  {
    "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)

JSON
{
  "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.

Click to see the details

Path parameters

Parameter

Type

Required

Description

result_id

String

Yes

The ID of the result.

Response 200 (Success)

JSON
{
  "data": "string"
}

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Query parameters

Parameter

Type

Required

Description

offset

Integer

No

The offset value. The default value is 0.

limit

Integer

No

Default value: 100

order_by

String

No

The way the collections should be ordered.
Available values: name, app_name, group, created_at, tag

Default value: created_at

direction

String

No

The direction the variables should be order, either ascending or ascending.
Available values: ASC, DESC

Default value: ASC

app_name

String

No

The name of the application.

group

String

No

The name of the group.

tag

String

No

The name of the tag.

search_term

String

No

Use this parameter to get results based on a specified search term.

include_variables

Boolean

No

Indicates whether the list of variables should be included in the response. This option is applicable only when you specify the exact app_name, group, and/or tag.

Response 200 (Success)

JSON
{
  "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

total

Integer

The total number of collections.

data

Array of strings

List of collections with the associated data.

id

String

The ID number of the collection.

created_at

String

The time and date of the collection creation.

updated_at

String

The time and date of the collection update.

group

String

The group the application is assigned to

name

String

The name of the variable collection.

app_name

String

The name of the application the variable collection belongs to.

path

String

The ORN returned by the storage API, serving as a unique identifier for the location of the variables file in the SND environment.

prd_path

String

The ORN returned by the storage API, serving as a unique identifier for the location of the variables file in the PRD environment.

tag

String

The name of the application tag.

variables

Array

The list of variables in the collection.

key

String

The name of the key.

masked

Boolean

If true, the value will be treated as sensitive and will not be logged or overwritten.

skip_overwrite

Boolean

This property applies exclusively to unmasked variables!

If true, the value will not be updated during the import.

description

String

An optional description for the variable.

log

Boolean

If false, the unmasked variables will not be logged to save space.

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Request Body

JSON
{
  "name": "string",
  "group": "string",
  "app_name": "string"
}

Parameter

Type

Required

Description

name

String

Yes

The name of the collection that is being created.

group

String

Yes

The group the application is assigned to.

app_name

String

Yes

The name of the application the collection is being created for.

Response 201 (Success)

JSON
{
  "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

data

Array of strings

The created collection with the associated data.

id

String

The ID number of the collection.

created_at

String

The time and date of the collection creation.

updated_at

String

The time and date of the collection update.

group

String

The group the application is assigned to

name

String

The name of the variable collection.

app_name

String

The name of the application the variable collection belongs to.

path

String

prd_path

String

tag

String

The name of the application tag.

variables

Array of strings

The list of variables in the collection.

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Path parameters

Parameter

Type

Required

Description

collection_id

String

Yes

The ID of the collection.

Request body

JSON
{
  "tag": "string"
}

Response 200 (Success)

JSON
{
  "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)

JSON
{
  "errors": [
    {
      "code": "1022",
      "detail": "Description too long",
      "meta": {},
      "source": "/body/description",
      "status": 400,
      "title": "Bad Request"
    }
  ]
}

Response 409 (Conflict)

JSON
{
  "data": "string"
}

Get a collection

GET

{{baseUrl}}/envs-manager/api/v1/variables-collections/{collection_id}

Retrieves a collection.

Click to see the details

Path parameters

Parameter

Type

Required

Description

collection_id

String

Yes

The ID of the collection.

Response 200 (Success)

JSON
{
  "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)

JSON
{
  "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.

Click to see the details

Path parameters

Parameter

Type

Required

Description

collection_id

String

Yes

The ID of the collection.

Request Body

JSON
{
  "name": "string"
}

Response 200 (Success)

JSON
{
  "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)

JSON
{
  "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.

Click to see the details

Path parameters

Parameter

Type

Required

Description

collection_id

String

Yes

The ID of the collection.

Response 204 (Success)

Response 422 (Unprocessable Entity)

JSON
{
  "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.

Click to see the details

Path parameters

Parameter

Type

Required

Description

collection_id

String

Yes

The ID of the collection.

Request Body

JSON
[
  {
    "key": "iws8badIu1BfuptBAcSlUhKp_NHpYG4jFR",
    "masked": true,
    "skip_overwrite": true,
    "description": "",
    "log": true,
    "snd_value": "string",
    "prd_value": "string",
    "_destroy": true
  }
]

Parameter

Required

Type

Description

key

Yes

String

The ID number of the collection.

masked

Yes

Boolean

If true, the value will be treated as sensitive and will not be logged or overwritten.

skip_overwrite

No

Boolean

Only applicable for unmasked variables!

If true, the value will not be updated during the application import.

The default value is true.

description

No

String

An optional description for the variable.

log

No

Boolean

Only applicable for unmasked variables!

If true, the unmasked variables will not be logged to save space.

The default value is true.

snd_value

Yes

String

Sandbox value for the variable.

prd_value

Yes

String

Production value for the variable.

_destroy

Yes

Boolean

If true, the variable with the specified key will be deleted. The default value is false.

Response 200 (Success)

JSON
{
  "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)

JSON
{
  "errors": [
    {
      "code": "1022",
      "detail": "Description too long",
      "meta": {},
      "source": "/body/description",
      "status": 400,
      "title": "Bad Request"
    }
  ]
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.