队列
POST /queues.add_or_update_metadata
描述
添加或更新队列元数据
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of queues updated (0 or 1) | integer |
POST /queues.add_task
描述
向队列中添加一个任务条目。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
added optional | Number of tasks added (0 or 1) | integer |
POST /queues.clear_queue
描述
从队列中移除所有任务,并将它们的状态更改为入队之前的状态或“已创建”
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
queue required | Queue id | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
removed_tasks optional | IDs of the removed tasks | < string > array |
POST /queues.create
描述
创建一个新队列
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
id optional | New queue ID | string |
POST /queues.delete
描述
删除一个队列。如果队列不为空且force未设置为true,队列
将不会被删除。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | Force delete of non-empty queue. Defaults to false Default : false | boolean |
queue required | Queue id | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | Number of queues deleted (0 or 1) | integer |
POST /queues.delete_metadata
描述
从队列中删除元数据
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
keys required | The list of metadata keys to delete | < string > array |
queue required | ID of the queue | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of queues updated (0 or 1) | integer |
POST /queues.get_all
描述
获取所有队列
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 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 |
POST /queues.get_all_ex
描述
获取所有队列
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
filters optional | < string, filters > map | |
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_ex | 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 |
过滤器
Name | Description | Schema |
---|---|---|
all optional | All the terms in 'all' condition are combined with 'and' operation | all |
any optional | All the terms in 'any' condition are combined with 'or' operation | any |
op optional | The operation between 'any' and 'all' parts of the filter if both are provided Default : "and" | enum (and, or) |
全部
Name | Schema |
---|---|
exclude optional | < string > array |
include optional | < string > array |
任意
Name | Schema |
---|---|
exclude optional | < string > array |
include optional | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 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_ex to retrieve more data | string |
POST /queues.get_by_id
描述
获取队列信息
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
max_task_entries optional | Max number of queue task entries to return | integer |
queue required | Queue ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
queue optional | Queue info | queues.queue |
POST /queues.get_default
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | object |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
id optional | Queue id | string |
name optional | Queue name | string |
POST /queues.get_next_task
描述
从队列顶部获取下一个任务(先进先出)。任务条目被移除
从队列中。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 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 |
任务信息
Name | Description | Schema |
---|---|---|
company optional | Task company ID | string |
user optional | ID of the user who created the task | string |
POST /queues.get_num_entries
描述
获取给定队列中的任务条目数量
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
queue required | ID of the queue | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
num optional | Number of entries | integer |
POST /queues.get_queue_metrics
描述
返回公司队列的指标。这些指标在指定的时间间隔内进行了平均。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 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 |
POST /queues.move_task_backward
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
position optional | The new position of the task entry in the queue (index, -1 represents bottom of queue) | integer |
POST /queues.move_task_forward
描述
将任务条目向队列顶部移动一步。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
position optional | The new position of the task entry in the queue (index, -1 represents bottom of queue) | integer |
POST /queues.move_task_to_back
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
queue required | Queue id | string |
task required | Task id | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
position optional | The new position of the task entry in the queue (index, -1 represents bottom of queue) | integer |
POST /queues.move_task_to_front
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
queue required | Queue id | string |
task required | Task id | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
position optional | The new position of the task entry in the queue (index, -1 represents bottom of queue) | integer |
POST /queues.peek_task
描述
从给定的队列中查看下一个任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
queue required | ID of the queue | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
task optional | Task ID | string |
POST /queues.remove_task
描述
从队列中移除一个任务条目。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
removed optional | Number of tasks removed (0 or 1) | integer |
POST /queues.update
描述
更新队列信息
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | 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 |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of queues updated (0 or 1) | integer |