Streams

Set the sorting rules for imports

PUT/streams/sort/rules/

write Change: creates or edits. Scopes

Replaces the rules that sort what playlist imports add; an empty list stops sorting them. 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

  • rulesobject[]required
    • matchstring

      Default: "starts"

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

Response

200 OK

  • rulesobject[]required
    • matchstringrequired
      • starts - starts
      • contains - contains
      • ends - ends
      • pattern - pattern

      One of: "starts" "contains" "ends" "pattern"

    • textstringrequired
    • categorystring (uuid)required
    • category_namestringrequiredread-only

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