latest

Summary

Members

Descriptions

namespaceai::lucidtech::las::sdk

namespace ai::lucidtech::las::sdk

Summary

Members

Descriptions

class[ai::lucidtech::las::sdk::APIException]

class[ai::lucidtech::las::sdk::Client]

class[ai::lucidtech::las::sdk::CreateAppClientOptions]

class[ai::lucidtech::las::sdk::CreateAssetOptions]

class[ai::lucidtech::las::sdk::CreateBatchOptions]

class[ai::lucidtech::las::sdk::CreateDocumentOptions]

class[ai::lucidtech::las::sdk::CreateModelOptions]

class[ai::lucidtech::las::sdk::CreatePredictionOptions]

class[ai::lucidtech::las::sdk::CreateSecretOptions]

class[ai::lucidtech::las::sdk::CreateTransitionOptions]

class[ai::lucidtech::las::sdk::CreateUserOptions]

class[ai::lucidtech::las::sdk::CreateWorkflowOptions]

class[ai::lucidtech::las::sdk::Credentials]

class[ai::lucidtech::las::sdk::DeleteDocumentsOptions]

class[ai::lucidtech::las::sdk::DeleteResourcesOptions]

class[ai::lucidtech::las::sdk::DockerTransitionParameters]

class[ai::lucidtech::las::sdk::Field]

class[ai::lucidtech::las::sdk::FieldConfig]

class[ai::lucidtech::las::sdk::ListAppClientsOptions]

class[ai::lucidtech::las::sdk::ListAssetsOptions]

class[ai::lucidtech::las::sdk::ListBatchesOptions]

class[ai::lucidtech::las::sdk::ListDocumentsOptions]

class[ai::lucidtech::las::sdk::ListLogsOptions]

class[ai::lucidtech::las::sdk::ListModelsOptions]

class[ai::lucidtech::las::sdk::ListPredictionsOptions]

class[ai::lucidtech::las::sdk::ListResourcesOptions]

class[ai::lucidtech::las::sdk::ListSecretsOptions]

class[ai::lucidtech::las::sdk::ListSortablesOptions]

class[ai::lucidtech::las::sdk::ListTransitionExecutionsOptions]

class[ai::lucidtech::las::sdk::ListTransitionsOptions]

class[ai::lucidtech::las::sdk::ListUsersOptions]

class[ai::lucidtech::las::sdk::ListWorkflowExecutionsOptions]

class[ai::lucidtech::las::sdk::ListWorkflowsOptions]

class[ai::lucidtech::las::sdk::ManualTransitionParameters]

class[ai::lucidtech::las::sdk::MissingAccessTokenException]

class[ai::lucidtech::las::sdk::MissingCredentialsException]

class[ai::lucidtech::las::sdk::NameAndDescriptionOptions]

class[ai::lucidtech::las::sdk::NullableString]

class[ai::lucidtech::las::sdk::Options]

class[ai::lucidtech::las::sdk::PreprocessConfig]

class[ai::lucidtech::las::sdk::TransitionParameters]

class[ai::lucidtech::las::sdk::UpdateAppClientOptions]

class[ai::lucidtech::las::sdk::UpdateAssetOptions]

class[ai::lucidtech::las::sdk::UpdateBatchOptions]

class[ai::lucidtech::las::sdk::UpdateModelOptions]

class[ai::lucidtech::las::sdk::UpdateSecretOptions]

class[ai::lucidtech::las::sdk::UpdateTransitionExecutionOptions]

class[ai::lucidtech::las::sdk::UpdateTransitionOptions]

class[ai::lucidtech::las::sdk::UpdateUserOptions]

class[ai::lucidtech::las::sdk::UpdateWorkflowOptions]

class[ai::lucidtech::las::sdk::UserOptions]

class[ai::lucidtech::las::sdk::WorkflowCompletedConfig]

class[ai::lucidtech::las::sdk::WorkflowErrorConfig]

class ai::lucidtech::las::sdk::APIException

class ai::lucidtech::las::sdk::APIException
: public Exception

Summary

