Members | Descriptions |
| ​ |
Members | Descriptions |
| ​ |
​ |
Members | Descriptions |
| A client to invoke api methods from Lucidtech AI Services. |
| #### Parameters |
| #### Returns |
| #### Parameters |
| Creates a document handle, calls POST /documents endpoint |
| Creates a document handle, calls POST /documents endpoint |
| Creates a document handle, calls POST /documents endpoint |
| Creates a document handle, calls POST /documents endpoint |
| Run inference and create a prediction, calls the POST /predictions endpoint |
| Run inference and create a prediction, calls the POST /predictions endpoint |
| Create a prediction on a document documentPath by path using model modelName. This method takes care of creating and uploading a document as well as running inference using model to create prediction on the document. |
| Post feedback to the REST API, calls the POST /documents/{documentId} endpoint. Posting feedback means posting the ground truth data for the particular document. This enables the API to learn from past mistakes |
| Creates a batch handle, calls the POST /batches endpoint |
| Delete documents with this consent_id, calls the DELETE /consent/{consentId} endpoint. |
| Get information about user, calls the GET /users/{user_id} endpoint. |
public inline
Client
(
Credentials
credentials)
A client to invoke api methods from Lucidtech AI Services.
credentials
Credentials to use
See also: Credentials​
public inline JSONObject
getDocument
(String documentId)
documentId
The document id to run inference and create a prediction on
response from the API
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
listDocuments
()
All documents from REST API
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
listDocuments
(List< NameValuePair > options)
options
Available options are:
documents from REST API filtered using the passed options
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
createDocument
(InputStream content,ContentType contentType,String consentId,Map< String, Object > options)
Creates a document handle, calls POST /documents endpoint
See also: ContentType
content
Input stream
contentType
A mime type for the document handle
consentId
An identifier to mark the owner of the document handle
options
Additional options to include in request body
Response from API
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
createDocument
(InputStream content,ContentType contentType,String consentId)
Creates a document handle, calls POST /documents endpoint
See also: ContentType
content
Input stream
contentType
A mime type for the document handle
consentId
An identifier to mark the owner of the document handle
Response from API
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
createDocument
(byte[] content,ContentType contentType,String consentId,Map< String, Object > options)
Creates a document handle, calls POST /documents endpoint
See also: ContentType
content
Binary data
contentType
A mime type for the document handle
consentId
An identifier to mark the owner of the document handle
options
Additional options to include in request body
Response from API
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
createDocument
(byte[] content,ContentType contentType,String consentId)
Creates a document handle, calls POST /documents endpoint
See also: ContentType
content
Binary data
contentType
A mime type for the document handle
consentId
An identifier to mark the owner of the document handle
Response from API
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
createPrediction
(String documentId,String modelName)
Run inference and create a prediction, calls the POST /predictions endpoint
See also: Client::createDocument​
documentId
The document id to run inference and create a prediction. See createDocument for how to get documentId
modelName
The name of the model to use for inference
Prediction on document
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
createPrediction
(String documentId,String modelName,Map< String, Object > options)
Run inference and create a prediction, calls the POST /predictions endpoint
See also: Client::createDocument​
documentId
The document id to run inference and create a prediction. See createDocument for how to get documentId
modelName
The name of the model to use for inference
options
Available options are: maxPages - maximum number of pages to run predictions on autoRotate - whether or not to let the API try different rotations on
Prediction on document
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline Prediction
predict
(String documentPath,String modelName,String consentId)
Create a prediction on a document documentPath by path using model modelName. This method takes care of creating and uploading a document as well as running inference using model to create prediction on the document.
documentPath
Path to document to run inference on
modelName
The name of the model to use for inference
consentId
An identifier to mark the owner of the document handle
Prediction on document
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
updateDocument
(String documentId,JSONObject feedback)
Post feedback to the REST API, calls the POST /documents/{documentId} endpoint. Posting feedback means posting the ground truth data for the particular document. This enables the API to learn from past mistakes
See also: Client::createDocument​
documentId
The document id to post feedback to.
feedback
Feedback to post
Feedback response
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
createBatch
(String description)
Creates a batch handle, calls the POST /batches endpoint
description
Creates a batch handle, calls the POST /batches endpoint
Batch handle id and pre-signed upload url
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
deleteConsent
(String consentId)
Delete documents with this consent_id, calls the DELETE /consent/{consentId} endpoint.
See also: Client::createDocument​
consentId
Delete documents with this consentId
Feedback response
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
public inline JSONObject
getUser
(String userId)
Get information about user, calls the GET /users/{user_id} endpoint.
userId
The user_id to get consent hash for
User response
IOException
General IOException
APIException
Raised when API returns an erroneous status code
MissingAccessTokenException
Raised if access token cannot be obtained
Members | Descriptions |
| Used to fetch and store credentials. |
| #### Parameters |
| ​ |
| ​ |
public inline
Credentials
(String clientId,String clientSecret,String apiKey,String authEndpoint,String apiEndpoint)
Used to fetch and store credentials.
clientId
Client id
clientSecret
Client secret
apiKey
API key
authEndpoint
Auth endpoint
apiEndpoint
Domain endpoint of the api, e.g. https://{prefix}.api.lucidtech.ai/{version}​
MissingCredentialsException
Raised if some of credentials are missing
public inline String
getAccessToken
(HttpClient httpClient)
httpClient
Instance of HttpClient used to access the authentication endpoint
Access token, downloading it if necessary
MissingAccessTokenException
Raised if access token cannot be obtained
public inline String
getApiKey
()
public inline String
getApiEndpoint
()
Generated by Moxygen​