DocSet Functions
Functions for managing document sets (DocSets) which are collections of documents.Create DocSet
Create a new DocSet to store documents.Parameters
Parameters
Example
Example
Return Value
Return Value
A DocSetMetadata object containing:
Unique identifier for the DocSet
Name of the DocSet
Creation timestamp
Boolean indicating if DocSet is read-only
Dictionary of custom properties
Size of DocSet in bytes
Schema object defining document properties
Dictionary of prompts for the DocSet
Get DocSet
Retrieve metadata for a DocSet.Parameters
Parameters
The unique identifier of the DocSet to retrieve
Example
Example
Return Value
Return Value
A DocSetMetadata object containing:
Unique identifier for the DocSet
Name of the DocSet
Creation timestamp
Boolean indicating if DocSet is read-only
Dictionary of custom properties
Size of DocSet in bytes
Schema object defining document properties
Dictionary of prompts for the DocSet
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “DocSet not found”HTTPError 5xx
: Internal Server Error
List DocSets
List all DocSets in the account.Parameters
Parameters
Example
Example
Return Value
Return Value
A paginated list of DocSetMetadata objects, each containing:
Unique identifier for the DocSet
Name of the DocSet
Creation timestamp
Boolean indicating if DocSet is read-only
Dictionary of custom properties
Size of DocSet in bytes
Schema object defining document properties
Dictionary of prompts for the DocSet
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 5xx
: Internal Server Error
Delete DocSet
Delete a DocSet and all its documents.Parameters
Parameters
The unique identifier of the DocSet to delete
Example
Example
Return Value
Return Value
The metadata of the deleted DocSet
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “DocSet not found”HTTPError 5xx
: Internal Server Error
Document Functions
Functions for managing individual documents within DocSets.Add Document
Add a single document to the Aryn platform. This API calls DocParse to partition the document, and automatically extracts any properties registered as part of the DocSet schema.Parameters
Parameters
A
file
opened in binary mode or a path specified as either a str
or PathLike
instance, or an HTTP URL indicating the document to add. The path can either be a local path or an Amazon S3 url starting with s3://
. The URL can start with either https://
or http://
. In the latter case, you must have boto3 installed and AWS credentials set up in your environment.The id of the DocSet into which to add the document.
Example
Example
Return Value
Return Value
A
DocumentMetadata
object containingAccount identifier
Document identifier
Document set identifier
Document name
Creation timestamp
Document size in bytes
MIME type of document
Custom document properties
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “DocSet not found”HTTPError 5xx
: Internal Server Error
List Documents
List all documents in a DocSet.Parameters
Parameters
Example
Example
Return Value
Return Value
A paginated list of DocumentMetadata objects, each containing:
Account identifier
Document identifier
Document set identifier
Document name
Creation timestamp
Document size in bytes
MIME type of document
Custom document properties
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “DocSet not found”HTTPError 400
: “Invalid filter parameters”HTTPError 5xx
: Internal Server Error
Get Document
Get a document by ID.Parameters
Parameters
Example
Example
Return Value
Return Value
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “Document not found”HTTPError 5xx
: Internal Server Error
Delete Document
Delete a document by ID.Parameters
Parameters
Example
Example
Return Value
Return Value
The metadata of the deleted document
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “Document not found”HTTPError 5xx
: Internal Server Error
Get Document Binary
Get the binary content of a document.Parameters
Parameters
Example
Example
Return Value
Return Value
The binary content of the document
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “Document not found”HTTPError 5xx
: Internal Server Error
Properties Functions
Functions for managing document properties.Update Document Properties
Update properties of a document.Parameters
Parameters
Example
Example
Return Value
Return Value
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “Document not found”HTTPError 5xx
: Internal Server Error
Extract Properties
Extract properties from a document.Parameters
Parameters
Example
Example
Return Value
Return Value
A job status object containing:
exit_status
: The exit status of the job
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “DocSet not found”HTTPError 5xx
: Internal Server Error
Delete Properties
Delete properties from a document.Parameters
Parameters
Example
Example
Return Value
Return Value
A job status object
Exceptions
Exceptions
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 404
: “DocSet not found”HTTPError 5xx
: Internal Server Error