Members

Descriptions

public[APIException]()

public[APIException](String message)

public[APIException](int code,String message)

Members

public[APIException]()

public[APIException](String message)

public[APIException](int code,String message)

class ai::lucidtech::las::sdk::Client

Summary

Members

Descriptions

public[Client](Credentialscredentials)

A client to invoke api methods from Lucidtech AI Services.

public JSONObject[createAppClient](CreateAppClientOptionsoptions)

Create an app client, calls the POST /appClients endpoint.

public JSONObject[createAppClient]()

Create an app client, calls the POST /appClients endpoint.

public JSONObject[updateAppClient](String appClientId,UpdateAppClientOptionsoptions)

Update an appClient, calls the PATCH /appClients/{appClientId} endpoint.

public JSONObject[listAppClients](ListAppClientsOptionsoptions)

List appClients available, calls the GET /appClients endpoint.

public JSONObject[listAppClients]()

List appClients available, calls the GET /appClients endpoint.

public JSONObject[deleteAppClient](String appClientId)

Delete an appClient, calls the DELETE /appClients/{appClientId} endpoint.

public JSONObject[createAsset](byte[] content,CreateAssetOptionsoptions)

Create an asset, calls the POST /assets endpoint.

public JSONObject[createAsset](InputStream content,CreateAssetOptionsoptions)

Create an asset, calls the POST /assets endpoint.

public JSONObject[createAsset](byte[] content)

Create an asset, calls the POST /assets endpoint.

public JSONObject[createAsset](InputStream content)

Create an asset, calls the POST /assets endpoint.

public JSONObject[listAssets](ListAssetsOptionsoptions)

List assets available, calls the GET /assets endpoint.

public JSONObject[listAssets]()

List assets available, calls the GET /assets endpoint.

public JSONObject[getAsset](String assetId)

Get asset, calls the GET /assets/{assetId} endpoint.

public JSONObject[updateAsset](String assetId,UpdateAssetOptionsoptions)

Update an asset, calls the PATCH /assets/{assetId} endpoint.

public JSONObject[deleteAsset](String assetId)

Delete an asset, calls the DELETE /assets/{assetId} endpoint.

public JSONObject[createBatch](CreateBatchOptionsoptions)

Create a batch, calls the POST /batches endpoint.

public JSONObject[createBatch]()

Create a batch, calls the POST /batches endpoint.

public JSONObject[updateBatch](String batchId,UpdateBatchOptionsoptions)

Update a batch, calls the PATCH /batches/{batchId} endpoint.

public JSONObject[listBatches](ListBatchesOptionsoptions)

List batches available, calls the GET /batches endpoint.

public JSONObject[listBatches]()

List batches available, calls the GET /batches endpoint.

public JSONObject[deleteBatch](String batchId,boolean deleteDocuments)

Delete a batch, calls the DELETE /batches/{batchId} endpoint.

public JSONObject[deleteBatch](String batchId)

Delete a batch, calls the DELETE /batches/{batchId} endpoint.

public JSONObject[createDocument](byte[] content,ContentTypecontentType,CreateDocumentOptionsoptions)

Create a document, calls the POST /documents endpoint.

public JSONObject[createDocument](InputStream content,ContentTypecontentType,CreateDocumentOptionsoptions)

Create a document, calls the POST /documents endpoint.

public JSONObject[createDocument](InputStream content,ContentTypecontentType)

Create a document, calls the POST /documents endpoint.

public JSONObject[createDocument](byte[] content,ContentTypecontentType)

Create a document, calls the POST /documents endpoint.

public JSONObject[listDocuments](ListDocumentsOptionsoptions)

List documents, calls the GET /documents endpoint.

public JSONObject[listDocuments]()

List documents, calls the GET /documents endpoint.

public JSONObject[deleteDocuments](DeleteDocumentsOptionsoptions)

Delete documents, calls the DELETE /documents endpoint.

public JSONObject[deleteDocuments]()

Delete documents, calls the DELETE /documents endpoint.

public JSONObject[getDocument](String documentId)

