DocumentsApi¶
Access through client.Documents. Organization-level document list/create operations live on client.Organizations because their routes are organization-scoped.
Read¶
Route: GET /documents/{document}. Scope: documents:read.
Update¶
Route: PATCH /documents/{document}. Scope: documents:write.
The request can change project scope, title, caption, HTML content, draft/published status, archive state, editors, and tag names.
var published = await client.Documents.UpdateAsync(documentId,
new UpdateDocumentRequest
{
Status = DocumentStatus.Published,
TagNames = ["production", "runbook"]
});
Editor IDs have a maximum of 100. Tag names have a maximum of 20 values, each at most 50 characters.
Soft-delete¶
Route: DELETE /documents/{document}. Scope: documents:write.
Create comment¶
Task<DocumentComment> CreateCommentAsync(
string documentId,
CreateDocumentCommentRequest request, ...)
Route: POST /documents/{document}/comments. Scope: document_comments:write.