Computation API
Prerequisites
Token with capsule scope
The computation ID to pass to the API call
The computation ID can only be accessed from the response from the API calls. A typical use cases are to use List capsule computations API to locate the computation ID from a capsule or Run capsule API to start a new computation. Both of the methods will have the computations ID in the response body that can use in computations API for further tracking and getting the results.
Getting Computation
POST
https://{domain}.codeocean.com/api/v1/computations/{computations_id}
This API allows for the retrieval of information from a computational run.
Path Parameters
Name | Type | Description |
---|---|---|
POST* |
| /computations/:computation_id/results |
Headers
Name | Type | Description |
---|---|---|
-u* |
| Authorize with Code Ocean API Secret: -u $API_SECRET : This is setting the "Authorization Basic" base64string header |
-H* |
| Set this to: Content - Type: application/json |
--data-raw* |
| JSON data with capsule/pipeline information |
Request Body
Name | Type | Description |
---|---|---|
computational_id | string | Identification of computational run |
List Files Computation URL
POST
https://{domain}.codeocean.com/api/v1/computations/{computations_id}
This API allows for the retrieval of information from a computational run.
Path Parameters
Name | Type | Description |
---|---|---|
POST* |
| /computations/:computation_id/results |
Headers
Name | Type | Description |
---|---|---|
-u* |
| authorize with Code Ocean API Secret: -u $API_SECRET: This is setting the "Authorization Basic" base64string header |
-H* |
| Set this to: Content - Type: application/json |
Request Body
Name | Type | Description |
---|---|---|
computational_id* | string | identification of the computational run |