TransformationJobsApi¶
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| GetApiV1TransformationsJobs | GET /api/v1/transformations/jobs | List transformation jobs |
| GetApiV1TransformationsJobsById | GET /api/v1/transformations/jobs/{id} | Get a transformation job |
| PostApiV1TransformationsJobs | POST /api/v1/transformations/jobs | Submit a new transformation job |
| PostApiV1TransformationsJobsByIdCancel | POST /api/v1/transformations/jobs/{id}/cancel | Cancel a running transformation job |
| PostApiV1TransformationsJobsByIdLogs | POST /api/v1/transformations/jobs/{id}/logs | Retrieve transformation job logs |
GetApiV1TransformationsJobs¶
TransformationJobPage GetApiV1TransformationsJobs(limit = 100, offset = 0, include_archived = var.include_archived)
List transformation jobs
Returns a paginated list of submitted transformation jobs, ordered from most to least recently created. Each entry includes the job's current state, timing, compute resources, and the image and configuration it was run with. Use the limit and offset query parameters to paginate through the results.
Example¶
library(odmApi)
# List transformation jobs
#
# prepare function argument(s)
var_limit <- 100 # integer | Maximum number of items to return per page. (Optional)
var_offset <- 0 # integer | Number of items to skip from the start of the list. Use with limit to paginate through results. (Optional)
var_include_archived <- "include_archived_example" # character | If `true`, archived jobs are included in the results. Defaults to `false`. (Optional)
api_instance <- TransformationJobsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GetApiV1TransformationsJobs(limit = var_limit, offset = var_offset, include_archived = var_include_archiveddata_file = "result.txt")
result <- api_instance$GetApiV1TransformationsJobs(limit = var_limit, offset = var_offset, include_archived = var_include_archived)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | integer | Maximum number of items to return per page. | [optional] [default to 100] |
| offset | integer | Number of items to skip from the start of the list. Use with limit to paginate through results. | [optional] [default to 0] |
| include_archived | character | If `true`, archived jobs are included in the results. Defaults to `false`. | [optional] |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/json, application/problem+json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is a page of transformation jobs. | - |
| 0 | Error | - |
GetApiV1TransformationsJobsById¶
TransformationJob GetApiV1TransformationsJobsById(id)
Get a transformation job
Returns the details of a single transformation job, identified by its id, including its current lifecycle state, timing, the image and configuration references, and granted compute resources.
Example¶
library(odmApi)
# Get a transformation job
#
# prepare function argument(s)
var_id <- 56 # integer | Unique numeric identifier of the transformation job.
api_instance <- TransformationJobsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GetApiV1TransformationsJobsById(var_iddata_file = "result.txt")
result <- api_instance$GetApiV1TransformationsJobsById(var_id)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | integer | Unique numeric identifier of the transformation job. |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/json, application/problem+json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is the transformation job. | - |
| 0 | Error | - |
PostApiV1TransformationsJobs¶
TransformationJobId PostApiV1TransformationsJobs(transformation_job_create_fields)
Submit a new transformation job
Submits a new transformation job. The job runs the referenced transformation image over the supplied input file accessions, optionally using a specified configuration and compute overrides (memory_size, volume_size). Set dry_run to true to validate the run without producing output. Returns the id of the created job.
Example¶
library(odmApi)
# Submit a new transformation job
#
# prepare function argument(s)
var_transformation_job_create_fields <- TransformationJobCreateFields$new(TransformationImageReference$new("name_example", "version_example"), c("input_accessions_example"), TransformationConfigurationReference$new(123, 123), "dry_run_example", "memory_size_example", "volume_size_example") # TransformationJobCreateFields |
api_instance <- TransformationJobsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$PostApiV1TransformationsJobs(var_transformation_job_create_fieldsdata_file = "result.txt")
result <- api_instance$PostApiV1TransformationsJobs(var_transformation_job_create_fields)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| transformation_job_create_fields | TransformationJobCreateFields |
Return type¶
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: application/json
- Accept: application/json, application/problem+json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The job was submitted successfully. The returned value is the identifier of the new job. | - |
| 0 | Error | - |
PostApiV1TransformationsJobsByIdCancel¶
PostApiV1TransformationsJobsByIdCancel(id)
Cancel a running transformation job
Requests cancellation of a running transformation job, identified by its id. Cancellation moves the job to the CANCELLED terminal state. Jobs that have already reached a terminal state and been archived cannot be cancelled.
Example¶
library(odmApi)
# Cancel a running transformation job
#
# prepare function argument(s)
var_id <- 56 # integer | Unique numeric identifier of the transformation job.
api_instance <- TransformationJobsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
api_instance$PostApiV1TransformationsJobsByIdCancel(var_id)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | integer | Unique numeric identifier of the transformation job. |
Return type¶
void (empty response body)
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/problem+json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 204 | The cancellation request was accepted. The job is transitioning to the `CANCELLED` state. | - |
| 0 | Error | - |
PostApiV1TransformationsJobsByIdLogs¶
data.frame PostApiV1TransformationsJobsByIdLogs(id, logs_payload)
Retrieve transformation job logs
Retrieves the execution logs for a transformation job, identified by its id. The logs are returned as a binary stream. Use the tail_lines in the request body to retrieve only the most recent N lines; omit it to retrieve the full log.
Example¶
library(odmApi)
# Retrieve transformation job logs
#
# prepare function argument(s)
var_id <- 56 # integer | Unique numeric identifier of the transformation job.
var_logs_payload <- LogsPayload$new(123) # LogsPayload |
api_instance <- TransformationJobsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$PostApiV1TransformationsJobsByIdLogs(var_id, var_logs_payloaddata_file = "result.txt")
result <- api_instance$PostApiV1TransformationsJobsByIdLogs(var_id, var_logs_payload)
dput(result)
Parameters¶
| Name | Type | Description | Notes |
|---|---|---|---|
| id | integer | Unique numeric identifier of the transformation job. | |
| logs_payload | LogsPayload |
Return type¶
data.frame
Authorization¶
Access-token, Genestack-API-Token
HTTP request headers¶
- Content-Type: application/json
- Accept: application/octet-stream, application/problem+json
HTTP response details¶
| Status code | Description | Response headers |
|---|---|---|
| 200 | The request was successful. The returned value is the job log stream. | - |
| 0 | Error | - |