Get document, calls the GET /documents/{documentId} endpoint.

public JSONObject[updateDocument](String documentId,JSONArray groundTruth)

Update document, calls the PATCH /documents/{documentId} endpoint.

public JSONObject[getLog](String logId)

Get log, calls the GET /logs/{logId} endpoint.

public JSONObject[listLogs](ListLogsOptionsoptions)

List logs, calls the GET /logs endpoint.

public JSONObject[listLogs]()

List logs, calls the GET /logs endpoint.

public JSONObject[createModel](int width,int height,FieldConfigfieldConfig,CreateModelOptionsoptions)

Create a model, calls the POST /models endpoint.

public JSONObject[createModel](int width,int height,FieldConfigfieldConfig)

Create a model, calls the POST /models endpoint.

public JSONObject[updateModel](String modelId,UpdateModelOptionsoptions)

Updates a model, calls the PATCH /models/{modelId} endpoint.

public JSONObject[getModel](String modelId)

Get model, calls the GET /models/{modelId} endpoint.

public JSONObject[listModels](ListModelsOptionsoptions)

List models, calls the GET /models endpoint.

public JSONObject[listModels]()

List models available, calls the GET /models endpoint.

public JSONObject[createPrediction](String documentId,String modelId,CreatePredictionOptionsoptions)

Create a prediction on a document using specified model, calls the POST /predictions endpoint.

public JSONObject[createPrediction](String documentId,String modelId)

Create a prediction on a document using specified model, calls the POST /predictions endpoint.

public JSONObject[listPredictions](ListPredictionsOptionsoptions)

List predictions available, calls the GET /predictions endpoint.

public JSONObject[listPredictions]()

List predictions available, calls the GET /predictions endpoint.

public JSONObject[createSecret](JSONObject data,CreateSecretOptionsoptions)

Create secret, calls the POST /secrets endpoint.

public JSONObject[createSecret](Map< String, String > data,CreateSecretOptionsoptions)

Create a secret, calls the POST /secrets endpoint.

public JSONObject[createSecret](Map< String, String > data)

Create a secret, calls the POST /secrets endpoint.

public JSONObject[createSecret](JSONObject data)

Create a secret, calls the POST /secrets endpoint.

public JSONObject[listSecrets](ListSecretsOptionsoptions)

List secrets, calls the GET /secrets endpoint.

public JSONObject[listSecrets]()

List secrets, calls the GET /secrets endpoint.

public JSONObject[updateSecret](String secretId,UpdateSecretOptionsoptions)

Update a secret, calls the PATCH /secrets/{secretId} endpoint.

public JSONObject[deleteSecret](String secretId)

Delete a secret, calls the DELETE /secrets/{secretId} endpoint.

public JSONObject[createTransition](TransitionTypetransitionType,CreateTransitionOptionsoptions)

Create a transition, calls the POST /transitions endpoint.

public JSONObject[createTransition](TransitionTypetransitionType)

Create a transition, calls the POST /transitions endpoint.

public JSONObject[listTransitions](ListTransitionsOptionsoptions)

List transitions, calls the GET /transitions endpoint.

public JSONObject[listTransitions]()

List transitions, calls the GET /transitions endpoint.

public JSONObject[getTransition](String transitionId)

Get transition, calls the GET /transitions/{transitionId} endpoint.

public JSONObject[updateTransition](String transitionId,UpdateTransitionOptionsoptions)

Updates a transition, calls the PATCH /transitions/{transitionId} endpoint.

public JSONObject[executeTransition](String transitionId)

Start executing a manual transition, calls the POST /transitions/{transitionId}/executions endpoint.

public JSONObject[deleteTransition](String transitionId)

Delete a transition, calls the DELETE /transitions/{transitionId} endpoint. Will fail if transition is in use by one or more workflows.

public JSONObject[listTransitionExecutions](String transitionId,ListTransitionExecutionsOptionsoptions)

List executions in a transition, calls the GET /transitions/{transitionId}/executions endpoint.

public JSONObject[listTransitionExecutions](String transitionId)

