Get the document

Get the document

get
http://documenthub.documenthub.svc.cluster.local:4400/v0/{resourceKind}/{resourceId}/documents/{documentId}

Query Parameters

rawboolean

include raw document data in the response

Example:true

Path Parameters

resourceKindstringrequired

Kind of the Konnect resource

Allowed values:services

Example:services

resourceIdstring(uuid)required

Id of the Konnect resource

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

documentIdstring(uuid)required

Targeted document

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

Response

The document

Document

a document

idstring(uuid)required

Example:d32d905a-ed33-46a3-a093-d8f536af9a8a

statusstringrequired

Allowed values:publishedunpublished

parent_document_idstring | null(uuid)required

Example:dd4e1b98-3629-4dd3-acc0-759a726ffee2

slugstringrequired

document slug

Match pattern:^[\w-]+$

<= 80 characters

Example:path-for-seo

created_atstring(date-time)required

Example:2023-01-11T02:30:42.227Z

modified_atstring(date-time)required

Example:2023-01-11T02:30:42.227Z

revisionobjectrequired

revision of a document

Show Child Parameters
get/{resourceKind}/{resourceId}/documents/{documentId}
 

Update the document

Update the document

put
http://documenthub.documenthub.svc.cluster.local:4400/v0/{resourceKind}/{resourceId}/documents/{documentId}

Path Parameters

resourceKindstringrequired

Kind of the Konnect resource

Allowed values:services

Example:services

resourceIdstring(uuid)required

Id of the Konnect resource

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

documentIdstring(uuid)required

Targeted document

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

Body

application/json

document update

UpdateDocumentPayload

a document payload

parent_document_idstring | null(uuid)

Parent document Id. If this value is explicitly set to null, the
document will be put as a top level document at the bottom of the tree.

Example:dd4e1b98-3629-4dd3-acc0-759a726ffee2

slugstring

document slug

Match pattern:^[\w-]+$

<= 80 characters

Example:path-for-seo

statusstring

Allowed values:publishedunpublished

titlestring

document title

Example:How to update a document in Konnect DocumentHub

raw_contentstring(byte)

base64 encoded string of the document content

Example:YmFzZTY0LWVuY29kZWQgdGV4dCBzdHJpbmc=

str_md_contentstring

markdown content

Example:## My Markdown

filenamestring

name of the uploaded file

Example:my_doc.md

metadataobject | null

Response

application/json

The document has been updated

Document

a document

idstring(uuid)required

Example:d32d905a-ed33-46a3-a093-d8f536af9a8a

statusstringrequired

Allowed values:publishedunpublished

parent_document_idstring | null(uuid)required

Example:dd4e1b98-3629-4dd3-acc0-759a726ffee2

slugstringrequired

document slug

Match pattern:^[\w-]+$

<= 80 characters

Example:path-for-seo

created_atstring(date-time)required

Example:2023-01-11T02:30:42.227Z

modified_atstring(date-time)required

Example:2023-01-11T02:30:42.227Z

revisionobjectrequired

revision of a document

Show Child Parameters
put/{resourceKind}/{resourceId}/documents/{documentId}

Body

{}
 
application/json

Delete the document

Delete the document and all its associated revisions including the saved
files in the datastore. This is a hard delete, files are not recoverable.
Returns 404 if the document cannot be found, 409 if deleting the document would result in other orphaned documents.

delete
http://documenthub.documenthub.svc.cluster.local:4400/v0/{resourceKind}/{resourceId}/documents/{documentId}

Path Parameters

resourceKindstringrequired

Kind of the Konnect resource

Allowed values:services

Example:services

resourceIdstring(uuid)required

Id of the Konnect resource

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

documentIdstring(uuid)required

Targeted document

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

Response

The document has been deleted

delete/{resourceKind}/{resourceId}/documents/{documentId}
 

Move a document

This api allows the user to move a document within the document tree using the
parameters parent_document_id and index. If parent_document_id is not
provided, the document will be placed at the top level of the document tree.
index represents a zero-indexed document order relative to its siblings under
the same parent. For example, if we want to put the document at top level in
first position we would send parent_document_id: null and index: 0. This api
also supports using a negative index to count backwards from the end of the
document list, which means you can put the document in last position by using
index: -1.

put
http://documenthub.documenthub.svc.cluster.local:4400/v0/{resourceKind}/{resourceId}/documents/{documentId}/move

Path Parameters

resourceKindstringrequired

Kind of the Konnect resource

Allowed values:services

Example:services

resourceIdstring(uuid)required

Id of the Konnect resource

Example:bf138ba2-c9b1-4229-b268-04d9d8a6410b

documentIdstring(uuid)required

Targeted document

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

Body

application/json

move document

Move document

move document request payload

parent_document_idstring(uuid)

parent document id

Example:dd4e1b98-3629-4dd3-acc0-759a726ffee2

indexinteger

index of the document in the parent document’s children

Example:1

Response

The document has been moved

put/{resourceKind}/{resourceId}/documents/{documentId}/move

Body

{}
 

Slug

string

document slug

Match pattern:^[\w-]+$

<= 80 characters

Example