About this resource

Representation of the record collection

Properties

Property Description Type
createdOn Gets the creation datetime in UTC time. datetime
description Gets the description of this collection. string
id Gets the id of this collection. guid
isReadOnly Gets a value indicating whether the collection is read-only for current user. This property will not be returned by default. In order to include the property in the response, add a header with the name 'select-collection' and the value 'IsReadOnly' to your request. boolean
modifiedOn Gets the last modification datetime in UTC time. datetime
name Gets the name of this collection. string
ownerId Gets the collection owner Id. guid
searchCriteria Gets the search criteria of this collection. Returns null when the collection is static. Dictionary of pairs with string keys and jtoken values
searchExpression Gets the search expression of this collection. Returns null when the collection is static. searchexpressionmodel
tag Gets or sets the value for the Tag of this object. The value of this property has to be valid Xml. This property will not be returned by default. In order to include the property in the response, add a header with the name 'select-collection' and the value 'Tag' to your request. string
type Gets the type of this collection (static or dynamic). string (values: static, dynamic)

Relations

Method Name Select-key Resource type Description
GET self Provides a link to this resource.
GET ownedby select-Collection: ownedby User Gets the user that owns the collection
GET permissions select-Collection: permissions CollectionPermissions Gets the permissions of the collection
GET records select-Collection: records RecordCollection Gets the records of the collection
GET comments select-Collection: comments CommentPagedCollection Gets the comments on the collection
GET modifiedby select-Collection: modifiedby User Gets or sets the user that last modified this resource.
GET createdby select-Collection: createdby User Gets or sets the user that created this resource.

Actions

Method Action Description Response codes
PUT /collection/{collectionId} edit Edits an existing collection.
204 Request completed successfully
400 Bad request (in general)
403 Insufficient permissions
404 Collection not found
DELETE /collection/{collectionId} delete Deletes an existing collection.
204 Request completed successfully
403 Insufficient permissions
404 Collection not found
PUT /collection/{collectionId}/permissions permissionsedit Set the permissions of the collection.
204 Request completed successfully
400 Bad Request
403 Insufficient permissions
404 Collection not found
PUT /collection/{collectionId}/records recordsedit Set the records of the collection.
204 Request completed successfully
400 Bad Request
403 Insufficient permissions
404 Collection not found
POST /collection/{collectionId}/comments add Create a new comment on the collection
201 Request completed successfully
400 Bad Request
403 Insufficient permissions
404 Collection not found
PUT /collection/{collectionId}/comments/status markcommentsasread Marks the comments in a collection as read.
200 Request completed successfully
400 Bad Request
403 Insufficient permissions
404 Collection not found
DELETE /collection/{collectionId}/comment/{commentId} deletecomment Deletes a comment from a collection.
204 Request completed successfully
400 Bad Request
403 Insufficient permissions
404 Collection or comment not found
PUT /collection/{collectionId}/comment/{commentId} commentedit Edits a comment on a collection
204 Request completed successfully
400 Bad Request
403 Insufficient permissions
404 Collection or comment not found

Examples

