[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (CAMP-216) API to get the index of an item within a collection
[ https://issues.oasis-open.org/browse/CAMP-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=64974#comment-64974 ] Anish Karmarkar commented on CAMP-216: -------------------------------------- If the item is not present in the collection it should be a 404. Here is a modified proposal (discussed on the 2017-01-19 telcon): GET collection?index_of_resource=<URI> will return a collection in the following way { "uri": URI, "name": String, "description": String ?, "tags": String[] ?, "representation_skew": String ?, "collection_type": URI, "total_items": Number, This is set to the number of Items in the unpaginated Collection "items_per_page": This is set to 1 "start_index": Number, This is set to the index of the URI specified in the query parameter within the collection "items": camp_resource[], contains the Resource pointed to by the URI specified in the query parameter "metadata": object } If the resource is not present in the collection the provider SHALL respond with a 404 > API to get the index of an item within a collection > --------------------------------------------------- > > Key: CAMP-216 > URL: https://issues.oasis-open.org/browse/CAMP-216 > Project: OASIS Cloud Application Management for Platforms (CAMP) TC > Issue Type: New Feature > Reporter: Michael Norman > Assignee: Anish Karmarkar > Priority: Minor > > In many UI use cases it is useful to retrieve the page within a collection which contains a specific resource, without having to iterate through the entire collection. -- This message was sent by Atlassian JIRA (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]