Retrieve a List of Collections
get
/documents/api/1.1/collections/items
Retrieves a list of collections.
Request
There are no request parameters for this operation.
Response
Supported Media Types
- application/json
- application/xml
200 Response
The request was fulfilled.
Body
Root Schema : CollectionListResponse
- count
-
Type:
stringThe number of collections returned. - errorCode
-
Type:
stringAn error code of zero (0) indicates no errors. - hasMore
-
Type:
stringIndicates if all collections were returned; if all the collections were returned, this is zero (0). - items
-
Type:
arrayitemsAdditional Properties Allowed:List of collections. - offset
-
Type:
stringThe point at which to begin the list of items or page of results from the complete set. - totalOwned
-
Type:
stringTotal number of collections owned by the user. - totalResults
-
Type:
stringTotal number of collections the user can access. - totalShared
-
Type:
stringTotal number of collections shared with the user.
Nested Schema : items
Type:
arrayList of collections.
-
Type:
objectItemsListedCollectionAdditional Properties Allowed:Collection information
Nested Schema : ItemsListedCollection
Collection information
- createdBy
-
Type:
objectUserAdditional Properties Allowed:User information - createdTime
-
Type:
stringDate the collection was created. - description
-
Type:
stringCollection description. - id
-
Type:
stringGlobally unique identifier (GUID) for the folder. - modifiedBy
-
Type:
objectUserAdditional Properties Allowed:User information - modifiedTime
-
Type:
stringDate the collection was last modified. - name
-
Type:
stringCollection name. - ownedBy
-
Type:
objectUserAdditional Properties Allowed:User information - type
-
Type:
stringItem typecollection.
Nested Schema : User
User information
- displayName
-
Type:
stringThe display name for the user. - id
-
Type:
stringGlobally unique identifier (GUID) for the user. - type
-
Type:
stringItem typeuser.
Example application/json
{
"count":"1",
"errorCode":"0",
"hasMore":"0",
"offset":"0",
"totalOwned":"1",
"totalResults":"1",
"totalShared":"0",
"items":[
{
"type":"collection",
"id":"FB0CC049082D12D32B3A8774T0000DEFAULT00000000",
"name":"myCollection",
"createdBy":{
"id":"U0EAA20910FAF3052ACB79E4T00000000001",
"displayName":"User AA",
"loginName":"UserAA",
"type":"user"
},
"modifiedBy":{
"id":"U0EAA20910FAF3052ACB79E4T00000000001",
"displayName":"User AA",
"loginName":"UserAA",
"type":"user"
},
"ownedBy":{
"id":"U0EAA20910FAF3052ACB79E4T00000000001",
"displayName":"User AA",
"loginName":"UserAA",
"type":"user"
},
"createdTime":"2017-05-15T22:40:30Z",
"modifiedTime":"2017-05-15T22:40:30Z",
"description":"REST Collection"
}
]
}
Examples
The following example returns a list of the collections to which the user has access.
GET .../collections/items
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{
"count": "3",
"errorCode": "0",
"hasMore": "0",
"offset": "0",
"totalOwned": "2",
"totalResults": "3",
"totalShared": "1",
"items": [
{
"type": "collection",
"id": "F5E88D06A5AEC588BDB96A2045B3E9DD649055F5640B",
"name": "Collection1",
"ownedBy": {
"displayName": "cecsuser4",
"id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName": "tenant1.cecsuser4",
"type": "user"
},
"createdBy": {
"displayName": "cecsuser4",
"id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName": "tenant1.cecsuser4",
"type": "user"
},
"modifiedBy": {
"displayName": "cecsuser4",
"id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName": "tenant1.cecsuser4",
"type": "user"
},
"createdTime": "2017-05-16T20:09:29Z",
"modifiedTime": "2017-05-16T20:09:29Z",
"description": "Collectionl Description"
},
{
"type": "collection",
"id": "F115DB7F25C6C2C2098ADC4545B3E9DD649055F5640B",
"name": "Collection2",
"ownedBy": {
"displayName": "cecsuser4",
"id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName": "tenant1.cecsuser4",
"type": "user"
},
"createdBy": {
"displayName": "cecsuser4",
"id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName": "tenant1.cecsuser4",
"type": "user"
},
"modifiedBy": {
"displayName": "cecsuser4",
"id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName": "tenant1.cecsuser4",
"type": "user"
},
"createdTime": "2017-05-16T20:09:52Z",
"modifiedTime": "2017-05-16T20:09:52Z"
},
{
"type": "collection",
"id": "FB0D96BA354156E495F5475B45B3E9DD649055F5640B",
"name": "CollectionCreatedByAdmin",
"ownedBy": {
"displayName": "cecsadmina",
"id": "UC8DCBEBB5C38E0FA2CE33EF45B3E9DD6490",
"loginName": "tenant1.cecsadmina",
"type": "user"
},
"createdBy": {
"displayName": "cecsadmina",
"id": "UC8DCBEBB5C38E0FA2CE33EF45B3E9DD6490",
"loginName": "tenant1.cecsadmina",
"type": "user"
},
"modifiedBy": {
"displayName": "cecsadmina",
"id": "UC8DCBEBB5C38E0FA2CE33EF45B3E9DD6490",
"loginName": "tenant1.cecsadmina",
"type": "user"
},
"createdTime": "2017-05-16T20:17:44Z",
"modifiedTime": "2017-05-16T20:17:44Z"
}
]
}
Example 2
The following example lists only one of the collections to which the user has access, sorted by 'modifiedTime' in descending order and including HATEOAS links.
GET .../collections/items?limit=1&links=yes&orderBy=modifiedTime:desc
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{
"count": "1",
"errorCode": "0",
"hasMore": "1",
"links": [
{
"rel": "self",
"href": "https://service1-tenant1.hourly.gemini.shared.osn.oraclecorp.com:19201/documents/api/1.1/collections/items?limit=1&links=yes&orderBy=modifiedTime:desc"
},
{
"rel": "canonical",
"href": "https://service1-tenant1.hourly.gemini.shared.osn.oraclecorp.com:19201/documents/api/1.1/collections/items?limit=11&links=yes&orderBy=modifiedTime:desc"
},
{
"rel": "next",
"href": "https://service1-tenant1.hourly.gemini.shared.osn.oraclecorp.com:19201/documents/api/1.1/collections/items?offset=1&limit=1&orderBy=modifiedTime:desc1&links=yes"
}
],
"offset": "0",
"totalOwned": "2",
"totalResults": "3",
"totalShared": "1",
"items": [
{
"type": "collection",
"id": "FB0D96BA354156E495F5475B45B3E9DD649055F5640B",
"name": "CollectionCreatedByAdmin",
"ownedBy": {
"displayName": "cecsadmina",
"id": "UC8DCBEBB5C38E0FA2CE33EF45B3E9DD6490",
"loginName": "tenant1.cecsadmina",
"type": "user"
},
"createdBy": {
"displayName": "cecsadmina",
"id": "UC8DCBEBB5C38E0FA2CE33EF45B3E9DD6490",
"loginName": "tenant1.cecsadmina",
"type": "user"
},
"modifiedBy": {
"displayName": "cecsadmina",
"id": "UC8DCBEBB5C38E0FA2CE33EF45B3E9DD6490",
"loginName": "tenant1.cecsadmina",
"type": "user"
},
"createdTime": "2017-05-16T20:17:44Z",
"modifiedTime": "2017-05-16T20:17:44Z"
}
]
}