Create or Update collection

Create or Update the document collection. collectionId must be globally unique. A collectionId of a different kind (service/portal) must not already exist.

put
http://documenthub.documenthub.svc.cluster.local:4400/v2/collections/{collectionId}

Path Parameters

collectionIdstring(uuid)required

Targeted collection

Example:bb84c46a-432d-4314-81e4-478614a52dcb

Body

application/json

collection put

Document Collection

a document collection

namestringrequired

Example:my document collection

Response

application/json

The document collection has been updated

Document Collection

a document collection

idstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

namestringrequired

Example:my document collection

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

put/collections/{collectionId}

Body

{ "name": "my document collection" }
 
application/json

Update collection

Update the document collection

patch
http://documenthub.documenthub.svc.cluster.local:4400/v2/collections/{collectionId}

Path Parameters

collectionIdstring(uuid)required

Targeted collection

Example:bb84c46a-432d-4314-81e4-478614a52dcb

Body

application/json

collection update

UpdateCollectionPayload

payload to update the document collection

namestringrequired

Response

application/json

The document collection has been created

Document Collection

a document collection

idstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

namestringrequired

Example:my document collection

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

patch/collections/{collectionId}

Body

{ "name": "name" }
 
application/json

Delete collection

Delete the document collection

delete
http://documenthub.documenthub.svc.cluster.local:4400/v2/collections/{collectionId}

Path Parameters

collectionIdstring(uuid)required

Targeted collection

Example:bb84c46a-432d-4314-81e4-478614a52dcb

Response

The document collection has been deleted

delete/collections/{collectionId}
 

Documents

document operations

List collection documents

List documents in a collection

get
http://documenthub.documenthub.svc.cluster.local:4400/v2/collections/{collectionId}/documents

Query Parameters

sortstring

Sorts a collection of documents.
The sort parameter is only applied for ‘application/json’ content-type.
Supported sort attributes are:

  • created_at
  • updated_at
  • slug
  • title
page[size]integer

The maximum number of items to include per page. The last page of a collection may include fewer items.

Example:10

page[number]integer

Determines which page of the entities to retrieve.

Example:1

filterobject

Filter documents returned in the response.

Show Child Parameters

Path Parameters

collectionIdstring(uuid)required

Targeted collection

Example:bb84c46a-432d-4314-81e4-478614a52dcb

Headers

Acceptstring

Allowed values:application/jsonapplication/vnd.konnect.document-tree+json

Default:application/json

Response

Documents in the collection

ListDocuments

* Additional properties are NOT allowed.
metaobjectrequired

returns the pagination information

Show Child Parameters
dataarray[object]required
* Additional properties are NOT allowed.
Show Child Parameters
get/collections/{collectionId}/documents