ec90bd653983

OpenAPI 3.1.02026-08-1084330443.7 KB
Environments

Patch Environment

Authorization scope: environment:edit

Updates an existing environment entity

put/v1/accounts/{account_id}/environments/{environment_id}

Path parameters

account_idstring required
environment_idstring required

Request body

environment_namestring nullable

The environment name

color'gray.400' | 'tagGreen' | 'cBlues' | 'tagCyan' | 'tagGeekBlue' | 'cPurples' | 'tagPurple' | 'tagMagenta' | 'cOranges' | 'tagOrange' | 'yellow.200'

The EnvironmentsColor enum provides all color options for environments

descriptionstring nullable

The environment description

is_defaultboolean nullable

A flag that indicates whether the environment is the account's default environment

Example request

{
  "environment_name": "Dev Environment",
  "description": "Development environment for new rivers",
  "is_default": true
}

Response

Successful Response

_idstring required

The environment id

accountstring required

The account id of the user

user_createdstring nullable

The user id of the user who first created the environment

cross_idstring required

The cross id of the environment

environment_namestring required

The environment name

color'gray.400' | 'tagGreen' | 'cBlues' | 'tagCyan' | 'tagGeekBlue' | 'cPurples' | 'tagPurple' | 'tagMagenta' | 'cOranges' | 'tagOrange' | 'yellow.200'

The EnvironmentsColor enum provides all color options for environments

descriptionstring nullable

The environment description

variablesobject required

Environment's variables

is_deletedboolean nullable

A flag that indicates whether the environment is deleted

deleted_bystring nullable

The user id of the user who deleted the environment (if the environment is deleted)

is_defaultboolean

A flag that indicates whether the environment is the account's default environment

updated_bystring nullable

The user id of the user who last updated the environment

is_delete_lockboolean nullable

A flag that indicates the environment deletion progress

Example response

{
  "_id": "633ede20f1fc5500111fd7b3",
  "account": "62e7f4352c13160013dc39be",
  "user_created": "62e7f4352c13160013dc39be",
  "cross_id": "62e7f4352c13160013dc39be",
  "environment_name": "Dev Environment",
  "description": "Development environment for new rivers",
  "variables": {
    "aws_file_zone": "Rivery-rivery",
    "azure_file_zone": "Rivery-rivery",
    "days_ago": "0",
    "gcs_file_zone": "Rivery-rivery",
    "hours_offset": "0"
  },
  "deleted_by": "62e7f4352c13160013dc39be",
  "is_default": true,
  "updated_by": "62e7f4352c13160013dc39be",
  "is_delete_lock": true
}