Streams

Sort streams into categories

POST/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

  • selectionobjectrequired

    The streams a bulk action applies to: the ones ticked (ids), or every stream the list filters select (all_matching: true with filters, which take the list's query parameters), less exclude.

    • idsstring (uuid)[]
    • all_matchingboolean

      Default: false

    • filtersobject
    • excludestring (uuid)[]
  • rulesobject[]required
    • matchstring

      Default: "starts"

    • textstringrequired
    • categorystring (uuid)can be null
    • new_categorystring
  • unlist_oldboolean

    Default: true

  • saveboolean

    Default: false

Response

202 The background task moving them.

  • idstringrequired
  • kindstringrequired

    The kind of task, e.g. bulk_edit, bulk_delete, import.

  • kind_labelstringrequired
  • titlestringrequired
  • subtitlestringrequired
  • statestringrequired

    queued, running, waiting, stalled, completed, failed or cancelled.

  • state_labelstringrequired
  • statusstringrequired

    The task's own status, before it is grouped into state.

  • status_labelstringrequired
  • progressobjectrequired
    • doneintegerrequiredcan be null
    • totalintegerrequiredcan be null
    • percentintegerrequiredcan be null

      0 to 100, null while unknown.

    • phasestringrequired

      What it is doing now, in words; may be empty.

  • messagestringrequired
  • detailsobject[]required
  • errorsobject[]required
  • linkobjectrequiredcan be null

    The dashboard page about it: {path, query, label}, or null.

  • actionsstring[]required

    What the caller may do with it now: cancel, resume, retry.

  • created_by_usernamestringrequiredcan be null
  • created_atstring (date-time)required
  • started_atstring (date-time)requiredcan be null
  • finished_atstring (date-time)requiredcan be null
  • updated_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.

What each error means