Link relation ia:order-queue-stories-by-id

Overview

Change the order of stories in a queue.

HTTP method

POST

URL template parameters

id

The id of the queue.

Query parameters

force

Put true to order stories ignoring errors and return verbose results of operation, false by default.

qkey

Password for key-locked queue.

Request body

In the request body, supply data with the following structure:

  • op, Operation to do on the list of stories. Should be "order" for this action.

  • stories, List of asset IDs.

  • stories_keys, List of the passwords for key-locked stories.

  • position, The id of the story where to move stories. For queue with INVERTED attribute it inserts stories after specified story, if not INVERTED - before specified story. If this property is ommited stories will be placed into beginning of the queue for INVERTED queue and into the end for not INVERTED queue.

HTTP response

200 OK

Response body

An ia:queue-stories resource.

If force parameter is true, response will look like the following:

{
    "results": [
        {
            "id": "TEST.QUEUE..287066924.208234.9",
            "ordered": true,
            "error": null
        },
        {
            "id": "TEST.QUEUE..522036966.208234.12",
            "ordered": true,
            "error": null
        }
    ],
    "_links": {
        "self": {
            "href": "https://host/..."
        }
    }
}

Available in

Description

Change the order of stories in a queue.

Examples

{
  "op": "order",
  "stories": ["queue1_story3", "queue1_story4"]
}

For QUEUE1 with INVERTED attribute will result to:

QUEUE1

queue1_story4

queue1_story3

queue1_story6

queue1_story5

queue1_story4

queue1_story3

queue1_story2

queue1_story1

For QUEUE1 without INVERTED attribute will result to:

QUEUE1

queue1_story1

queue1_story2

queue1_story3

queue1_story4

queue1_story5

queue1_story6

queue1_story3

queue1_story4

Example

{
  "op": "order",
  "stories": ["queue1_story3", "queue1_story4"],
  "position": "queue1_story2"
}

For QUEUE1 with INVERTED attribute will result to:

QUEUE1

queue1_story6

queue1_story5

queue1_story4

queue1_story3

queue1_story2

queue1_story4

queue1_story3

queue1_story1

For QUEUE1 without INVERTED attribute will result to:

QUEUE1

queue1_story1

queue1_story3

queue1_story4

queue1_story2

queue1_story3

queue1_story4

queue1_story5

queue1_story6