queues
POST /queues.add_or_update_metadata
Description
Add or update queue metadata
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| metadata required | Metadata items to add or update | < queues.metadata_item > array |
| queue required | ID of the queue | string |
| replace_metadata optional | If set then the all the metadata items will be replaced with the provided ones. Otherwise only the provided metadata items will be updated or added Default : false | boolean |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| updated optional | Number of queues updated (0 or 1) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.add_task
Description
Adds a task entry to the queue.
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| queue required | Queue id | string |
| task required | Task id | string |
| update_execution_queue optional | If set to Falsethen the task 'execution.queue' is not updated Default : true | boolean |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| added optional | Number of tasks added (0 or 1) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.clear_queue
Description
Remove all tasks from the queue and change their statuses to what they were
prior to enqueuing or 'created'
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| queue required | Queue id | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| removed_tasks optional | IDs of the removed tasks | < string > array |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.create
Description
Create a new queue
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| display_name optional | Display name | string |
| metadata optional | Queue metadata | < string, queues.metadata_item > map |
| name required | Queue name Unique within the company. | string |
| system_tags optional | System tags list. This field is reserved for system use, please don't use it. | < string > array |
| tags optional | User-defined tags list | < string > array |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| id optional | New queue ID | string |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.delete
Description
Deletes a queue. If the queue is not empty and force is not set to true, queue
will not be deleted.
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| force optional | Force delete of non-empty queue. Defaults to false Default : false | boolean |
| queue required | Queue id | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| deleted optional | Number of queues deleted (0 or 1) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.delete_metadata
Description
Delete metadata from queue
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| keys required | The list of metadata keys to delete | < string > array |
| queue required | ID of the queue | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| updated optional | Number of queues updated (0 or 1) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.get_all
Description
Get all queues
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| id optional | List of Queue IDs used to filter results | < string > array |
| max_task_entries optional | Max number of queue task entries to return | integer |
| name optional | Get only queues whose name matches this pattern (python regular expression syntax) | string |
| only_fields optional | List of document field names (nesting is supported using '.', e.g. execution.model_labels). If provided, this list defines the query's projection (only these fields will be returned for each result entry) | < string > array |
| order_by optional | List of field names to order by. When search_text is used, '@text_score' can be used as a field representing the text score of returned documents. Use '-' prefix to specify descending order. Optional, recommended when using page | < string > array |
| page optional | Page number, returns a specific page out of the result list of results. Minimum value : 0 | integer |
| page_size optional | Page size, specifies the number of results returned in each page (last page may contain fewer results) Minimum value : 1 | integer |
| refresh_scroll optional | If set then all the data received with this scroll will be requeried | boolean |
| scroll_id optional | Scroll ID returned from the previos calls to get_all | string |
| search_hidden optional | If set to 'true' then hidden queues are included in the search results Default : false | boolean |
| search_text optional | Free text search query | string |
| size optional | The number of queues to retrieve Minimum value : 1 | integer |
| system_tags optional | System tags list used to filter results. Prepend '-' to system tag name to indicate exclusion | < string > array |
| tags optional | User-defined tags list used to filter results. Prepend '-' to tag name to indicate exclusion | < string > array |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| queues optional | Queues list | < queues.queue > array |
| scroll_id optional | Scroll ID that can be used with the next calls to get_all to retrieve more data | string |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.get_by_id
Description
Gets queue information
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| max_task_entries optional | Max number of queue task entries to return | integer |
| queue required | Queue ID | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| queue optional | Queue info | queues.queue |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.get_default
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | object |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| id optional | Queue id | string |
| name optional | Queue name | string |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.get_next_task
Description
Gets the next task from the top of the queue (FIFO). The task entry is removed
from the queue.
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| get_task_info optional | If set then additional task info is returned Default : false | boolean |
| queue required | Queue id | string |
| task optional | Task company ID | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| entry optional | Entry information | queues.entry |
| task_info optional | Info about the returned task. Returned only if get_task_info is set to True | task_info |
task_info
| Name | Description | Schema |
|---|---|---|
| company optional | Task company ID | string |
| user optional | ID of the user who created the task | string |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.get_num_entries
Description
Get the number of task entries in the given queue
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| queue required | ID of the queue | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| num optional | Number of entries | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.get_queue_metrics
Description
Returns metrics of the company queues. The metrics are avaraged in the
specified interval.
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| from_date required | Starting time (in seconds from epoch) for collecting metrics | number |
| interval required | Time interval in seconds for a single metrics point. The minimal value is 1 | integer |
| queue_ids optional | List of queue ids to collect metrics for. If not provided or empty then all then average metrics across all the company queues will be returned. | < string > array |
| refresh optional | If set then the new queue metrics is taken Default : false | boolean |
| to_date required | Ending time (in seconds from epoch) for collecting metrics | number |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| queues optional | List of the requested queues with their metrics. If no queue ids were requested then 'all' queue is returned with the metrics averaged accross all the company queues. | < queues.queue_metrics > array |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.move_task_backward
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| count optional | Number of positions in the queue to move the task forward relative to the current position. Optional, the default value is 1. | integer |
| queue required | Queue id | string |
| task required | Task id | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| position optional | The new position of the task entry in the queue (index, -1 represents bottom of queue) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.move_task_forward
Description
Moves a task entry one step forward towards the top of the queue.
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| count optional | Number of positions in the queue to move the task forward relative to the current position. Optional, the default value is 1. | integer |
| queue required | Queue id | string |
| task required | Task id | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| position optional | The new position of the task entry in the queue (index, -1 represents bottom of queue) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.move_task_to_back
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| queue required | Queue id | string |
| task required | Task id | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| position optional | The new position of the task entry in the queue (index, -1 represents bottom of queue) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.move_task_to_front
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| queue required | Queue id | string |
| task required | Task id | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| position optional | The new position of the task entry in the queue (index, -1 represents bottom of queue) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.move_task_to_queue
Description
Moves task to another queue
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| queue required | Queue ID | string |
| target_queue required | Target queue ID | string |
| task required | Task ID | string |
| update_execution_queue optional | If set to Falsethen the task 'execution.queue' is not updated Default : true | boolean |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| moved optional | Number of tasks moved (0 or 1) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.peek_task
Description
Peek the next task from a given queue
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| queue required | ID of the queue | string |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| task optional | Task ID | string |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.remove_task
Description
Removes a task entry from the queue.
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| queue required | Queue id | string |
| task required | Task id | string |
| update_task_status optional | If set to 'true' then change the removed task status to the one it had prior to enqueuing or 'created' Default : false | boolean |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| removed optional | Number of tasks removed (0 or 1) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |
POST /queues.update
Description
Update queue information
Parameters
| Type | Name | Description | Schema |
|---|---|---|---|
| Body | request required | request body | request |
request
| Name | Description | Schema |
|---|---|---|
| display_name optional | Display name | string |
| metadata optional | Queue metadata | < string, queues.metadata_item > map |
| name optional | Queue name Unique within the company. | string |
| queue required | Queue id | string |
| system_tags optional | System tags list. This field is reserved for system use, please don't use it. | < string > array |
| tags optional | User-defined tags list | < string > array |
Responses
| HTTP Code | Schema |
|---|---|
| 200 | Response 200 |
Response 200
| Name | Description | Schema |
|---|---|---|
| fields optional | Updated fields names and values | object |
| updated optional | Number of queues updated (0 or 1) | integer |
Security
| Type | Name | Scopes |
|---|---|---|
| Bearer | clearml | all |