Link relation loc:parent-collection

New in MC | Cloud UX 2020.4

Overview

Get the parent collection at the position of the current item. The link returns the collection with a subset of its items so that the current item is in the list.

  • If the current item is a folder, loc:parent-collection returns the collection of the parent folder.

  • If the current item is an item in a folder, loc:parent-collection returns the collection of the folder that contains the item.

HTTP method

GET

URI template variables

-

Query parameters

Defines which information is returned for the items in the collection. See Query parameters for items for details.

Defines which items are returned in the loc:collection resource. See Query parameters for collections for details.

If offset is given and not empty, it overrides the positioning within the collection and returns the items starting with the given offset.

Defines how multi-value attributes are returned. See Query parameters for items for details.

Request body

-

HTTP response

200 OK

403 Forbidden

The caller has no read permission for the collection.

404 Not Found

The parent collection doesn’t exist or the service or an intermediate resource is not available.

Response body

A loc:collection resource with the requested items.

Available in

Description

Link to a HAL resource that represents the collection of sub items of the parent folder, as in loc:collection, but at the position of the current item (unless defined otherwise with the query parameter offset). Sub items can be folders or asset references.

More precisely, the behavior depends on the query parameter limit that is used by the client to define how many items the service should return: If the caller asks for limit=20 items, the service usually returns 20 items with the requested item as the first in the list, but with two exceptions:

  • If the folder contains less than or equal to 20 items in total, the response contains all items in the folder. The requested item can be anywhere in that list.

  • If the requested item is one of the last 20 items in the folder, the service returns the last 20 items. The requested item can be anywhere in that list.