List executions in a transition, calls the GET /transitions/{transitionId}/executions endpoint.

public JSONObject[getTransitionExecution](String transitionId,String executionId)

Get an execution of a transition, calls the GET /transitions/{transitionId}/executions/{executionId} endpoint

public JSONObject[updateTransitionExecution](String transitionId,String executionId,TransitionExecutionStatusstatus,UpdateTransitionExecutionOptionsoptions)

Ends the processing of the transition execution, calls the PATCH /transitions/{transitionId}/executions/{executionId} endpoint.

public JSONObject[sendHeartbeat](String transitionId,String executionId)

Send heartbeat for a manual execution to signal that we are still working on it. Must be done at minimum once every 60 seconds or the transition execution will time out, calls the POST /transitions/{transitionId}/executions/{executionId}/heartbeats endpoint.

public JSONObject[createUser](String email,CreateUserOptionsoptions)

Create a user, calls the POST /users endpoint.

public JSONObject[createUser](String email)

Create a user, calls the POST /users endpoint.

public JSONObject[listUsers](ListUsersOptionsoptions)

List users, calls the GET /users endpoint.

public JSONObject[listUsers]()

List users, calls the GET /users endpoint.

public JSONObject[getUser](String userId)

Get user, calls the GET /users/{userId} endpoint.

public JSONObject[updateUser](String userId,UpdateUserOptionsoptions)

Updates a user, calls the PATCH /users/{userId} endpoint.

public JSONObject[deleteUser](String userId)

Delete a user, calls the PATCH /users/{userId} endpoint.

public JSONObject[createWorkflow](JSONObject specification,CreateWorkflowOptionsoptions)

Creates a new workflow, calls the POST /workflows endpoint. Check out Lucidtech's tutorials for more info on how to create a workflow. see https://docs.lucidtech.ai/getting-started/tutorials/setup_predict_and_approve

public JSONObject[createWorkflow](JSONObject specification)

Creates a new workflow, calls the POST /workflows endpoint. Check out Lucidtech's tutorials for more info on how to create a workflow. see https://docs.lucidtech.ai/getting-started/tutorials/setup_predict_and_approve

public JSONObject[listWorkflows](ListWorkflowsOptionsoptions)

List workflows, calls the GET /workflows endpoint.

public JSONObject[listWorkflows]()

List workflows, calls the GET /workflows endpoint.

public JSONObject[getWorkflow](String workflowId)

Get workflow, calls the GET /workflows/{workflowId} endpoint.

public JSONObject[updateWorkflow](String workflowId,UpdateWorkflowOptionsoptions)

Update a workflow, calls the PATCH /workflows/{workflowId} endpoint.

public JSONObject[deleteWorkflow](String workflowId)

Delete a workflow, calls the DELETE /workflows/{workflowId} endpoint.

public JSONObject[executeWorkflow](String workflowId,JSONObject content)

Start a workflow execution, calls the POST /workflows/{workflowId}/executions endpoint.

public JSONObject[listWorkflowExecutions](String workflowId,ListWorkflowExecutionsOptionsoptions)

List executions in a workflow, calls the GET /workflows/{workflowId}/executions endpoint.

public JSONObject[listWorkflowExecutions](String workflowId)

List executions in a workflow, calls the GET /workflows/{workflowId}/executions endpoint.

public JSONObject[deleteWorkflowExecution](String workflowId,String executionId)

Delete execution from workflow, calls the DELETE /workflows/{workflowId}/executions/{executionId} endpoint.

Members

public[Client](Credentialscredentials)

A client to invoke api methods from Lucidtech AI Services.

Parameters

  • credentials [Credentials] to use

See also: [Credentials]

public JSONObject[createAppClient](CreateAppClientOptionsoptions)

Create an app client, calls the POST /appClients endpoint.

See also: [CreateAppClientOptions]

Parameters

  • options Additional options to include in request body

Returns

Asset response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createAppClient]()

Create an app client, calls the POST /appClients endpoint.

Returns

Asset response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateAppClient](String appClientId,UpdateAppClientOptionsoptions)

