Resource loc:items-result

Overview

The loc:items-result represents the result of an operation on multiple location items.

Properties

The loc:items-result resource has the following properties:

results

An array that corresponds to the array of items given in the request. For each requested item, the following information is returned:

  • base: If handling of the item succeeded, then base contains the base information of the new item. If it fails, it contains the base information of the requested item.

  • success: true if the requested item was handled successfully, false if not

  • errorCode: (optional) if success is false: may contain a machine-readable error code

  • errorMessage: (optional) if success is false: may contain a human-readable error message

The order of the array corresponds to the order of the array of items in the request.

loc:item

An array of links to the items that were handled successfully.

Description

The loc:items-result represents the result of an operation on multiple location items.

It is currently used as response of the loc:add-items and loc:move-items link relations of the loc:item resource.

Note: The resource is only temporary available as a response of the corresponding calls. The information is not kept in memory and can’t be fetched again later on.

Examples

The example contains the result for two requested items. The requested operation failed for the first item, but succeeded for the second.
 
{
  "results": [
    {
      "base": {
        "id": "98.4132",
        "type": "folder-item",
        "systemType": "interplay-mam",
        "systemID": "ea836abc-105a-11ea-8d71-362b9e155667"
      },
      "success": false,
      "errorMessage": "Item not found"
    },
    {
      "base": {
        "id": "4129.4134",
        "type": "folder-item",
        "systemType": "interplay-mam",
        "systemID": "ea836abc-105a-11ea-8d71-362b9e155667"
      },
      "success": true
    }
  ],
  "_links": {
    "curies": [
      {
        "href": "https://developer.avid.com/ctms/api/loc/linkrels/{rel}.html",
        "name": "loc",
        "templated": true
      }
    ],
    "self": {
      "href": "https://host/…​",
      "templated": true
    },
    "loc:item": {
      "href": "https://host/…​"
    }
  },
  "_embedded": {
    "loc:item": [
      {
        "base": {
          "id": "4129.4134",
          "type": "folder-item",
          "systemType": "interplay-mam",
          "systemID": "ea836abc-105a-11ea-8d71-362b9e155667"
        },
        "common": {
          "name": "Morning News",
          "creator": "Administrator",
          "created": "2017-07-07T16:52:22.4796852+02:00",
          "modifier": "Administrator",
          "modified": "2017-07-07T16:52:22.4796852+02:00"
        },
        "_links": {
          "self": {
            "href": "https://host/…​"
          },
          "profile": {
            "href": "https://host/…​"
          },
          "loc:update-item": {
            "href": "https://host/…​"
          },
          "loc:path-to-root": {
            "href": "https://host/…​"
          }
        }
      }
    ]
  }
}