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

Overview

Copy stories from the queue with the given ID to a queue with destination ID.

HTTP method

POST

URI template variables

id

The id of the source queue.

Query parameters

force

Put true to copy 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 "copy" for this action.

  • stories, List of asset IDs. Also can be a string "all" to do an action on all stories in the queue.

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

  • destination, The id of the target queue. Can be the same queue to duplicate stories in the queue.

  • destination_qkey, Password for key-locked queue.

  • position, The id of the story where to insert new 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..522036966.208234.12",
            "copied": true,
            "location": "https://host/...",
            "error": null
        }
    ],
    "_links": {
        "self": {
            "href": "https://host/..."
        }
    }
}

Available in

Description

Copy stories from the queue with the given ID to a queue with destination ID.

Examples

Example:

{
  "op": "copy",
  "stories": ["queue1_story5", "queue1_story6"],
  "destination": "QUEUE2"
}

For QUEUE2 with INVERTED attribute will result to:

QUEUE1 QUEUE2

…​

queue1_story6

queue1_story5

queue1_story5

queue1_story6

queue2_story4

…​

…​

For QUEUE2 without INVERTED attribute will result to:

QUEUE1 QUEUE2

…​

…​

queue1_story5

queues_story4

queue1_story6

queue1_story5

…​

queue1_story6

Example:

{
  "op": "move",
  "stories": ["queue1_story5", "queue1_story6"],
  "destination": "QUEUE2",
  "position": "queue2_story3"
}

For QUEUE2 with INVERTED attribute will result to:

QUEUE1 QUEUE2

…​

…​

queue1_story4

queue2_story3

queue1_story5

queue1_story6

queue1_story6

queue1_story5

queue1_story7

queue2_story2

…​

…​

For QUEUE2 without INVERTED attribute will result to:

QUEUE1 QUEUE2

…​

…​

queue1_story4

queue2_story2

queue1_story5

queue1_story5

queue1_story6

queue1_story6

queue1_story7

queue2_story3