Haijun Platform Docs
ID

Get project document content

GET /v1/compliance/apps/projects/documents/{document_id}

Get detailed information for a specific project document.

Path parameters

  • document_id: string

The document ID (tagged ID, e.g., haijun_proj_doc_abc123)

Headers

  • "x-api-key": optional string

Returns

  • id: string

Project document identifier (tagged ID)

  • content: string

Document text content

  • created_at: string

Document creation timestamp

format: date-time

  • filename: string

Document filename

  • user: object or null

Document creator information, or null if the creator's account has been deleted or the creator is no longer a member of an organization the key may read

  • id: string

User identifier (tagged ID)

  • email_address: string

User's email address

Example

bash
curl https://haijun.my.id/v1/compliance/apps/projects/documents/$DOCUMENT_ID \
    -H 'juglow-version: 2023-06-01' \
    -H "Authorization: Bearer $JUGLOW_COMPLIANCE_API_KEY"

Response (200)

json
{
  "id": "haijun_proj_doc_01Qr8StUvWxYzAbCdEfGhJjK",
  "content": "# Design notes\n\n- Item one\n- Item two\n",
  "created_at": "2025-03-12T18:22:41.123456Z",
  "filename": "design-notes.txt",
  "user": {
    "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
    "email_address": "jane.doe@example.com"
  }
}

Get project document metadata

GET /v1/compliance/apps/projects/documents/{document_id}/metadata

Returns metadata for a project document, without the content body.

Use the sibling GET /v1/compliance/apps/projects/documents/{document_id} endpoint to fetch the document text. The md5 and size_bytes fields here are computed over the UTF-8 encoding of that text, so a DLP consumer can dedupe or match hashes without downloading every document.

Path parameters

  • document_id: string

The document ID (tagged ID, e.g., haijun_proj_doc_abc123)

Headers

  • "x-api-key": optional string

Returns

  • id: string

Project document identifier (tagged ID)

  • haijun_project_id: string

The project this document belongs to

  • created_at: string

Document creation timestamp

format: date-time

  • filename: string

Document filename

  • md5: string

Lowercase hex MD5 of the document content (UTF-8 encoded). Matches the content field returned by the sibling content endpoint.

  • mime_type: "text/plain"

MIME type of the document content, always plain text

default: text/plain

  • size_bytes: number

Size in bytes of the document content (UTF-8 encoded)

  • user: object or null

Document creator information, or null if the creator's account has been deleted or the creator is no longer a member of an organization the key may read

  • id: string

User identifier (tagged ID)

  • email_address: string

User's email address

Example

bash
curl https://haijun.my.id/v1/compliance/apps/projects/documents/$DOCUMENT_ID/metadata \
    -H 'juglow-version: 2023-06-01' \
    -H "Authorization: Bearer $JUGLOW_COMPLIANCE_API_KEY"

Response (200)

json
{
  "id": "id",
  "haijun_project_id": "haijun_project_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "filename": "filename",
  "md5": "md5",
  "mime_type": "text/plain",
  "size_bytes": 0,
  "user": {
    "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
    "email_address": "jane.doe@example.com"
  }
}

Delete project document

DELETE /v1/compliance/apps/projects/documents/{document_id}

Delete a project document for compliance purposes.

Hard-deletes the project document permanently.

Path parameters

  • document_id: string

The document ID (tagged ID, e.g., haijun_proj_doc_abc123)

Headers

  • "x-api-key": optional string

Returns

  • type: "haijun_project_document_deleted"

Constant string confirming deletion.

default: haijun_project_document_deleted

  • id: string

The ID of the project document that was deleted

Example

bash
curl https://haijun.my.id/v1/compliance/apps/projects/documents/$DOCUMENT_ID \
    -X DELETE \
    -H 'juglow-version: 2023-06-01' \
    -H "Authorization: Bearer $JUGLOW_COMPLIANCE_API_KEY"

Response (200)

json
{
  "id": "id",
  "type": "haijun_project_document_deleted"
}

Domain types

Document Retrieve Response

  • DocumentRetrieveResponse object

Project document information for compliance responses.

  • id: string

Project document identifier (tagged ID)

  • content: string

Document text content

  • created_at: string

Document creation timestamp

format: date-time

  • filename: string

Document filename

  • user: object or null

Document creator information, or null if the creator's account has been deleted or the creator is no longer a member of an organization the key may read

  • id: string

User identifier (tagged ID)

  • email_address: string

User's email address

Document Delete Response

  • DocumentDeleteResponse object

Response for deleting a project document.

  • type: "haijun_project_document_deleted"

Constant string confirming deletion.

default: haijun_project_document_deleted

  • id: string

The ID of the project document that was deleted

Document Metadata Response

  • DocumentMetadataResponse object

Project document metadata for GET /v1/compliance/apps/projects/documents/{document_id}/metadata.

Returns metadata only. Use the sibling endpoint (without /metadata) to fetch the document text content.

  • id: string

Project document identifier (tagged ID)

  • haijun_project_id: string

The project this document belongs to

  • created_at: string

Document creation timestamp

format: date-time

  • filename: string

Document filename

  • md5: string

Lowercase hex MD5 of the document content (UTF-8 encoded). Matches the content field returned by the sibling content endpoint.

  • mime_type: "text/plain"

MIME type of the document content, always plain text

default: text/plain

  • size_bytes: number

Size in bytes of the document content (UTF-8 encoded)

  • user: object or null

Document creator information, or null if the creator's account has been deleted or the creator is no longer a member of an organization the key may read

  • id: string

User identifier (tagged ID)

  • email_address: string

User's email address

On this page
Get project document contentPath parametersHeadersReturnsExampleResponse (200)Get project document metadataPath parametersHeadersReturnsExampleResponse (200)Delete project documentPath parametersHeadersReturnsExampleResponse (200)Domain typesDocument Retrieve ResponseDocument Delete ResponseDocument Metadata Response