OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

camp message

[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=64851#comment-64851 ] 

Michael Norman commented on CAMP-216:
-------------------------------------

Basic proposal is to add another query parameter "index_of_resource" which cannot be mixed with the normal Pagination parameters

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 0 or 1 depending on wheteher the URI is in the un-paginated collection
  "start_index": Number, This is set to the index of the URI within the collection or null if the URI is not in the unpaginated collection
  "items": camp_resource[], contains the Resource if it would have been present in the unpaginated collection otherwise empty set
  "metadata": object
}


> 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]