Environment REST API
caution
The Environment API is in the alpha stage which is subjected to incompatible changes in future releases.
Create Environment
POST /api/v1/environment
Parameters
Put EnvironmentSpec in request body.
EnvironmentSpec
Field Name | Type | Description | Required |
---|---|---|---|
name | String | Environment name. | o |
dockerImage | String | Docker image name. | o |
kernelSpec | KernelSpec | Environment spec. | o |
description | String | Description of environment. | x |
KernelSpec
Field Name | Type | Description | Required |
---|---|---|---|
name | String | Kernel name. | o |
channels | List<String> | Names of the channels. | o |
condaDependencies | List<String> | List of kernel conda dependencies. | o |
pipDependencies | List<String> | List of kernel pip dependencies. | o |
Example
Example Request
Example Response
List environment
GET /api/v1/environment
Example
Example Request
Example Response
Get environment
GET /api/v1/environment/{name}
Parameters
Field Name | Type | In | Description | Required |
---|---|---|---|---|
name | String | path | Environment name. | o |
Example
Example Request
Example Response
Patch environment
PATCH /api/v1/environment/{name}
Parameters
Field Name | Type | In | Description | Required |
---|---|---|---|---|
name | String | path and body | Environment name. | o |
dockerImage | String | body | Docker image name. | o |
kernelSpec | KernelSpec | body | Environment spec. | o |
description | String | body | Description of environment. This field is optional. | x |
Example
Example Request
Example Response
note
dockerImage, "name" (of kernelSpec), "channels", "condaDependencies", "pipDependencies" etc can be updated using this API. "name" of environmentSpec is not supported.
Delete environment
GET /api/v1/environment/{name}
Parameters
Field Name | Type | In | Description | Required |
---|---|---|---|---|
name | String | path | Environment name. | o |