Capsule API
Prerequisites
Token with capsule scope
The capsule ID to pass to the API call
You can find the capsule's ID on the metadata page
Get capsule's metadata
GET
https://{domain}codeocean.com/api/v1/capsules/{capsule_id}
Path Parameters
Name | Type | Description |
---|---|---|
{domain}* | String | Your VPC domain |
{capsule_id}* | String | Capsule's id |
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | application/json |
-u* | String | \ '${API Token from Code Ocean}:\' \ |
List capsule computations API
GET
https://{domain}codeocean.com/api/v1/capsules/{capsule_id}/computations
Path Parameters
Name | Type | Description |
---|---|---|
{domain}* | String | Your VPC domain |
{capsule_id}* | String | Capsule's id |
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | application/json |
-u* | String | \ '${API Token from Code Ocean}:\' \ |
Run capsule/pipeline API
POST
https://{domain}codeocean.com/api/v1/capsules/computations
Create a new computation by running a capsule/pipeline
Path Parameters
Name | Type | Description |
---|---|---|
{domain}* | String | Your VPC domain |
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | application/json |
-u* | String | \ '${API Token from Code Ocean}:\' \ |
Request Body
Name | Type | Description |
---|---|---|
capsule_id* | String | the id of the capsule/pipeline to run |
parameters | array | run parameters (ignored when running a pipeline) |
data_assets | array | id (required) - string - data asset id mount (required) - string - data asset mount folder |
version | integer | the version number of a release capsule (required if capsule_id corresponds to a release capsule) |
Last updated