Update an appClient, calls the PATCH /appClients/{appClientId} endpoint.

See also: [UpdateAppClientOptions]

Parameters

  • appClientId Id of the appClient

  • options Additional options to include in request body

Returns

AppClient response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listAppClients](ListAppClientsOptionsoptions)

List appClients available, calls the GET /appClients endpoint.

See also: [ListAppClientsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

AppClients response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listAppClients]()

List appClients available, calls the GET /appClients endpoint.

Returns

AppClients response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteAppClient](String appClientId)

Delete an appClient, calls the DELETE /appClients/{appClientId} endpoint.

Parameters

  • appClientId Id of the appClient

Returns

AppClient response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createAsset](byte[] content,CreateAssetOptionsoptions)

Create an asset, calls the POST /assets endpoint.

See also: [CreateAssetOptions]

Parameters

  • content Binary data

  • options Additional options to include in request body

Returns

Asset response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createAsset](InputStream content,CreateAssetOptionsoptions)

Create an asset, calls the POST /assets endpoint.

See also: [CreateAssetOptions]

Parameters

  • content Data from input stream

  • options Additional options to include in request body

Returns

Asset response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createAsset](byte[] content)

Create an asset, calls the POST /assets endpoint.

Parameters

  • content Binary data

Returns

Asset response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createAsset](InputStream content)

Create an asset, calls the POST /assets endpoint.

Parameters

  • content Data from input stream

Returns

Asset response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listAssets](ListAssetsOptionsoptions)

List assets available, calls the GET /assets endpoint.

See also: [ListAssetsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Assets response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listAssets]()

List assets available, calls the GET /assets endpoint.

Returns

Assets response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[getAsset](String assetId)

Get asset, calls the GET /assets/{assetId} endpoint.

Parameters

  • assetId Id of the asset

Returns

Asset response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateAsset](String assetId,UpdateAssetOptionsoptions)

Update an asset, calls the PATCH /assets/{assetId} endpoint.

See also: [UpdateAssetOptions]

Parameters

  • assetId Id of the asset

  • options Additional options to include in request body

Returns

Asset response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteAsset](String assetId)

Delete an asset, calls the DELETE /assets/{assetId} endpoint.

Parameters

  • assetId Id of the asset

Returns

Asset response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createBatch](CreateBatchOptionsoptions)

Create a batch, calls the POST /batches endpoint.

See also: [CreateBatchOptions]

Parameters

  • options Additional options to include in request body

Returns

Batch response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createBatch]()

Create a batch, calls the POST /batches endpoint.

Returns

Batch response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateBatch](String batchId,UpdateBatchOptionsoptions)

Update a batch, calls the PATCH /batches/{batchId} endpoint.

See also: [UpdateBatchOptions]

Parameters

  • batchId Id of the batch

  • options Additional options to include in request body

Returns

Batch response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listBatches](ListBatchesOptionsoptions)

List batches available, calls the GET /batches endpoint.

See also: [ListBatchesOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Batches response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listBatches]()

List batches available, calls the GET /batches endpoint.

Returns

Batches response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteBatch](String batchId,boolean deleteDocuments)

Delete a batch, calls the DELETE /batches/{batchId} endpoint.

Parameters

  • batchId Id of the batch

  • deleteDocuments Set to true to delete documents in batch before deleting batch

Returns

Batch response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteBatch](String batchId)

Delete a batch, calls the DELETE /batches/{batchId} endpoint.

Parameters

  • batchId Id of the batch

Returns

Batch response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createDocument](byte[] content,ContentTypecontentType,CreateDocumentOptionsoptions)

Create a document, calls the POST /documents endpoint.

See also: [CreateDocumentOptions]

Parameters

  • content Binary data

  • contentType A mime type for the document

  • options Additional options to include in request body

Returns

Document response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createDocument](InputStream content,ContentTypecontentType,CreateDocumentOptionsoptions)

Create a document, calls the POST /documents endpoint.

See also: [CreateDocumentOptions]

