> For the complete documentation index, see [llms.txt](https://intuitem.gitbook.io/ciso-assistant/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://intuitem.gitbook.io/ciso-assistant/api-documentation/api-reference/document-revisions.md). Agents can also search and read this documentation through its [MCP server](https://intuitem.gitbook.io/ciso-assistant/~gitbook/mcp).

# Document revisions

## GET /api/document-revisions/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"PaginatedDocumentRevisionReadList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRevisionRead"}}}},"DocumentRevisionRead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"document":{"type":"string","readOnly":true},"author":{"type":"string","readOnly":true},"reviewer":{"type":"string","readOnly":true},"status_display":{"type":"string"},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"version_number":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64"},"content":{"type":"string"},"status":{"$ref":"#/components/schemas/Status2a8Enum"},"reviewer_comments":{"type":"string","nullable":true},"change_summary":{"type":"string","maxLength":500},"pdf_snapshot":{"type":"string","format":"uri","nullable":true},"source":{"$ref":"#/components/schemas/Source363Enum"},"file":{"type":"string","format":"uri","nullable":true},"url":{"oneOf":[{"type":"string","format":"uri","maxLength":2048},{"type":"string","maxLength":0}]},"published_at":{"type":"string","format":"date-time","nullable":true},"editing_since":{"type":"string","format":"date-time","nullable":true},"folder":{"type":"string","format":"uuid"},"editing_user":{"type":"string","format":"uuid","nullable":true}},"required":["author","created_at","document","id","reviewer","status_display","updated_at"]},"Status2a8Enum":{"enum":["draft","in_review","change_requested","validated","published","deprecated"],"type":"string","description":"* `draft` - Draft\n* `in_review` - In review\n* `change_requested` - Change requested\n* `validated` - Validated\n* `published` - Published\n* `deprecated` - Deprecated"},"Source363Enum":{"enum":["authored","uploaded","link"],"type":"string","description":"* `authored` - Authored\n* `uploaded` - Uploaded\n* `link` - Linked"}}},"paths":{"/api/document-revisions/":{"get":{"operationId":"document_revisions_list","description":"API endpoint that allows document revisions to be viewed or edited.","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}}],"tags":["document-revisions"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDocumentRevisionReadList"}}},"description":""}}}}}}
```

## POST /api/document-revisions/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"DocumentRevisionWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"version_number":{"type":"integer","readOnly":true},"content":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/Status2a8Enum"}],"readOnly":true},"reviewer_comments":{"type":"string","readOnly":true,"nullable":true},"change_summary":{"type":"string","maxLength":500},"pdf_snapshot":{"type":"string","format":"uri","nullable":true,"readOnly":true},"source":{"$ref":"#/components/schemas/Source363Enum"},"file":{"type":"string","format":"uri","nullable":true},"url":{"oneOf":[{"type":"string","format":"uri","maxLength":2048},{"type":"string","maxLength":0}]},"published_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"editing_since":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"folder":{"type":"string","format":"uuid"},"document":{"type":"string","format":"uuid"},"author":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"reviewer":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"editing_user":{"type":"string","format":"uuid","readOnly":true,"nullable":true}},"required":["author","created_at","document","editing_since","editing_user","id","pdf_snapshot","published_at","reviewer","reviewer_comments","status","updated_at","version_number"]},"Status2a8Enum":{"enum":["draft","in_review","change_requested","validated","published","deprecated"],"type":"string","description":"* `draft` - Draft\n* `in_review` - In review\n* `change_requested` - Change requested\n* `validated` - Validated\n* `published` - Published\n* `deprecated` - Deprecated"},"Source363Enum":{"enum":["authored","uploaded","link"],"type":"string","description":"* `authored` - Authored\n* `uploaded` - Uploaded\n* `link` - Linked"}}},"paths":{"/api/document-revisions/":{"post":{"operationId":"document_revisions_create","description":"API endpoint that allows document revisions to be viewed or edited.","tags":["document-revisions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}}},"description":""}}}}}}
```

## GET /api/document-revisions/{id}/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"DocumentRevisionRead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"document":{"type":"string","readOnly":true},"author":{"type":"string","readOnly":true},"reviewer":{"type":"string","readOnly":true},"status_display":{"type":"string"},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"version_number":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64"},"content":{"type":"string"},"status":{"$ref":"#/components/schemas/Status2a8Enum"},"reviewer_comments":{"type":"string","nullable":true},"change_summary":{"type":"string","maxLength":500},"pdf_snapshot":{"type":"string","format":"uri","nullable":true},"source":{"$ref":"#/components/schemas/Source363Enum"},"file":{"type":"string","format":"uri","nullable":true},"url":{"oneOf":[{"type":"string","format":"uri","maxLength":2048},{"type":"string","maxLength":0}]},"published_at":{"type":"string","format":"date-time","nullable":true},"editing_since":{"type":"string","format":"date-time","nullable":true},"folder":{"type":"string","format":"uuid"},"editing_user":{"type":"string","format":"uuid","nullable":true}},"required":["author","created_at","document","id","reviewer","status_display","updated_at"]},"Status2a8Enum":{"enum":["draft","in_review","change_requested","validated","published","deprecated"],"type":"string","description":"* `draft` - Draft\n* `in_review` - In review\n* `change_requested` - Change requested\n* `validated` - Validated\n* `published` - Published\n* `deprecated` - Deprecated"},"Source363Enum":{"enum":["authored","uploaded","link"],"type":"string","description":"* `authored` - Authored\n* `uploaded` - Uploaded\n* `link` - Linked"}}},"paths":{"/api/document-revisions/{id}/":{"get":{"operationId":"document_revisions_retrieve","description":"API endpoint that allows document revisions to be viewed or edited.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevisionRead"}}},"description":""}}}}}}
```

## PUT /api/document-revisions/{id}/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"DocumentRevisionWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"version_number":{"type":"integer","readOnly":true},"content":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/Status2a8Enum"}],"readOnly":true},"reviewer_comments":{"type":"string","readOnly":true,"nullable":true},"change_summary":{"type":"string","maxLength":500},"pdf_snapshot":{"type":"string","format":"uri","nullable":true,"readOnly":true},"source":{"$ref":"#/components/schemas/Source363Enum"},"file":{"type":"string","format":"uri","nullable":true},"url":{"oneOf":[{"type":"string","format":"uri","maxLength":2048},{"type":"string","maxLength":0}]},"published_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"editing_since":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"folder":{"type":"string","format":"uuid"},"document":{"type":"string","format":"uuid"},"author":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"reviewer":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"editing_user":{"type":"string","format":"uuid","readOnly":true,"nullable":true}},"required":["author","created_at","document","editing_since","editing_user","id","pdf_snapshot","published_at","reviewer","reviewer_comments","status","updated_at","version_number"]},"Status2a8Enum":{"enum":["draft","in_review","change_requested","validated","published","deprecated"],"type":"string","description":"* `draft` - Draft\n* `in_review` - In review\n* `change_requested` - Change requested\n* `validated` - Validated\n* `published` - Published\n* `deprecated` - Deprecated"},"Source363Enum":{"enum":["authored","uploaded","link"],"type":"string","description":"* `authored` - Authored\n* `uploaded` - Uploaded\n* `link` - Linked"}}},"paths":{"/api/document-revisions/{id}/":{"put":{"operationId":"document_revisions_update","description":"API endpoint that allows document revisions to be viewed or edited.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}}},"description":""}}}}}}
```

## DELETE /api/document-revisions/{id}/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/":{"delete":{"operationId":"document_revisions_destroy","description":"API endpoint that allows document revisions to be viewed or edited.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /api/document-revisions/{id}/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"PatchedDocumentRevisionWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"version_number":{"type":"integer","readOnly":true},"content":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/Status2a8Enum"}],"readOnly":true},"reviewer_comments":{"type":"string","readOnly":true,"nullable":true},"change_summary":{"type":"string","maxLength":500},"pdf_snapshot":{"type":"string","format":"uri","nullable":true,"readOnly":true},"source":{"$ref":"#/components/schemas/Source363Enum"},"file":{"type":"string","format":"uri","nullable":true},"url":{"oneOf":[{"type":"string","format":"uri","maxLength":2048},{"type":"string","maxLength":0}]},"published_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"editing_since":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"folder":{"type":"string","format":"uuid"},"document":{"type":"string","format":"uuid"},"author":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"reviewer":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"editing_user":{"type":"string","format":"uuid","readOnly":true,"nullable":true}}},"Status2a8Enum":{"enum":["draft","in_review","change_requested","validated","published","deprecated"],"type":"string","description":"* `draft` - Draft\n* `in_review` - In review\n* `change_requested` - Change requested\n* `validated` - Validated\n* `published` - Published\n* `deprecated` - Deprecated"},"Source363Enum":{"enum":["authored","uploaded","link"],"type":"string","description":"* `authored` - Authored\n* `uploaded` - Uploaded\n* `link` - Linked"},"DocumentRevisionWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"version_number":{"type":"integer","readOnly":true},"content":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/Status2a8Enum"}],"readOnly":true},"reviewer_comments":{"type":"string","readOnly":true,"nullable":true},"change_summary":{"type":"string","maxLength":500},"pdf_snapshot":{"type":"string","format":"uri","nullable":true,"readOnly":true},"source":{"$ref":"#/components/schemas/Source363Enum"},"file":{"type":"string","format":"uri","nullable":true},"url":{"oneOf":[{"type":"string","format":"uri","maxLength":2048},{"type":"string","maxLength":0}]},"published_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"editing_since":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"folder":{"type":"string","format":"uuid"},"document":{"type":"string","format":"uuid"},"author":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"reviewer":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"editing_user":{"type":"string","format":"uuid","readOnly":true,"nullable":true}},"required":["author","created_at","document","editing_since","editing_user","id","pdf_snapshot","published_at","reviewer","reviewer_comments","status","updated_at","version_number"]}}},"paths":{"/api/document-revisions/{id}/":{"patch":{"operationId":"document_revisions_partial_update","description":"API endpoint that allows document revisions to be viewed or edited.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDocumentRevisionWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedDocumentRevisionWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedDocumentRevisionWrite"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRevisionWrite"}}},"description":""}}}}}}
```

## POST /api/document-revisions/{id}/approve/

> Approve a revision: transition from in\_review to validated.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/approve/":{"post":{"operationId":"document_revisions_approve_create","description":"Approve a revision: transition from in_review to validated.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/cascade-info/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/cascade-info/":{"get":{"operationId":"document_revisions_cascade_info_retrieve","description":"API endpoint that allows document revisions to be viewed or edited.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/diff/{other\_id}/

> Compute unified diff between this revision and another of the same document.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/diff/{other_id}/":{"get":{"operationId":"document_revisions_diff_retrieve","description":"Compute unified diff between this revision and another of the same document.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"path","name":"other_id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/edit-diff/{edit\_a\_id}/{edit\_b\_id}/

> Compute unified diff between two DocumentEdit content snapshots.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/edit-diff/{edit_a_id}/{edit_b_id}/":{"get":{"operationId":"document_revisions_edit_diff_retrieve","description":"Compute unified diff between two DocumentEdit content snapshots.","parameters":[{"in":"path","name":"edit_a_id","schema":{"type":"string"},"required":true},{"in":"path","name":"edit_b_id","schema":{"type":"string"},"required":true},{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/edit-history/

> Return the edit history for this revision.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/edit-history/":{"get":{"operationId":"document_revisions_edit_history_retrieve","description":"Return the edit history for this revision.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/edit-snapshot/{edit\_id}/

> Return the content snapshot of a specific edit.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/edit-snapshot/{edit_id}/":{"get":{"operationId":"document_revisions_edit_snapshot_retrieve","description":"Return the content snapshot of a specific edit.","parameters":[{"in":"path","name":"edit_id","schema":{"type":"string"},"required":true},{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/editing-status/

> Check who is currently editing.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/editing-status/":{"get":{"operationId":"document_revisions_editing_status_retrieve","description":"Check who is currently editing.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/export-pdf/

> Export revision content as a PDF document.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/export-pdf/":{"get":{"operationId":"document_revisions_export_pdf_retrieve","description":"Export revision content as a PDF document.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/file/

> Serve an uploaded revision's file (PDF inline, everything else download).

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/file/":{"get":{"operationId":"document_revisions_file_retrieve","description":"Serve an uploaded revision's file (PDF inline, everything else download).","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/neighborhood/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/neighborhood/":{"get":{"operationId":"document_revisions_neighborhood_retrieve","description":"API endpoint that allows document revisions to be viewed or edited.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/{id}/object/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/object/":{"get":{"operationId":"document_revisions_object_retrieve","description":"API endpoint that allows document revisions to be viewed or edited.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/document-revisions/{id}/publish/

> Publish a validated revision: deprecate previous, generate PDF.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/publish/":{"post":{"operationId":"document_revisions_publish_create","description":"Publish a validated revision: deprecate previous, generate PDF.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/document-revisions/{id}/request-changes/

> Request changes on an in-review revision.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/request-changes/":{"post":{"operationId":"document_revisions_request_changes_create","description":"Request changes on an in-review revision.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/document-revisions/{id}/start-editing/

> Mark the current user as editing this revision.\
> \
> Uses select\_for\_update to prevent two concurrent requests from both\
> believing they acquired the lock (race in the read-check-write path).

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/start-editing/":{"post":{"operationId":"document_revisions_start_editing_create","description":"Mark the current user as editing this revision.\n\nUses select_for_update to prevent two concurrent requests from both\nbelieving they acquired the lock (race in the read-check-write path).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/document-revisions/{id}/stop-editing/

> Release the editing lock.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/stop-editing/":{"post":{"operationId":"document_revisions_stop_editing_create","description":"Release the editing lock.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/document-revisions/{id}/submit-for-review/

> Transition from draft or change\_requested to in\_review.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/submit-for-review/":{"post":{"operationId":"document_revisions_submit_for_review_create","description":"Transition from draft or change_requested to in_review.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/document-revisions/{id}/take-over-editing/

> Force-acquire the editing lock, overriding the current editor.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/{id}/take-over-editing/":{"post":{"operationId":"document_revisions_take_over_editing_create","description":"Force-acquire the editing lock, overriding the current editor.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Document revision.","required":true}],"tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/autocomplete/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/autocomplete/":{"get":{"operationId":"document_revisions_autocomplete_retrieve","description":"API endpoint that allows document revisions to be viewed or edited.","tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/document-revisions/batch-action/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/batch-action/":{"post":{"operationId":"document_revisions_batch_action_create","description":"API endpoint that allows document revisions to be viewed or edited.","tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/document-revisions/status/

> API endpoint that allows document revisions to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"document-revisions"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/document-revisions/status/":{"get":{"operationId":"document_revisions_status_retrieve","description":"API endpoint that allows document revisions to be viewed or edited.","tags":["document-revisions"],"responses":{"200":{"description":"No response body"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://intuitem.gitbook.io/ciso-assistant/api-documentation/api-reference/document-revisions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
