public class Client
extends java.lang.Object
| Constructor and Description |
|---|
Client(Credentials credentials)
A client to invoke api methods from Lucidtech AI Services.
|
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONObject |
createAppClient()
Create an app client, calls the POST /appClients endpoint.
|
org.json.JSONObject |
createAppClient(CreateAppClientOptions options)
Create an app client, calls the POST /appClients endpoint.
|
org.json.JSONObject |
createAsset(byte[] content)
Create an asset, calls the POST /assets endpoint.
|
org.json.JSONObject |
createAsset(byte[] content,
CreateAssetOptions options)
Create an asset, calls the POST /assets endpoint.
|
org.json.JSONObject |
createAsset(java.io.InputStream content)
Create an asset, calls the POST /assets endpoint.
|
org.json.JSONObject |
createAsset(java.io.InputStream content,
CreateAssetOptions options)
Create an asset, calls the POST /assets endpoint.
|
org.json.JSONObject |
createBatch()
Create a batch, calls the POST /batches endpoint.
|
org.json.JSONObject |
createBatch(CreateBatchOptions options)
Create a batch, calls the POST /batches endpoint.
|
org.json.JSONObject |
createDocument(byte[] content,
ContentType contentType)
Create a document, calls the POST /documents endpoint.
|
org.json.JSONObject |
createDocument(byte[] content,
ContentType contentType,
CreateDocumentOptions options)
Create a document, calls the POST /documents endpoint.
|
org.json.JSONObject |
createDocument(java.io.InputStream content,
ContentType contentType)
Create a document, calls the POST /documents endpoint.
|
org.json.JSONObject |
createDocument(java.io.InputStream content,
ContentType contentType,
CreateDocumentOptions options)
Create a document, calls the POST /documents endpoint.
|
org.json.JSONObject |
createModel(int width,
int height,
FieldConfig fieldConfig)
Create a model, calls the POST /models endpoint.
|
org.json.JSONObject |
createModel(int width,
int height,
FieldConfig fieldConfig,
CreateModelOptions options)
Create a model, calls the POST /models endpoint.
|
org.json.JSONObject |
createPrediction(java.lang.String documentId,
java.lang.String modelId)
Create a prediction on a document using specified model, calls the POST /predictions endpoint.
|
org.json.JSONObject |
createPrediction(java.lang.String documentId,
java.lang.String modelId,
CreatePredictionOptions options)
Create a prediction on a document using specified model, calls the POST /predictions endpoint.
|
org.json.JSONObject |
createSecret(org.json.JSONObject data)
Create a secret, calls the POST /secrets endpoint.
|
org.json.JSONObject |
createSecret(org.json.JSONObject data,
CreateSecretOptions options)
Create secret, calls the POST /secrets endpoint.
|
org.json.JSONObject |
createSecret(java.util.Map<java.lang.String,java.lang.String> data)
Create a secret, calls the POST /secrets endpoint.
|
org.json.JSONObject |
createSecret(java.util.Map<java.lang.String,java.lang.String> data,
CreateSecretOptions options)
Create a secret, calls the POST /secrets endpoint.
|
org.json.JSONObject |
createTransition(TransitionType transitionType)
Create a transition, calls the POST /transitions endpoint.
|
org.json.JSONObject |
createTransition(TransitionType transitionType,
CreateTransitionOptions options)
Create a transition, calls the POST /transitions endpoint.
|
org.json.JSONObject |
createUser(java.lang.String email)
Create a user, calls the POST /users endpoint.
|
org.json.JSONObject |
createUser(java.lang.String email,
CreateUserOptions options)
Create a user, calls the POST /users endpoint.
|
org.json.JSONObject |
createWorkflow(org.json.JSONObject specification)
Creates a new workflow, calls the POST /workflows endpoint.
|
org.json.JSONObject |
createWorkflow(org.json.JSONObject specification,
CreateWorkflowOptions options)
Creates a new workflow, calls the POST /workflows endpoint.
|
org.json.JSONObject |
deleteAppClient(java.lang.String appClientId)
Delete an appClient, calls the DELETE /appClients/{appClientId} endpoint.
|
org.json.JSONObject |
deleteAsset(java.lang.String assetId)
Delete an asset, calls the DELETE /assets/{assetId} endpoint.
|
org.json.JSONObject |
deleteBatch(java.lang.String batchId)
Delete a batch, calls the DELETE /batches/{batchId} endpoint.
|
org.json.JSONObject |
deleteBatch(java.lang.String batchId,
boolean deleteDocuments)
Delete a batch, calls the DELETE /batches/{batchId} endpoint.
|
org.json.JSONObject |
deleteDocuments()
Delete documents, calls the DELETE /documents endpoint.
|
org.json.JSONObject |
deleteDocuments(DeleteDocumentsOptions options)
Delete documents, calls the DELETE /documents endpoint.
|
org.json.JSONObject |
deleteSecret(java.lang.String secretId)
Delete a secret, calls the DELETE /secrets/{secretId} endpoint.
|
org.json.JSONObject |
deleteTransition(java.lang.String transitionId)
Delete a transition, calls the DELETE /transitions/{transitionId} endpoint.
|
org.json.JSONObject |
deleteUser(java.lang.String userId)
Delete a user, calls the PATCH /users/{userId} endpoint.
|
org.json.JSONObject |
deleteWorkflow(java.lang.String workflowId)
Delete a workflow, calls the DELETE /workflows/{workflowId} endpoint.
|
org.json.JSONObject |
deleteWorkflowExecution(java.lang.String workflowId,
java.lang.String executionId)
Delete execution from workflow,
calls the DELETE /workflows/{workflowId}/executions/{executionId} endpoint.
|
org.json.JSONObject |
executeTransition(java.lang.String transitionId)
Start executing a manual transition, calls the POST /transitions/{transitionId}/executions endpoint.
|
org.json.JSONObject |
executeWorkflow(java.lang.String workflowId,
org.json.JSONObject content)
Start a workflow execution, calls the POST /workflows/{workflowId}/executions endpoint.
|
org.json.JSONObject |
getAsset(java.lang.String assetId)
Get asset, calls the GET /assets/{assetId} endpoint.
|
org.json.JSONObject |
getDocument(java.lang.String documentId)
Get document, calls the GET /documents/{documentId} endpoint.
|
org.json.JSONObject |
getLog(java.lang.String logId)
Get log, calls the GET /logs/{logId} endpoint.
|
org.json.JSONObject |
getModel(java.lang.String modelId)
Get model, calls the GET /models/{modelId} endpoint.
|
org.json.JSONObject |
getTransition(java.lang.String transitionId)
Get transition, calls the GET /transitions/{transitionId} endpoint.
|
org.json.JSONObject |
getTransitionExecution(java.lang.String transitionId,
java.lang.String executionId)
Get an execution of a transition, calls the GET /transitions/{transitionId}/executions/{executionId} endpoint
|
org.json.JSONObject |
getUser(java.lang.String userId)
Get user, calls the GET /users/{userId} endpoint.
|
org.json.JSONObject |
getWorkflow(java.lang.String workflowId)
Get workflow, calls the GET /workflows/{workflowId} endpoint.
|
org.json.JSONObject |
listAppClients()
List appClients available, calls the GET /appClients endpoint.
|
org.json.JSONObject |
listAppClients(ListAppClientsOptions options)
List appClients available, calls the GET /appClients endpoint.
|
org.json.JSONObject |
listAssets()
List assets available, calls the GET /assets endpoint.
|
org.json.JSONObject |
listAssets(ListAssetsOptions options)
List assets available, calls the GET /assets endpoint.
|
org.json.JSONObject |
listBatches()
List batches available, calls the GET /batches endpoint.
|
org.json.JSONObject |
listBatches(ListBatchesOptions options)
List batches available, calls the GET /batches endpoint.
|
org.json.JSONObject |
listDocuments()
List documents, calls the GET /documents endpoint.
|
org.json.JSONObject |
listDocuments(ListDocumentsOptions options)
List documents, calls the GET /documents endpoint.
|
org.json.JSONObject |
listLogs()
List logs, calls the GET /logs endpoint.
|
org.json.JSONObject |
listLogs(ListLogsOptions options)
List logs, calls the GET /logs endpoint.
|
org.json.JSONObject |
listModels()
List models available, calls the GET /models endpoint.
|
org.json.JSONObject |
listModels(ListModelsOptions options)
List models, calls the GET /models endpoint.
|
org.json.JSONObject |
listPredictions()
List predictions available, calls the GET /predictions endpoint.
|
org.json.JSONObject |
listPredictions(ListPredictionsOptions options)
List predictions available, calls the GET /predictions endpoint.
|
org.json.JSONObject |
listSecrets()
List secrets, calls the GET /secrets endpoint.
|
org.json.JSONObject |
listSecrets(ListSecretsOptions options)
List secrets, calls the GET /secrets endpoint.
|
org.json.JSONObject |
listTransitionExecutions(java.lang.String transitionId)
List executions in a transition, calls the GET /transitions/{transitionId}/executions endpoint.
|
org.json.JSONObject |
listTransitionExecutions(java.lang.String transitionId,
ListTransitionExecutionsOptions options)
List executions in a transition, calls the GET /transitions/{transitionId}/executions endpoint.
|
org.json.JSONObject |
listTransitions()
List transitions, calls the GET /transitions endpoint.
|
org.json.JSONObject |
listTransitions(ListTransitionsOptions options)
List transitions, calls the GET /transitions endpoint.
|
org.json.JSONObject |
listUsers()
List users, calls the GET /users endpoint.
|
org.json.JSONObject |
listUsers(ListUsersOptions options)
List users, calls the GET /users endpoint.
|
org.json.JSONObject |
listWorkflowExecutions(java.lang.String workflowId)
List executions in a workflow, calls the GET /workflows/{workflowId}/executions endpoint.
|
org.json.JSONObject |
listWorkflowExecutions(java.lang.String workflowId,
ListWorkflowExecutionsOptions options)
List executions in a workflow, calls the GET /workflows/{workflowId}/executions endpoint.
|
org.json.JSONObject |
listWorkflows()
List workflows, calls the GET /workflows endpoint.
|
org.json.JSONObject |
listWorkflows(ListWorkflowsOptions options)
List workflows, calls the GET /workflows endpoint.
|
org.json.JSONObject |
sendHeartbeat(java.lang.String transitionId,
java.lang.String executionId)
Send heartbeat for a manual execution to signal that we are still working on it.
|
org.json.JSONObject |
updateAppClient(java.lang.String appClientId,
UpdateAppClientOptions options)
Update an appClient, calls the PATCH /appClients/{appClientId} endpoint.
|
org.json.JSONObject |
updateAsset(java.lang.String assetId,
UpdateAssetOptions options)
Update an asset, calls the PATCH /assets/{assetId} endpoint.
|
org.json.JSONObject |
updateBatch(java.lang.String batchId,
UpdateBatchOptions options)
Update a batch, calls the PATCH /batches/{batchId} endpoint.
|
org.json.JSONObject |
updateDocument(java.lang.String documentId,
org.json.JSONArray groundTruth)
Update document, calls the PATCH /documents/{documentId} endpoint.
|
org.json.JSONObject |
updateModel(java.lang.String modelId,
UpdateModelOptions options)
Updates a model, calls the PATCH /models/{modelId} endpoint.
|
org.json.JSONObject |
updateSecret(java.lang.String secretId,
UpdateSecretOptions options)
Update a secret, calls the PATCH /secrets/{secretId} endpoint.
|
org.json.JSONObject |
updateTransition(java.lang.String transitionId,
UpdateTransitionOptions options)
Updates a transition, calls the PATCH /transitions/{transitionId} endpoint.
|
org.json.JSONObject |
updateTransitionExecution(java.lang.String transitionId,
java.lang.String executionId,
TransitionExecutionStatus status,
UpdateTransitionExecutionOptions options)
Ends the processing of the transition execution,
calls the PATCH /transitions/{transitionId}/executions/{executionId} endpoint.
|
org.json.JSONObject |
updateUser(java.lang.String userId,
UpdateUserOptions options)
Updates a user, calls the PATCH /users/{userId} endpoint.
|
org.json.JSONObject |
updateWorkflow(java.lang.String workflowId,
UpdateWorkflowOptions options)
Update a workflow, calls the PATCH /workflows/{workflowId} endpoint.
|
public Client(Credentials credentials)
credentials - Credentials to useCredentialspublic org.json.JSONObject createAppClient(CreateAppClientOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateAppClientOptionspublic org.json.JSONObject createAppClient()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateAppClient(java.lang.String appClientId,
UpdateAppClientOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
appClientId - Id of the appClientoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateAppClientOptionspublic org.json.JSONObject listAppClients(ListAppClientsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListAppClientsOptionspublic org.json.JSONObject listAppClients()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject deleteAppClient(java.lang.String appClientId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
appClientId - Id of the appClientjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createAsset(byte[] content,
CreateAssetOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
content - Binary dataoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateAssetOptionspublic org.json.JSONObject createAsset(java.io.InputStream content,
CreateAssetOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
content - Data from input streamoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateAssetOptionspublic org.json.JSONObject createAsset(byte[] content)
throws java.io.IOException,
APIException,
MissingAccessTokenException
content - Binary datajava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createAsset(java.io.InputStream content)
throws java.io.IOException,
APIException,
MissingAccessTokenException
content - Data from input streamjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject listAssets(ListAssetsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListAssetsOptionspublic org.json.JSONObject listAssets()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject getAsset(java.lang.String assetId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
assetId - Id of the assetjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateAsset(java.lang.String assetId,
UpdateAssetOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
assetId - Id of the assetoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateAssetOptionspublic org.json.JSONObject deleteAsset(java.lang.String assetId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
assetId - Id of the assetjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createBatch(CreateBatchOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateBatchOptionspublic org.json.JSONObject createBatch()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateBatch(java.lang.String batchId,
UpdateBatchOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
batchId - Id of the batchoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateBatchOptionspublic org.json.JSONObject listBatches(ListBatchesOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListBatchesOptionspublic org.json.JSONObject listBatches()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject deleteBatch(java.lang.String batchId,
boolean deleteDocuments)
throws java.io.IOException,
APIException,
MissingAccessTokenException
batchId - Id of the batchdeleteDocuments - Set to true to delete documents in batch before deleting batchjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject deleteBatch(java.lang.String batchId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
batchId - Id of the batchjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createDocument(byte[] content,
ContentType contentType,
CreateDocumentOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
content - Binary datacontentType - A mime type for the documentoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateDocumentOptionspublic org.json.JSONObject createDocument(java.io.InputStream content,
ContentType contentType,
CreateDocumentOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
content - Data from input streamcontentType - A mime type for the documentoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateDocumentOptionspublic org.json.JSONObject createDocument(java.io.InputStream content,
ContentType contentType)
throws java.io.IOException,
APIException,
MissingAccessTokenException
content - Data from input streamcontentType - A mime type for the documentjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateDocumentOptionspublic org.json.JSONObject createDocument(byte[] content,
ContentType contentType)
throws java.io.IOException,
APIException,
MissingAccessTokenException
content - Binary datacontentType - A mime type for the documentjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateDocumentOptionspublic org.json.JSONObject listDocuments(ListDocumentsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListDocumentsOptionspublic org.json.JSONObject listDocuments()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject deleteDocuments(DeleteDocumentsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedDeleteDocumentsOptionspublic org.json.JSONObject deleteDocuments()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedcreateDocument(byte[], ai.lucidtech.las.sdk.ContentType, ai.lucidtech.las.sdk.CreateDocumentOptions)public org.json.JSONObject getDocument(java.lang.String documentId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
documentId - Id of the documentjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateDocument(java.lang.String documentId,
org.json.JSONArray groundTruth)
throws java.io.IOException,
APIException,
MissingAccessTokenException
documentId - The document id to post groundTruth to.groundTruth - List of json objects containing label and value for the ground truthjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedcreateDocument(byte[], ai.lucidtech.las.sdk.ContentType, ai.lucidtech.las.sdk.CreateDocumentOptions)public org.json.JSONObject getLog(java.lang.String logId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
logId - Id of the logjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject listLogs(ListLogsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListLogsOptionspublic org.json.JSONObject listLogs()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createModel(int width,
int height,
FieldConfig fieldConfig,
CreateModelOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
width - The number of pixels to be used for the input image width of your modelheight - The number of pixels to be used for the input image height of your modelfieldConfig - Specification of the fields that the model is going to predictoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateModelOptions,
FieldConfigpublic org.json.JSONObject createModel(int width,
int height,
FieldConfig fieldConfig)
throws java.io.IOException,
APIException,
MissingAccessTokenException
width - The number of pixels to be used for the input image width of your modelheight - The number of pixels to be used for the input image height of your modelfieldConfig - Specification of the fields that the model is going to predictjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedFieldConfigpublic org.json.JSONObject updateModel(java.lang.String modelId,
UpdateModelOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
modelId - Id of the modeloptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateModelOptionspublic org.json.JSONObject getModel(java.lang.String modelId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
modelId - Id of the modeljava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject listModels(ListModelsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListModelsOptionspublic org.json.JSONObject listModels()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createPrediction(java.lang.String documentId,
java.lang.String modelId,
CreatePredictionOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
documentId - The document id to run inference and create a prediction on.modelId - The id of the model to use for inferenceoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedcreateDocument(byte[], ai.lucidtech.las.sdk.ContentType, ai.lucidtech.las.sdk.CreateDocumentOptions),
CreatePredictionOptionspublic org.json.JSONObject createPrediction(java.lang.String documentId,
java.lang.String modelId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
documentId - The document id to run inference and create a prediction on.modelId - The id of the model to use for inferencejava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedcreateDocument(byte[], ai.lucidtech.las.sdk.ContentType, ai.lucidtech.las.sdk.CreateDocumentOptions)public org.json.JSONObject listPredictions(ListPredictionsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListPredictionsOptionspublic org.json.JSONObject listPredictions()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createSecret(org.json.JSONObject data,
CreateSecretOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
data - Key-Value pairs to store secretlyoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateSecretOptionspublic org.json.JSONObject createSecret(java.util.Map<java.lang.String,java.lang.String> data,
CreateSecretOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
data - Key-Value pairs to store secretlyoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateSecretOptionspublic org.json.JSONObject createSecret(java.util.Map<java.lang.String,java.lang.String> data)
throws java.io.IOException,
APIException,
MissingAccessTokenException
data - Key-Value pairs to store secretlyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createSecret(org.json.JSONObject data)
throws java.io.IOException,
APIException,
MissingAccessTokenException
data - Key-Value pairs to store secretlyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject listSecrets(ListSecretsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListSecretsOptionspublic org.json.JSONObject listSecrets()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateSecret(java.lang.String secretId,
UpdateSecretOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
secretId - Id of the secretoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateSecretOptionspublic org.json.JSONObject deleteSecret(java.lang.String secretId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
secretId - Id of the secretjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createTransition(TransitionType transitionType, CreateTransitionOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
transitionType - Type of transitionoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateTransitionOptions,
TransitionTypepublic org.json.JSONObject createTransition(TransitionType transitionType) throws java.io.IOException, APIException, MissingAccessTokenException
transitionType - Type of transitionjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedTransitionTypepublic org.json.JSONObject listTransitions(ListTransitionsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListTransitionsOptionspublic org.json.JSONObject listTransitions()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject getTransition(java.lang.String transitionId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateTransition(java.lang.String transitionId,
UpdateTransitionOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateTransitionOptionspublic org.json.JSONObject executeTransition(java.lang.String transitionId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject deleteTransition(java.lang.String transitionId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject listTransitionExecutions(java.lang.String transitionId,
ListTransitionExecutionsOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionoptions - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListTransitionExecutionsOptionspublic org.json.JSONObject listTransitionExecutions(java.lang.String transitionId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject getTransitionExecution(java.lang.String transitionId,
java.lang.String executionId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionexecutionId - Id of the executionjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateTransitionExecution(java.lang.String transitionId,
java.lang.String executionId,
TransitionExecutionStatus status,
UpdateTransitionExecutionOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionexecutionId - Id of the executionstatus - Status of the executionoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateTransitionExecutionOptions,
TransitionExecutionStatuspublic org.json.JSONObject sendHeartbeat(java.lang.String transitionId,
java.lang.String executionId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
transitionId - Id of the transitionexecutionId - Id of the executionjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createUser(java.lang.String email,
CreateUserOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
email - Email of the new useroptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateUserOptionspublic org.json.JSONObject createUser(java.lang.String email)
throws java.io.IOException,
APIException,
MissingAccessTokenException
email - Email to the new userjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject listUsers(ListUsersOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListUsersOptionspublic org.json.JSONObject listUsers()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject getUser(java.lang.String userId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
userId - Id of userjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateUser(java.lang.String userId,
UpdateUserOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
userId - Id of useroptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateUserOptionspublic org.json.JSONObject deleteUser(java.lang.String userId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
userId - Id of userjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject createWorkflow(org.json.JSONObject specification,
CreateWorkflowOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
specification - Specification of the workflow,
currently supporting ASL: https://states-language.net/spec.html. Check out the tutorials for more information:
see https://docs.lucidtech.ai/getting-started/tutorials/setup_predict_and_approve#creating-the-workflowoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedCreateWorkflowOptionspublic org.json.JSONObject createWorkflow(org.json.JSONObject specification)
throws java.io.IOException,
APIException,
MissingAccessTokenException
specification - Specification of the workflow,
currently supporting ASL: https://states-language.net/spec.html. Check out the tutorials for more information:
see https://docs.lucidtech.ai/getting-started/tutorials/setup_predict_and_approve#creating-the-workflowjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject listWorkflows(ListWorkflowsOptions options) throws java.io.IOException, APIException, MissingAccessTokenException
options - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListWorkflowsOptionspublic org.json.JSONObject listWorkflows()
throws java.io.IOException,
APIException,
MissingAccessTokenException
java.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject getWorkflow(java.lang.String workflowId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
workflowId - Id of the workflowjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject updateWorkflow(java.lang.String workflowId,
UpdateWorkflowOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
workflowId - Id of the workflowoptions - Additional options to include in request bodyjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedUpdateWorkflowOptionspublic org.json.JSONObject deleteWorkflow(java.lang.String workflowId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
workflowId - Id of the workflowjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedcreateWorkflow(org.json.JSONObject, ai.lucidtech.las.sdk.CreateWorkflowOptions)public org.json.JSONObject executeWorkflow(java.lang.String workflowId,
org.json.JSONObject content)
throws java.io.IOException,
APIException,
MissingAccessTokenException
workflowId - Id of the workflowcontent - Input to the first step of the workflowjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject listWorkflowExecutions(java.lang.String workflowId,
ListWorkflowExecutionsOptions options)
throws java.io.IOException,
APIException,
MissingAccessTokenException
workflowId - Id of the workflowoptions - Additional options to pass along as query parametersjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedListWorkflowExecutionsOptionspublic org.json.JSONObject listWorkflowExecutions(java.lang.String workflowId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
workflowId - Id of the workflowjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedpublic org.json.JSONObject deleteWorkflowExecution(java.lang.String workflowId,
java.lang.String executionId)
throws java.io.IOException,
APIException,
MissingAccessTokenException
workflowId - Id of the workflowexecutionId - Id of the executionjava.io.IOException - General IOExceptionAPIException - Raised when API returns an erroneous status codeMissingAccessTokenException - Raised if access token cannot be obtainedexecuteWorkflow(java.lang.String, org.json.JSONObject)