Reading a collection using guid
GET /collection/f93aad563b034777b7daa842008d4f99 HTTP/1.1
{
	"_links": {
		"ownedby": {
			"href": "/user/fa286193ddbf44299d2ea2390e2a8b99",
			"select-key": "ownedby"
		},
		"permissions": {
			"href": "/collection/f93aad563b034777b7daa842008d4f99/permissions",
			"select-key": "permissions"
		},
		"records": {
			"href": "/collection/f93aad563b034777b7daa842008d4f99/records",
			"select-key": "records"
		},
		"modifiedby": {
			"href": "/user/fa286193ddbf44299d2ea2390e2a8b99",
			"select-key": "modifiedby"
		},
		"createdby": {
			"href": "/user/fa286193ddbf44299d2ea2390e2a8b99",
			"select-key": "createdby"
		},
		"self": {
			"href": "/collection/f93aad563b034777b7daa842008d4f99"
		}
	},
	"id": "f93aad563b034777b7daa842008d4f99",
	"name": "Collection name",
	"type": "static",
	"ownerId": "fa286193ddbf44299d2ea2390e2a8b99",
	"tag": null,
	"isReadOnly" : null,
	"modifiedOn": "2017-12-07T08:34:29.84Z",
	"createdOn": "2017-12-07T08:34:29.84Z"
}
Reading collection's permissions
GET /collection/f93aad563b034777b7daa842008d4f99/permissions
{
	"_links": {
		"permissions": {
			"href": "/collection/f93aad563b034777b7daa842008d4f99/permissions"
		}
	},
	"permissions": [
		{
			"userId": "fa286193ddbf44299d2ea2390e2a8b99",
			"permission": "Modify"
		},
		{
			"userId": "98c01138110445281215afb8cd61d3bc",
			"permission": "Read"
		}
	],
	"groupsPermissions": [
		{
			"groupId": "00db70f92fd2417cb898337b7a26641a",
			"permission": "Modify"
		},
		{
			"groupId": "98c01138110445281215afb8cd61d3bc",
			"permission": "Read"
		}
	],
	"publicPermission": "None",
	"canRead": true,
	"canModify": true,
	"contentPermission": {
		"contentSharingEnabled": true,
		"contentSharingExpiryDate": "2024-08-30T08:55:00Z",
		"permission": "read"
	}
}
Reading a collection's records
Note: this is not supported for dynamic collections. To read the records of a dynamic collection, you should use the record search expression "Collection(collectionId)".
GET /collection/f93aad563b034777b7daa842008d4f99/records
{
	"_links": {
		"records": {
			"href": "http://localhost:2015/collection/f93aad563b034777b7daa842008d4f99/records"
		}
	},
	"items": [
		{
			"_links": {
				"fields": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/fields",
					"select-key": "fields"
				},
				"files": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/files",
					"select-key": "files"
				},
				"preview": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/image/preview",
					"select-key": "preview"
				},
				"thumbnail": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/image/thumbnail",
					"select-key": "thumbnail"
				},
				"masterfile": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/masterfile",
					"select-key": "masterfile"
				},
				"masterfilelatestversion": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/masterfilelatestversion",
					"select-key": "masterfilelatestversion"
				},
				"classifications": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/classifications",
					"select-key": "classifications"
				},
				"parent": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/parent",
					"select-key": "parent"
				},
				"ancestors": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/ancestors",
					"select-key": "ancestors"
				},
				"children": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7/children",
					"select-key": "children"
				},
				"modifiedby": {
					"href": "http://localhost:2015/user/98c01138110445281215afb8cd61d3bc",
					"select-key": "modifiedby"
				},
				"createdby": {
					"href": "http://localhost:2015/user/98c01138110445281215afb8cd61d3bc",
					"select-key": "createdby"
				},
				"self": {
					"href": "http://localhost:2015/record/127fa1524e43497fb6d7a83c00efb7f7"
				}
			},
			"id": "127fa1524e43497fb6d7a83c00efb7f7",
			"contentType": "Record",
			"tag": null,
			"modifiedOn": "2017-12-01T14:32:51.7Z",
			"createdOn": "2017-12-01T14:32:47.327Z"
		}
	]
}
Editing an existing collection
PUT /collection/f93aad563b034777b7daa842008d4f99
{
  "name" : "New name for the collection",
  "description" : "New description for the collection",
  "tag" : "<selectable>new content</selectable>"
}
When editing a dynamic collection, you can also change the search expression of the collection.
PUT /collection/f93aad563b034777b7daa842008d4f99
{
  "name" : "New name for the collection",
  "searchExpression" : {
    "expression" : "Classification.Name = 'MyClass'",
    "languages" : [
      "c2bd4f9bbb954bcb80c31e924c9c26dc"
    ]
  },
  "tag" : "<selectable>new content</selectable>"
}
Deleting a collection
DELETE /collection/f93aad563b034777b7daa842008d4f99
Editing permissions of a collection
PUT /collection/f93aad563b034777b7daa842008d4f99/permissions
{
	"permissions": {
		"addOrUpdate": [
			{
				"userId":"32186193ddbf44200d2ea2390e2a8b00",
				"permission":"Read"
			}
		],
		"remove": [
			{
				"userId":"127fa1524e43497fb6d7a83c00efb7f7"
			}
		]
	},
	"groupsPermissions": {
		"addOrUpdate": [
			{
				"groupId":"f93aad563b034777b7daa842008d4f99",
				"permission":"Modify"
			}
		],
		"remove": [
			{
				"groupId":"127fa1524e43497fb6d7a83c00efb7f7"
			}
		]
	},
	"publicPermission": "None",
	"contentPermission": {
		"contentSharingEnabled": true,
		"contentSharingExpiryDate": "2025-08-30T08:55:00Z",
		"permission": "read"
	}
}
Note: The public permission of a collection can be either None or Read. Sharing a collection publicly with Modify permission is not supported.
Editing a collection's records
Note: this is not supported for dynamic collections.
PUT /collection/f93aad563b034777b7daa842008d4f99/records
{
	"records": {
		"addOrUpdate": [ "daffa1524e43497fb6d7a83c123457dd" ],
		"remove": [ "127fa1524e43497fb6d7a83c00efb7f7" ]
	}
}
Create a new comment on the collection
POST /collection/f93aad563b034777b7daa842008d4f99/comments
{
	"message": "Hello world" 
}
Marks the comment on a collection as read
PUT /collection/f93aad563b034777b7daa842008d4f99/comments/status
{
	"id": "4f247286901b4f0199fbb1e100734791",
	"lastReadCommentDate": "2024-12-07T08:34:29.84Z"
}
Deletes a comment from a collection
DELETE /collection/f93aad563b034777b7daa842008d4f99/comment/4f247286901b4f0199fbb1e100734791
Edits a comment on a collection
PUT /collection/f93aad563b034777b7daa842008d4f99/comments/4f247286901b4f0199fbb1e100734791
{
	"content": "Hello, John Doe"
}