Skip to main content

队列

POST /queues.add_or_update_metadata

描述

添加或更新队列元数据

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
metadata
required
Metadata items to add or update< queues.metadata_item > array
queue
required
ID of the queuestring
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 CodeSchema
200Response 200

响应 200

NameDescriptionSchema
updated
optional
Number of queues updated (0 or 1)integer

POST /queues.add_task

描述

向队列中添加一个任务条目。

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
queue
required
Queue idstring
task
required
Task idstring
update_execution_queue
optional
If set to Falsethen the task 'execution.queue' is not updated
Default : true
boolean

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
added
optional
Number of tasks added (0 or 1)integer

POST /queues.clear_queue

描述

从队列中移除所有任务,并将它们的状态更改为入队之前的状态或“已创建”

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
queue
required
Queue idstring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
removed_tasks
optional
IDs of the removed tasks< string > array

POST /queues.create

描述

创建一个新队列

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
display_name
optional
Display namestring
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 CodeSchema
200Response 200

响应 200

NameDescriptionSchema
id
optional
New queue IDstring

POST /queues.delete

描述

删除一个队列。如果队列不为空且force未设置为true,队列
将不会被删除。

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
force
optional
Force delete of non-empty queue. Defaults to false
Default : false
boolean
queue
required
Queue idstring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
deleted
optional
Number of queues deleted (0 or 1)integer

POST /queues.delete_metadata

描述

从队列中删除元数据

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
keys
required
The list of metadata keys to delete< string > array
queue
required
ID of the queuestring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
updated
optional
Number of queues updated (0 or 1)integer

POST /queues.get_all

描述

获取所有队列

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
id
optional
List of Queue IDs used to filter results< string > array
max_task_entries
optional
Max number of queue task entries to returninteger
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 requeriedboolean
scroll_id
optional
Scroll ID returned from the previos calls to get_allstring
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 querystring
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 CodeSchema
200Response 200

响应 200

NameDescriptionSchema
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 datastring

POST /queues.get_all_ex

描述

获取所有队列

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
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 returninteger
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 requeriedboolean
scroll_id
optional
Scroll ID returned from the previos calls to get_all_exstring
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 querystring
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

过滤器

NameDescriptionSchema
all
optional
All the terms in 'all' condition are combined with 'and' operationall
any
optional
All the terms in 'any' condition are combined with 'or' operationany
op
optional
The operation between 'any' and 'all' parts of the filter if both are provided
Default : "and"
enum (and, or)

全部

NameSchema
exclude
optional
< string > array
include
optional
< string > array

任意

NameSchema
exclude
optional
< string > array
include
optional
< string > array

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
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

描述

获取队列信息

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
max_task_entries
optional
Max number of queue task entries to returninteger
queue
required
Queue IDstring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
queue
optional
Queue infoqueues.queue

POST /queues.get_default

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyobject

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
id
optional
Queue idstring
name
optional
Queue namestring

POST /queues.get_next_task

描述

从队列顶部获取下一个任务(先进先出)。任务条目被移除
从队列中。

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
get_task_info
optional
If set then additional task info is returned
Default : false
boolean
queue
required
Queue idstring
task
optional
Task company IDstring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
entry
optional
Entry informationqueues.entry
task_info
optional
Info about the returned task. Returned only if get_task_info is set to Truetask_info

任务信息

NameDescriptionSchema
company
optional
Task company IDstring
user
optional
ID of the user who created the taskstring

POST /queues.get_num_entries

描述

获取给定队列中的任务条目数量

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
queue
required
ID of the queuestring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
num
optional
Number of entriesinteger

POST /queues.get_queue_metrics

描述

返回公司队列的指标。这些指标在指定的时间间隔内进行了平均。

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
from_date
required
Starting time (in seconds from epoch) for collecting metricsnumber
interval
required
Time interval in seconds for a single metrics point. The minimal value is 1integer
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 metricsnumber

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
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

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
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 idstring
task
required
Task idstring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
position
optional
The new position of the task entry in the queue (index, -1 represents bottom of
queue)
integer

POST /queues.move_task_forward

描述

将任务条目向队列顶部移动一步。

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
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 idstring
task
required
Task idstring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
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

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
queue
required
Queue idstring
task
required
Task idstring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
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

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
queue
required
Queue idstring
task
required
Task idstring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
position
optional
The new position of the task entry in the queue (index, -1 represents bottom of
queue)
integer

POST /queues.peek_task

描述

从给定的队列中查看下一个任务

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
queue
required
ID of the queuestring

响应

HTTP CodeSchema
200Response 200

响应 200

NameDescriptionSchema
task
optional
Task IDstring

POST /queues.remove_task

描述

从队列中移除一个任务条目。

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
queue
required
Queue idstring
task
required
Task idstring
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 CodeSchema
200Response 200

响应 200

NameDescriptionSchema
removed
optional
Number of tasks removed (0 or 1)integer

POST /queues.update

描述

更新队列信息

参数

TypeNameDescriptionSchema
Bodyrequest
required
request bodyrequest

请求

NameDescriptionSchema
display_name
optional
Display namestring
metadata
optional
Queue metadata< string, queues.metadata_item > map
name
optional
Queue name Unique within the company.string
queue
required
Queue idstring
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 CodeSchema
200Response 200

响应 200

NameDescriptionSchema
fields
optional
Updated fields names and valuesobject
updated
optional
Number of queues updated (0 or 1)integer