Parameters

  • content Data from input stream

  • contentType A mime type for the document

  • options Additional options to include in request body

Returns

Document response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createDocument](InputStream content,ContentTypecontentType)

Create a document, calls the POST /documents endpoint.

See also: [CreateDocumentOptions]

Parameters

  • content Data from input stream

  • contentType A mime type for the document

Returns

Document response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createDocument](byte[] content,ContentTypecontentType)

Create a document, calls the POST /documents endpoint.

See also: [CreateDocumentOptions]

Parameters

  • content Binary data

  • contentType A mime type for the document

Returns

Document response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listDocuments](ListDocumentsOptionsoptions)

List documents, calls the GET /documents endpoint.

See also: [ListDocumentsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Documents response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listDocuments]()

List documents, calls the GET /documents endpoint.

Returns

Documents response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteDocuments](DeleteDocumentsOptionsoptions)

Delete documents, calls the DELETE /documents endpoint.

See also: [DeleteDocumentsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Documents response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteDocuments]()

Delete documents, calls the DELETE /documents endpoint.

See also: [Client::createDocument]

Returns

Documents response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[getDocument](String documentId)

Get document, calls the GET /documents/{documentId} endpoint.

Parameters

  • documentId Id of the document

Returns

Document response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateDocument](String documentId,JSONArray groundTruth)

Update document, calls the PATCH /documents/{documentId} endpoint.

See also: [Client::createDocument]

Parameters

  • documentId The document id to post groundTruth to.

  • groundTruth List of json objects containing label and value for the ground truth

Returns

Document response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[getLog](String logId)

Get log, calls the GET /logs/{logId} endpoint.

Parameters

  • logId Id of the log

Returns

Log response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listLogs](ListLogsOptionsoptions)

List logs, calls the GET /logs endpoint.

See also: [ListLogsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Logs response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listLogs]()

List logs, calls the GET /logs endpoint.

Returns

Logs response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createModel](int width,int height,FieldConfigfieldConfig,CreateModelOptionsoptions)

Create a model, calls the POST /models endpoint.

See also: [CreateModelOptions]

See also: [FieldConfig]

Parameters

  • width The number of pixels to be used for the input image width of your model

  • height The number of pixels to be used for the input image height of your model

  • fieldConfig Specification of the fields that the model is going to predict

  • options Additional options to include in request body

Returns

Model response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createModel](int width,int height,FieldConfigfieldConfig)

Create a model, calls the POST /models endpoint.

See also: [FieldConfig]

Parameters

  • width The number of pixels to be used for the input image width of your model

  • height The number of pixels to be used for the input image height of your model

  • fieldConfig Specification of the fields that the model is going to predict

Returns

Model response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateModel](String modelId,UpdateModelOptionsoptions)

Updates a model, calls the PATCH /models/{modelId} endpoint.

See also: [UpdateModelOptions]

Parameters

  • modelId Id of the model

  • options Additional options to include in request body

Returns

Model response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[getModel](String modelId)

Get model, calls the GET /models/{modelId} endpoint.

Parameters

  • modelId Id of the model

Returns

Model response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listModels](ListModelsOptionsoptions)

List models, calls the GET /models endpoint.

See also: [ListModelsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Models response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listModels]()

List models available, calls the GET /models endpoint.

Returns

Models response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createPrediction](String documentId,String modelId,CreatePredictionOptionsoptions)

Create a prediction on a document using specified model, calls the POST /predictions endpoint.

See also: [Client::createDocument]

See also: [CreatePredictionOptions]

Parameters

  • documentId The document id to run inference and create a prediction on.

  • modelId The id of the model to use for inference

  • options Additional options to include in request body

Returns

Prediction response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createPrediction](String documentId,String modelId)

Create a prediction on a document using specified model, calls the POST /predictions endpoint.

See also: [Client::createDocument]

Parameters

  • documentId The document id to run inference and create a prediction on.

  • modelId The id of the model to use for inference

Returns

Prediction response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listPredictions](ListPredictionsOptionsoptions)

List predictions available, calls the GET /predictions endpoint.

