Sort streams into categories
/streams/sort/write Change: creates or edits. Scopes
Moves the selection by the rules, in the background. New categories are made first. With save, playlist imports sort what they add by these rules too (panel operators only). Each rule matches names that start with, contain or end with text and puts them in category, or in a category named new_category made for it. With unlist_old (the default) a stream leaves the category it was in.
Body
selectionobjectrequiredThe streams a bulk action applies to: the ones ticked (
ids), or every stream the list filters select (all_matching: truewithfilters, which take the list's query parameters), lessexclude.idsstring (uuid)[]all_matchingbooleanDefault:
falsefiltersobjectexcludestring (uuid)[]
rulesobject[]requiredmatchstringDefault:
"starts"textstringrequiredcategorystring (uuid)can be nullnew_categorystring
unlist_oldbooleanDefault:
truesavebooleanDefault:
false
Response
202 The background task moving them.
idstringrequiredkindstringrequiredThe kind of task, e.g.
bulk_edit,bulk_delete,import.kind_labelstringrequiredtitlestringrequiredsubtitlestringrequiredstatestringrequiredqueued,running,waiting,stalled,completed,failedorcancelled.state_labelstringrequiredstatusstringrequiredThe task's own status, before it is grouped into
state.status_labelstringrequiredprogressobjectrequireddoneintegerrequiredcan be nulltotalintegerrequiredcan be nullpercentintegerrequiredcan be null0 to 100, null while unknown.
phasestringrequiredWhat it is doing now, in words; may be empty.
messagestringrequireddetailsobject[]requirederrorsobject[]requiredlinkobjectrequiredcan be nullThe dashboard page about it:
{path, query, label}, or null.actionsstring[]requiredWhat the caller may do with it now:
cancel,resume,retry.created_by_usernamestringrequiredcan be nullcreated_atstring (date-time)requiredstarted_atstring (date-time)requiredcan be nullfinished_atstring (date-time)requiredcan be nullupdated_atstring (date-time)required
Errors
- 400 Something sent is not valid. Each field that is wrong is named with what is wrong.
- 401 No credential, or one that is wrong, expired or revoked.
- 403 The account, or the key's or app's scopes, may not do this.
- 429 Slow down: wait the seconds in the Retry-After header, then try again.