About this resource
Representation of a paged collection of Collection items
Properties
| Property | Description | Type |
|---|---|---|
| items | One page of this paged collection, which is a subcollection of the complete collection. | Collection of Collection items |
| page | The current page of this paged collection. | int32 |
| pageSize | The current page size of this paged collection. | int32 |
| skip | The current skip size of this paged collection. | int32 |
| take | The current take size of this paged collection. | int32 |
| totalCount | The total count of items in this paged collection, not just on the current page. | int64 |
Relations
Actions
| Method | Action | Description | Response codes | ||||||
|---|---|---|---|---|---|---|---|---|---|
| POST /collections/search | search | Search collections with the parameters in the request body |
|
||||||
| POST /collections | add | Create a new collection |
|
Examples
Searching for collections
The parameters are specified as HTTP headers.
GET /collections HTTP/1.1 filter: ModifiedOn in today sort: createdon page: 1 pageSize: 20
The parameters are specified as query string parameters.
GET /collections?filter=ModifiedOn+in+today&sort=createdon&page=1&pagesize=10 HTTP/1.1
The parameters are specified as a combination of query string parameters and HTTP headers.
GET /collections?filter=ModifiedOn+in+today&sort=createdon HTTP/1.1 page: 1 pageSize: 20
Searching for collections with the parameters in the request body.
Functionally equivalent to GET /collections, but the filter travels in the request body instead of a
header or the query string. Use this endpoint when the filter expression is too large for a header or
URL (for example, excluding a long list of collection ids).
POST /collections/search HTTP/1.1
{
"filter" : "NOT (Id in '"b59646bd-99cb-41b0-891a-b4050086ab93","a85d52b7-e97e-4783-aed7-b456009ea811"')",
"sort" : "Name",
"skip" : 0,
"take" : 20,
"includeArchived" : false
}
Creating a new static collection.
The "Type" parameter is optional when creating a static collection.
The "Tag" parameter is optional.
POST /collections HTTP/1.1s
{
"name" : "New Collection",
"description" : "Description for the collection",
"type" : "static",
"tag" : "<selectable></selectable>"
}
Creating a new dynamic collection.
The "Tag" parameter is optional.
POST /collections HTTP/1.1s
{
"name" : "New Collection",
"type" : "dynamic",
"searchExpression" : {
"expression" : "Classification.Name = 'MyClass'",
"languages" : [
"c2bd4f9bbb954bcb80c31e924c9c26dc"
]
},
"tag" : "<selectable></selectable>"
}
Creating a new dynamic collection with subexpressions.
The "Tag" parameter is optional.
POST /collections HTTP/1.1s
{
"name" : "New Collection",
"type" : "dynamic",
"searchExpression" : {
"subExpressions": [
{
"expression": "filecount >= 1",
"languages": [
"c2bd4f9bbb954bcb80c31e924c9c26dc"
]
},
{
"expression": "Classification.Name = 'MyClass'",
"languages": [
"c2bd4f9bbb954bcb80c31e924c9c26dc"
]
}
]
},
"tag" : "<selectable></selectable>"
}