Documentation for how to call the Storage APIs using the Aryn SDK
Please find the documentation for how to call the Storage APIs using the Aryn SDK below. All parameters are optional unless specified otherwise.
Functions for managing document sets (DocSets) which are collections of documents.
Create a new DocSet to store documents.
Parameters
Example
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
Retrieve metadata for a DocSet.
Parameters
The unique identifier of the DocSet to retrieve
Example
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
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 ErrorList all DocSets in the account.
Parameters
Example
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
HTTPError 403
: “No Aryn API Key provided”HTTPError 403
: “Invalid Aryn API key”HTTPError 403
: “Expired Aryn API key”HTTPError 5xx
: Internal Server ErrorDelete a DocSet and all its documents.
Parameters
The unique identifier of the DocSet to delete
Example
Return Value
The metadata of the deleted DocSet
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 ErrorFunctions for managing individual documents within DocSets.
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
A file
opened in binary mode or a path specified as either a str
or PathLike
instance indicating the document to add. The path can either be a local path or an Amazon S3 url starting with s3://
. 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
Return Value
A DocumentMetadata
object containing
Account identifier
Document identifier
Document set identifier
Document name
Creation timestamp
Document size in bytes
MIME type of document
Custom document properties
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 ErrorList all documents in a DocSet.
Parameters
Example
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
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 ErrorGet a document by ID.
Parameters
Example
Return Value
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 ErrorDelete a document by ID.
Parameters
Example
Return Value
The metadata of the deleted document
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 ErrorGet the binary content of a document.
Parameters
Example
Return Value
The binary content of the document
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 ErrorFunctions for managing document properties.
Update properties of a document.
Parameters
Example
Return Value
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 ErrorExtract properties from a document.
Parameters
Example
Return Value
A job status object containing:
exit_status
: The exit status of the jobExceptions
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 ErrorDelete properties from a document.
Parameters
Example
Return Value
A job status object
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