AI Document Assistant (1.0.0-eb864c9)

Download OpenAPI specification:Download

Documents

Get Documents

Returns the identifiers of all the documents ingested into the AI Document Assistant database.

If the identifier is listed in the response, the database contains contextual information such document metadata, and document contents, as well as AI synthesized information such as classifications, and summaries.

Authorizations:
ApiAuthToken

Responses

Response samples

Content type
application/json
{
  • "documents": [
    ]
}

Delete Document

Deletes the data associated with each layer of the given document, as well as the document default layer (no layer name) itself.

All data including contextual data such as document metadata, and document contents, as well as AI synthesized information such as classifications, and summaries will be deleted.

Authorizations:
ApiAuthToken
path Parameters
documentId
required
string
Example: 123456789abc

The ID of the document to delete. This ID is given when creating the document on the Document Engine.

Responses

Response samples

Content type
application/json
{ }

Delete Document Layer

Deletes the data associated with the given document layer.

All data including contextual data such as document metadata, and document contents, as well as AI synthesized information such as classifications, and summaries will be deleted.

Authorizations:
ApiAuthToken
path Parameters
documentId
required
string
Example: 123456789abc

The ID of the document to delete the layer from. This ID is given when creating the document on the Document Engine.

layerName
required
string
Example: 123456789abc

The name of the layer to delete. This layer name is given when creating a layer on the Document Engine.

Responses

Response samples

Content type
application/json
{ }

Health

Health check

Responds with the health status of the server.

Authorizations:
none

Responses

Response samples

Content type
application/json
{
  • "uptime": 123,
  • "message": "OK",
  • "timestamp": 1620000000000
}

Sessions

Get Sessions

Returns all the session information held in the AI Document Assistant database.

This includes the session ID, the user ID (if present), and the timestamp of the last message sent.

Authorizations:
ApiAuthToken

Responses

Response samples

Content type
application/json
{
  • "sessions": [
    ]
}

Delete Session

Deletes all session data for the given Session ID.

This includes all messages and metadata associated with the session. Meaning the chat history will no longer be available.

Authorizations:
ApiAuthToken
path Parameters
sessionId
required
string
Example: 123456789abc

The unique identifier for the session. This value is given as part of the AI Document Assistant configuration when initializing the PSPDFKit for Web.

Responses

Response samples

Content type
application/json
{ }

Get User Sessions

Returns all the session information for all sessions tagged with a given user ID.

Sessions are tagged with a user ID when the AI Document Assistant configuration in PSPDFKit for Web is initialized with a user ID.

Authorizations:
ApiAuthToken
path Parameters
userId
required
string
Example: 123456789abc

The unique identifier for the user. This value is optionally given in the AI Document Assistant configuration when initializing the PSPDFKit for Web.

Responses

Response samples

Content type
application/json
{
  • "sessions": [
    ]
}