Environment API v0.3.1

License: Apache License 2.0

# Authentication

  • HTTP Authentication, scheme: Bearer

Environment

# ListEnvironments

GET /api/v1/products/{product_name}/environments

Parameters

Name In Type Required Description
product_name path string true To list the product name of the repository.
field_selector query string false Filter the list by field. eg: field_selector=cluster=cluster1,env_type=host Field Support: cluster: fuzzy match env_type: fuzzy match

Example responses

200 Response

{
  "items": [
    {
      "product": "string",
      "name": "string",
      "cluster": "string",
      "env_type": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK (opens new window) OK api.environment.v1.ListsReply

# GetEnvironment

GET /api/v1/products/{product_name}/environments/{enviroment_name}

Parameters

Name In Type Required Description
product_name path string true The name of the product
enviroment_name path string true The name of the environment

Example responses

200 Response

{
  "product": "string",
  "name": "string",
  "cluster": "string",
  "env_type": "string"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) OK api.environment.v1.GetReply

# SaveEnvironment

POST /api/v1/products/{product_name}/environments/{environment_name}

Body parameter

{
  "cluster": "string",
  "env_type": "string"
}

Parameters

Name In Type Required Description
product_name path string true The name of the product
environment_name path string true The name of the environment
insecure_skip_check query boolean false Whether to skip security checks (not recommended)
body body api.environment.v1.SaveRequest_Body true none

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) OK api.environment.v1.SaveReply

# DeleteEnvironment

DELETE /api/v1/products/{product_name}/environments/{environment_name}

Parameters

Name In Type Required Description
product_name path string true The name of the product
environment_name path string true The name of the environment to delete
insecure_skip_check query boolean false Whether to skip security checks (not recommended)

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) OK api.environment.v1.DeleteReply

# Schemas

api.environment.v1.DeleteReply

{
  "message": "string"
}

Response for deleting an environment

# Properties

Name Type Required Restrictions Description
message string false none A message indicating whether the request was successful

api.environment.v1.GetReply

{
  "product": "string",
  "name": "string",
  "cluster": "string",
  "env_type": "string"
}

Response for getting environment information

# Properties

Name Type Required Restrictions Description
product string false none The product name
name string false none The environment name
cluster string false none The name of the cluster that the environment belongs to
env_type string false none The type of environment, such as "production" or "staging"

api.environment.v1.ListsReply

{
  "items": [
    {
      "product": "string",
      "name": "string",
      "cluster": "string",
      "env_type": "string"
    }
  ]
}

Response for listing environments for a given product

# Properties

Name Type Required Restrictions Description
items [api.environment.v1.GetReply] false none A list of environment information

api.environment.v1.SaveReply

{
  "message": "string"
}

Response for saving changes to an environment

# Properties

Name Type Required Restrictions Description
message string false none A message indicating whether the request was successful

api.environment.v1.SaveRequest_Body

{
  "cluster": "string",
  "env_type": "string"
}

The body of the request, including cluster and envType

# Properties

Name Type Required Restrictions Description
cluster string false none The name of the cluster that the environment belongs to
env_type string false none The type of environment, such as "production" or "staging"