Environment Configurations

The Environment Configurations endpoints let you set, retrieve, and delete environment configurations. An environment configuration contains details about configurations that are specific to an environment for a project. It provides defaults for the project as well as environment-specific values.

For example, you can set a base URL for external grammars in a project, as described in Reference external grammars. This configuration is stored in an environment configuration object, using the GRAMMAR_BASE_PATH configuration type (also called label), and contains the default value as well as environment-specific values, as shown in the following example:

{
  "projectDefaults": [
    {
      "label": "GRAMMAR_BASE_PATH",
      "value": "https://coffee.app.com:443"
    }
  ],
  "environments": [
    {
      "id": "55",
      "name": "Sandbox",
      "environmentGeographies": [
        {
          "id": "1",
          "name": "Sandbox US",
          "environmentGeographyDefaults": [
            {
              "label": "GRAMMAR_BASE_PATH",
              "value": "https://coffee-sandbox.app.com:443"
            }
          ]
        }
      ]
    }
  ]
}

Delete project environment configuration

DELETE /v4/projects/{projectId}/env-configs/{label}

Delete the environment configuration that corresponds to the label specified (for example, GRAMMAR_BASE_PATH) in a specific project.

Responses

Status Meaning Description Schema
200 OK Configuration successfully deleted mix.api.DeleteProjectEnvironmentConfigurationResponse
401 Unauthorized Request could not be authorized Inline
500 Internal Server Error Internal server error Inline
501 Not Implemented Feature is not yet enabled Inline
default Default An unexpected error response. grpc.gateway.runtime.Error

Example responses

  200 response  

Set default environment configuration

PUT /v4/projects/{projectId}/env-configs/{label}

Set the default value of an environment configuration for the project specified.

Parameters

Name In Type Description
projectId path string ID of the project.
label path string Label that identifies the type of environment configuration (for example, GRAMMAR_BASE_PATH).
body body string Environment configuration value.

Body parameter

"string"

Responses

Status Meaning Description Schema
200 OK Value successfully set mix.api.SetProjectEnvironmentConfigurationResponse
401 Unauthorized Request could not be authorized Inline
500 Internal Server Error Internal server error Inline
501 Not Implemented Feature is not yet enabled Inline
default Default An unexpected error response. grpc.gateway.runtime.Error

Example responses

  200 response  

Delete environment geography configuration

DELETE /v4/environments/{environmentId}/geographies/{environmentGeographyId}/configs/{label}

Delete the environment configuration that corresponds to the label specified (for example, GRAMMAR_BASE_PATH) in a specific environment and environment geography.

Responses

Status Meaning Description Schema
200 OK Configuration successfully deleted mix.api.DeleteEnvironmentConfigurationResponse
401 Unauthorized Request could not be authorized Inline
500 Internal Server Error Internal server error Inline
501 Not Implemented Feature is not yet enabled Inline
default Default An unexpected error response. grpc.gateway.runtime.Error

Example responses

  200 response  

Set environment geography configuration value

PUT /v4/environments/{environmentId}/geographies/{environmentGeographyId}/configs/{label}

Set the value of an environment configuration for the environment and environment geography specified.

Parameters

Name In Type Description
environmentId path string ID of the environment where this configuration is defined.
environmentGeographyId path string ID of the environment geography where this configuration is defined.
label path string Label that identifies the type of environment configuration (for example, GRAMMAR_BASE_PATH).
projectId query string ID of the project.
body body string Environment configuration value.

Body parameter

"string"

Responses

Status Meaning Description Schema
200 OK Value successfully set mix.api.SetEnvironmentConfigurationResponse
401 Unauthorized Request could not be authorized Inline
500 Internal Server Error Internal server error Inline
501 Not Implemented Feature is not yet enabled Inline
default Default An unexpected error response. grpc.gateway.runtime.Error

Example responses

  200 response  

Get environment configurations for a project

GET /v4/projects/{projectId}/env-configs

Retrieve the list of environment configurations for the project specified. Information returned includes both the project default configurations as well as any environment-specific values set for this project.

Responses

Status Meaning Description Schema
200 OK List of environment configurations mix.api.GetEnvironmentConfigurationsResponse
401 Unauthorized Request could not be authorized Inline
500 Internal Server Error Internal server error Inline
501 Not Implemented Feature is not yet enabled Inline
default Default An unexpected error response. grpc.gateway.runtime.Error

Example responses

  200 response