See also: [ListPredictionsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Predictions response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listPredictions]()

List predictions available, calls the GET /predictions endpoint.

Returns

Predictions response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createSecret](JSONObject data,CreateSecretOptionsoptions)

Create secret, calls the POST /secrets endpoint.

See also: [CreateSecretOptions]

Parameters

  • data Key-Value pairs to store secretly

  • options Additional options to include in request body

Returns

Secret response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createSecret](Map< String, String > data,CreateSecretOptionsoptions)

Create a secret, calls the POST /secrets endpoint.

See also: [CreateSecretOptions]

Parameters

  • data Key-Value pairs to store secretly

  • options Additional options to include in request body

Returns

Secret response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createSecret](Map< String, String > data)

Create a secret, calls the POST /secrets endpoint.

Parameters

  • data Key-Value pairs to store secretly

Returns

Secret response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createSecret](JSONObject data)

Create a secret, calls the POST /secrets endpoint.

Parameters

  • data Key-Value pairs to store secretly

Returns

Secret response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listSecrets](ListSecretsOptionsoptions)

List secrets, calls the GET /secrets endpoint.

See also: [ListSecretsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Secrets response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listSecrets]()

List secrets, calls the GET /secrets endpoint.

Returns

Secrets response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateSecret](String secretId,UpdateSecretOptionsoptions)

Update a secret, calls the PATCH /secrets/{secretId} endpoint.

See also: [UpdateSecretOptions]

Parameters

  • secretId Id of the secret

  • options Additional options to include in request body

Returns

Secret response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteSecret](String secretId)

Delete a secret, calls the DELETE /secrets/{secretId} endpoint.

Parameters

  • secretId Id of the secret

Returns

Secret response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createTransition](TransitionTypetransitionType,CreateTransitionOptionsoptions)

Create a transition, calls the POST /transitions endpoint.

See also: [CreateTransitionOptions]

See also: TransitionType

Parameters

  • transitionType Type of transition

  • options Additional options to include in request body

Returns

Transition response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createTransition](TransitionTypetransitionType)

Create a transition, calls the POST /transitions endpoint.

See also: TransitionType

Parameters

  • transitionType Type of transition

Returns

Transition response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listTransitions](ListTransitionsOptionsoptions)

List transitions, calls the GET /transitions endpoint.

See also: [ListTransitionsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Transitions response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listTransitions]()

List transitions, calls the GET /transitions endpoint.

Returns

Transitions response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[getTransition](String transitionId)

Get transition, calls the GET /transitions/{transitionId} endpoint.

Parameters

  • transitionId Id of the transition

Returns

Transition response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateTransition](String transitionId,UpdateTransitionOptionsoptions)

Updates a transition, calls the PATCH /transitions/{transitionId} endpoint.

See also: [UpdateTransitionOptions]

Parameters

  • transitionId Id of the transition

  • options Additional options to include in request body

Returns

Transition response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[executeTransition](String transitionId)

Start executing a manual transition, calls the POST /transitions/{transitionId}/executions endpoint.

Parameters

  • transitionId Id of the transition

Returns

TransitionExecution response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteTransition](String transitionId)

Delete a transition, calls the DELETE /transitions/{transitionId} endpoint. Will fail if transition is in use by one or more workflows.

Parameters

  • transitionId Id of the transition

Returns

Transition response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listTransitionExecutions](String transitionId,ListTransitionExecutionsOptionsoptions)

List executions in a transition, calls the GET /transitions/{transitionId}/executions endpoint.

See also: [ListTransitionExecutionsOptions]

Parameters

  • transitionId Id of the transition

  • options Additional options to pass along as query parameters

Returns

Transition executions response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listTransitionExecutions](String transitionId)

List executions in a transition, calls the GET /transitions/{transitionId}/executions endpoint.

Parameters

  • transitionId Id of the transition

Returns

Transition executions response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[getTransitionExecution](String transitionId,String executionId)

Get an execution of a transition, calls the GET /transitions/{transitionId}/executions/{executionId} endpoint

