Project documents¶
project_documents ¶
Project documents resource group.
Wraps two endpoints for plain-text project documents (custom instructions, reference material attached to a project):
GET /v1/compliance/apps/projects/documents/{document_id}— fetch one document including its text content.DELETE /v1/compliance/apps/projects/documents/{document_id}— hard-delete a document.
The list-of-documents view lives on the parent project — call
list_attachments
and filter by type == "project_doc". The discriminator returns
both binary files (project_file) and documents (project_doc)
because the API lists them on the same endpoint.
ProjectDocument
dataclass
¶
The full content of one project document.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Tagged document identifier ( |
filename |
str
|
Display name (e.g. |
content |
str
|
Document body, as plain text. |
created_at |
str
|
RFC 3339 creation timestamp. |
user |
dict[str, Any] | None
|
Creator info ( |
extra |
dict[str, Any]
|
Any additional fields the API adds in a later revision. |
from_dict
classmethod
¶
Build a ProjectDocument from one decoded record.
ProjectDocuments ¶
Synchronous client for the Project Documents endpoints.
get ¶
Fetch one project document, content included.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
document_id
|
str
|
Tagged document identifier (e.g. the |
required |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
When |
APIError
|
For any other non-2xx response. |
delete ¶
Hard-delete a project document.
Returns None on success; the server's confirmation payload
is discarded.
Raises:
| Type | Description |
|---|---|
NotFoundError
|
When |
APIError
|
For any other non-2xx response. |