Parameters

  • transitionId Id of the transition

  • executionId Id of the execution

Returns

TransitionExecution response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateTransitionExecution](String transitionId,String executionId,TransitionExecutionStatusstatus,UpdateTransitionExecutionOptionsoptions)

Ends the processing of the transition execution, calls the PATCH /transitions/{transitionId}/executions/{executionId} endpoint.

See also: [UpdateTransitionExecutionOptions]

See also: TransitionExecutionStatus

Parameters

  • transitionId Id of the transition

  • executionId Id of the execution

  • status Status of the execution

  • options Additional options to include in request body

Returns

Transition response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[sendHeartbeat](String transitionId,String executionId)

Send heartbeat for a manual execution to signal that we are still working on it. Must be done at minimum once every 60 seconds or the transition execution will time out, calls the POST /transitions/{transitionId}/executions/{executionId}/heartbeats endpoint.

Parameters

  • transitionId Id of the transition

  • executionId Id of the execution

Returns

Empty response

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createUser](String email,CreateUserOptionsoptions)

Create a user, calls the POST /users endpoint.

See also: [CreateUserOptions]

Parameters

  • email Email of the new user

  • options Additional options to include in request body

Returns

User response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createUser](String email)

Create a user, calls the POST /users endpoint.

Parameters

  • email Email to the new user

Returns

User response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listUsers](ListUsersOptionsoptions)

List users, calls the GET /users endpoint.

See also: [ListUsersOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Users response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listUsers]()

List users, calls the GET /users endpoint.

Returns

Users response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[getUser](String userId)

Get user, calls the GET /users/{userId} endpoint.

Parameters

  • userId Id of user

Returns

User response

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateUser](String userId,UpdateUserOptionsoptions)

Updates a user, calls the PATCH /users/{userId} endpoint.

See also: [UpdateUserOptions]

Parameters

  • userId Id of user

  • options Additional options to include in request body

Returns

User response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteUser](String userId)

Delete a user, calls the PATCH /users/{userId} endpoint.

Parameters

  • userId Id of user

Returns

User response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createWorkflow](JSONObject specification,CreateWorkflowOptionsoptions)

Creates a new workflow, calls the POST /workflows endpoint. Check out Lucidtech's tutorials for more info on how to create a workflow. see https://docs.lucidtech.ai/getting-started/tutorials/setup_predict_and_approve

See also: [CreateWorkflowOptions]

Parameters

Returns

Workflow response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[createWorkflow](JSONObject specification)

Creates a new workflow, calls the POST /workflows endpoint. Check out Lucidtech's tutorials for more info on how to create a workflow. see https://docs.lucidtech.ai/getting-started/tutorials/setup_predict_and_approve

Parameters

Returns

Workflow response from API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listWorkflows](ListWorkflowsOptionsoptions)

List workflows, calls the GET /workflows endpoint.

See also: [ListWorkflowsOptions]

Parameters

  • options Additional options to pass along as query parameters

Returns

Workflows response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[listWorkflows]()

List workflows, calls the GET /workflows endpoint.

Returns

Workflows response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[getWorkflow](String workflowId)

Get workflow, calls the GET /workflows/{workflowId} endpoint.

Parameters

  • workflowId Id of the workflow

Returns

Workflow response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[updateWorkflow](String workflowId,UpdateWorkflowOptionsoptions)

Update a workflow, calls the PATCH /workflows/{workflowId} endpoint.

See also: [UpdateWorkflowOptions]

Parameters

  • workflowId Id of the workflow

  • options Additional options to include in request body

Returns

Workflow response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[deleteWorkflow](String workflowId)

Delete a workflow, calls the DELETE /workflows/{workflowId} endpoint.

See also: [Client::createWorkflow]

Parameters

  • workflowId Id of the workflow

Returns

Workflow response from REST API

Exceptions

  • IOException General IOException

  • [APIException] Raised when API returns an erroneous status code

  • [MissingAccessTokenException] Raised if access token cannot be obtained

public JSONObject[executeWorkflow](String workflowId,JSONObject content)