latest

Summary

Members

Descriptions

namespaceLucidtech::Las

namespaceLucidtech::Las::Core

namespaceLucidtech::Las::Utils

namespace Lucidtech::Las

Summary

Members

Descriptions

classLucidtech::Las::Client

Client to invoke api methods from Lucidtech AI Services.

class Lucidtech::Las::Client

Client to invoke api methods from Lucidtech AI Services.

Summary

Members

Descriptions

{property} RestClientRestSharpClient

{property}Credentials LasCredentials

publicClient(Credentialscredentials)

Client constructor.

publicClient()

Client constructor with credentials read from local file.

public objectCreateAppClient(bool generateSecret,List< string >? logoutUrls,List< string >? loginUrls,List< string >? callbackUrls,string? defaultLoginUrl,Dictionary< string, string?>? attributes)

Creates an appClient, calls the POST /appClients endpoint.

public objectListAppClients(int? maxResults,string? nextToken)

List available appClients, calls the GET /appClients endpoint.

public objectUpdateAppClient(string appClientId,Dictionary< string, string?>? attributes)

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

public objectDeleteAppClient(string appClientId)

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

public objectCreateAsset(byte[] content,Dictionary< string, string?>? attributes)

Creates an asset, calls the POST /assets endpoint.

public objectListAssets(int? maxResults,string? nextToken)

List available assets, calls the GET /assets endpoint.

public objectGetAsset(string assetId)

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

public objectUpdateAsset(string assetId,byte?[] content,Dictionary< string, string?>? attributes)

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

public objectDeleteAsset(string assetId)

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

public objectCreateDocument(byte[] content,string contentType,string? consentId,string? batchId,List< Dictionary< string, string >>? groundTruth,string? datasetId)

Creates a document handle, calls the POST /documents endpoint

public objectListDocuments(string? batchId,string? consentId,int? maxResults,string? nextToken,string? datasetId)

Get documents from the REST API, calls the GET /documents endpoint.

public objectGetDocument(string documentId)

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

public objectUpdateDocument(string documentId,List< Dictionary< string, string >>? groundTruth,string? datasetId)

Update ground truth of the document, calls the POST /documents/{documentId} endpoint. This enables the API to learn from past mistakes.

public objectDeleteDocuments(string? batchId,string? consentId,int? maxResults,string? nextToken,string? datasetId,bool deleteAll)

Delete documents with specified consentId, calls DELETE /documents endpoint.

public objectDeleteDocument(string documentId)

Delete a document, calls the DELETE /documents/{documentId} endpoint. #### Parameters * documentId Id of the document #### Returns Document response from REST API

public objectCreateBatch(string? name,string? description)

Create a batch handle, calls the POST /batches endpoint.

public objectUpdateBatch(string batchId,Dictionary< string, string?>? attributes)

Updates an existing batch, calls the PATCH /batches/{batchId} endpoint.

public objectDeleteBatch(string batchId,bool deleteDocuments)

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

public objectCreateDataset(string? name,string? description)

Create a dataset handle, calls the POST /datasets endpoint.

public objectListDatasets(int? maxResults,string? nextToken)

List datasets available, calls the GET /datasets endpoint.

public objectUpdateDataset(string datasetId,Dictionary< string, string?>? attributes)

Updates an existing dataset, calls the PATCH /datasets/{datasetId} endpoint.

public objectDeleteDataset(string datasetId,bool deleteDocuments)

Delete a dataset, calls the DELETE /datasets/{datasetId} endpoint.

public objectCreatePrediction(string documentId,string modelId,int? maxPages,bool? autoRotate,string? imageQuality)

Run inference and create a prediction, calls the POST /predictions endpoint.

public objectListPredictions(int? maxResults,string? nextToken)

List predictions available, calls the GET /predictions endpoint.

public objectListLogs(string? transitionId,string? transitionExecutionId,string? workflowId,string? workflowExecutionId,int? maxResults,string? nextToken)

List logs, calls the GET /logs endpoint.

public objectCreateModel(int width,int height,Dictionary< string, object > fieldConfig,Dictionary< string, object >? preprocessConfig,string? name,string? description,Dictionary< string, string?>? attributes)

Creates a model, calls the POST /models endpoint.

public objectListModels(int? maxResults,string? nextToken)

List models available, calls the GET /models endpoint.

public objectGetModel(string modelId)

Get information about a specific model, calls the GET /models/{modelId} endpoint.

public objectUpdateModel(string modelId,int? width,int? height,Dictionary< string, object >? fieldConfig,Dictionary< string, object >? preprocessConfig,string? name,string? description,string? status,Dictionary< string, string?>? attributes)

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

public objectCreateDataBundle(string modelId,List< string > datasetIds,string? name,string? description)

Create a data bundle handle, calls the POST /models/{modelId}/dataBundles endpoint.

public objectListDataBundles(string modelId,int? maxResults,string? nextToken)

List data bundles available, calls the GET /models/{modelId}/dataBundles endpoint.

public objectUpdateDataBundle(string modelId,string dataBundleId,Dictionary< string, string?>? attributes)

Updates an existing data bundle, calls the PATCH /models/{modelId}/dataBundles/{dataBundleId} endpoint.

public objectDeleteDataBundle(string modelId,string dataBundleId)

Delete a data bundle, calls the DELETE /models/{modelId}/dataBundles/{dataBundleId} endpoint. #### Parameters modelId Id of the model dataBundleId Id of the data bundle #### Returns Data Bundle response from REST API

public objectCreateSecret(Dictionary< string, string > data,Dictionary< string, string?>? attributes)

Creates an secret, calls the POST /secrets endpoint.

public objectListSecrets(int? maxResults,string? nextToken)

List secrets available, calls the GET /secrets endpoint.

public objectUpdateSecret(string secretId,Dictionary< string, string >? data,Dictionary< string, string?>? attributes)

Updates a secret, calls the PATCH /secrets/secretId endpoint.

public objectDeleteSecret(string secretId)

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

public objectCreateTransition(string transitionType,Dictionary< string, string >? inputJsonSchema,Dictionary< string, string >? outputJsonSchema,Dictionary< string, object?>? parameters,Dictionary< string, string?>? attributes)

Creates a transition, calls the POST /transitions endpoint.

public objectListTransitions(string? transitionType,int? maxResults,string? nextToken)

List transitions, calls the GET /transitions endpoint.

public objectGetTransition(string transitionId)

Get information about a specific transition, calls the GET /transitions/{transition_id} endpoint.

public objectDeleteTransition(string transitionId)

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

public objectGetTransitionExecution(string transitionId,string executionId)

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

public objectUpdateTransition(string transitionId,Dictionary< string, string >? inputJsonSchema,Dictionary< string, string >? outputJsonSchema,Dictionary< string, string >? assets,Dictionary< string, string >? environment,List< string >? environmentSecrets,Dictionary< string, string?> attributes)

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

public objectExecuteTransition(string transitionId)

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

public objectListTransitionExecutions(string transitionId,string? status,List< string >? executionIds,int? maxResults,string? nextToken,string? sortBy,string? order)

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

public objectListTransitionExecutions(string transitionId,List< string >? statuses,List< string >? executionIds,int? maxResults,string? nextToken,string? sortBy,string? order)

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

public objectUpdateTransitionExecution(string transitionId,string executionId,string status,Dictionary< string, string >? output,Dictionary< string, string >? error,DateTime? startTime)

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

public objectSendHeartbeat(string transitionId,string executionId)

Send heartbeat for a manual execution, calls the POST /transitions/{transitionId}/executions/{executionId}/heartbeats endpoint.

public objectCreateUser(string email,Dictionary< string, string?>? attributes)

Creates a new user, calls the POST /users endpoint.

public objectListUsers(int? maxResults,string? nextToken)

List users, calls the GET /users endpoint.

public objectGetUser(string userId)

Get information about a specific user, calls the GET /users/{user_id} endpoint.

public objectDeleteUser(string userId)

Delete the user with the provided user_id, calls the DELETE /users/{userId} endpoint.

public objectUpdateUser(string userId,Dictionary< string, object?> attributes)

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

public objectCreateWorkflow(Dictionary< string, object > specification,Dictionary< string, object >? errorConfig,Dictionary< string, object >? completedConfig,Dictionary< string, string?>? attributes)

Creates a new workflow, calls the POST /workflows endpoint. Check out Lucidtech's tutorials for more info on how to create a workflow.

public objectListWorkflows(int? maxResults,string nextToken)

List workflows, calls the GET /workflows endpoint.

public objectUpdateWorkflow(string workflowId,Dictionary< string, object >? errorConfig,Dictionary< string, object >? completedConfig,Dictionary< string, string?> attributes)

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

public objectGetWorkflow(string workflowId)

Get information about a specific workflow, calls the GET /workflows/{workflow_id} endpoint.

public objectDeleteWorkflow(string workflowId)

Delete the workflow with the provided workflow_id, calls the DELETE /workflows/{workflowId} endpoint.

public objectExecuteWorkflow(string workflowId,Dictionary< string, object > content)

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

public objectListWorkflowExecutions(string workflowId,string? status,int? maxResults,string? nextToken,string? sortBy,string? order)

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

public objectListWorkflowExecutions(string workflowId,List< string >? statuses,int? maxResults,string? nextToken,string? sortBy,string? order)

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

public objectGetWorkflowExecution(string workflowId,string executionId)

Get an execution of a workflow, calls the GET /workflows/{workflowId}/executions/{executionId} endpoint

public objectUpdateWorkflowExecution(string workflowId,string executionId,string nextTransitionId)

Retry or end the processing of a workflow execution, calls the PATCH /workflows/{workflowId}/executions/{executionId} endpoint.

public objectDeleteWorkflowExecution(string workflowId,string executionId)

Deletes the execution with the provided execution_id from workflow_id, calls the DELETE /workflows/{workflowId}/executions/{executionId} endpoint.

Members

{property} RestClientRestSharpClient

publicClient(Credentialscredentials)

Client constructor.

Parameters

  • credentials Keys, endpoints and credentials needed for authorization

publicClient()

Client constructor with credentials read from local file.

public objectCreateAppClient(bool generateSecret,List< string >? logoutUrls,List< string >? loginUrls,List< string >? callbackUrls,string? defaultLoginUrl,Dictionary< string, string?>? attributes)

Creates an appClient, calls the POST /appClients endpoint.

Parameters

  • generateSecret Set to false to ceate a Public app client, default: true

  • logoutUrls List of logout urls

  • callbackUrls List of callback urls

  • loginUrls List of login urls

  • defaultLoginUrl default login url

  • attributes Additional attributes

Returns

AppClient response from REST API

public objectListAppClients(int? maxResults,string? nextToken)

List available appClients, calls the GET /appClients endpoint.

Client client = new Client();
var response = client.ListAppClients();

Parameters

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

JSON object with two keys:

  • "appClients" AppClients response from REST API without the content of each appClient

  • "nextToken" allowing for retrieving the next portion of data

public objectUpdateAppClient(string appClientId,Dictionary< string, string?>? attributes)

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

Parameters

  • appClientId Id of the appClient

  • attributes Additional attributes

Returns

AppClient response from REST API

public objectDeleteAppClient(string appClientId)

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

[Client](#a00043) client = new [Client()](#a00043_1a0ba3cc00461a4ee4d4a346d9600efa4a); var response = client.DeleteAppClient("&lt;appClientId&gt;");

Parameters

  • appClientId Id of the appClient

Returns

AppClient response from REST API

public objectCreateAsset(byte[] content,Dictionary< string, string?>? attributes)

Creates an asset, calls the POST /assets endpoint.

Client client = new Client();
byte[] content = File.ReadAllBytes("myScript.js");
client.CreateAsset(content);

Parameters

  • content Asset content

  • attributes Additional attributes

Returns

Asset response from REST API

public objectListAssets(int? maxResults,string? nextToken)

List available assets, calls the GET /assets endpoint.

Client client = new Client();
var response = client.ListAssets();

Parameters

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

JSON object with two keys:

  • "assets" Assets response from REST API without the content of each asset

  • "nextToken" allowing for retrieving the next portion of data

public objectGetAsset(string assetId)

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

Client client = new Client();
var response = client.GetAsset("<asset_id>");

Parameters

  • assetId Asset ID

Returns

Asset object

public objectUpdateAsset(string assetId,byte?[] content,Dictionary< string, string?>? attributes)

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

Client client = new Client();
byte[] newContent = File.ReadAllBytes("MyScript.js");
var response = client.UpdateAsset("<asset_id>", newContent);

Parameters

  • assetId Asset ID

  • content New content

  • attributes Additional attributes

Returns

Asset object

public objectDeleteAsset(string assetId)

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

[Client](#a00043) client = new [Client()](#a00043_1a0ba3cc00461a4ee4d4a346d9600efa4a); var response = client.DeleteAsset("&lt;assetId&gt;");

Parameters

  • assetId Id of the asset

Returns

Asset response from REST API

public objectCreateDocument(byte[] content,string contentType,string? consentId,string? batchId,List< Dictionary< string, string >>? groundTruth,string? datasetId)

Creates a document handle, calls the POST /documents endpoint

Parameters

  • content Content to POST

  • contentType A mime type for the document handle

  • batchId Specifies the batch to which the document will be associated with

  • consentId An identifier to mark the owner of the document handle

  • datasetId Specifies the dataset to which the document will be associated with

  • groundTruth A list of items {label: value}, representing the ground truth values for the document

Returns

A deserialized object that can be interpreted as a Dictionary with the fields with batchId, documentId, contentType and consentId

public objectListDocuments(string? batchId,string? consentId,int? maxResults,string? nextToken,string? datasetId)

Get documents from the REST API, calls the GET /documents endpoint.

Create a document handle for a jpeg image

Client client = new Client();
var response = client.ListDocuments('<batchId>');

Parameters

  • batchId The batch id that contains the documents of interest

  • consentId An identifier to mark the owner of the document handle

  • datasetId The dataset id that contains the documents of interest

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

Documents from REST API contained in batch

public objectGetDocument(string documentId)

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

Get information of document specified by

Client client = new Client();
var response = client.GetDocument('<documentId>');

Parameters

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

Returns

Document information from REST API

public objectUpdateDocument(string documentId,List< Dictionary< string, string >>? groundTruth,string? datasetId)

Update ground truth of the document, calls the POST /documents/{documentId} endpoint. This enables the API to learn from past mistakes.

Parameters

  • documentId Path to document to upload, Same as provided to CreateDocument

  • groundTruth A list of ground truth items

  • datasetId change or add the documents datasetId

Returns

A deserialized object that can be interpreted as a Dictionary with the fields documentId, consentId, uploadUrl, contentType and ground truth.

public objectDeleteDocuments(string? batchId,string? consentId,int? maxResults,string? nextToken,string? datasetId,bool deleteAll)

Delete documents with specified consentId, calls DELETE /documents endpoint.

Client client = new Client();
var response = client.DeleteConsent('<consentId>');

Parameters

  • batchId Delete documents with provided batchId

  • consentId Delete documents with provided consentId

  • datasetId Delete documents with provided datasetId

  • maxResults Maximum number of items to delete

  • nextToken Token to retrieve the next page

Returns

A deserialized object that can be interpreted as a Dictionary with the fields consentId, nextToken and documents

public objectDeleteDocument(string documentId)

Delete a document, calls the DELETE /documents/{documentId} endpoint.

Parameters

  • documentId Id of the document

Returns

Document response from REST API

public objectCreateBatch(string? name,string? description)

Create a batch handle, calls the POST /batches endpoint.

Create a new batch with the provided description. on the document specified by ''

Client client = new Client();
var response = client.CreateBatch("Data gathered from the Mars Rover Invoice Scan Mission");

Parameters

  • name Name of the batch

  • description A brief description of the purpose of the batch

Returns

A deserialized object that can be interpreted as a Dictionary with the fields batchId and description. batchId can be used as an input when posting documents to make them a part of this batch.

public objectUpdateBatch(string batchId,Dictionary< string, string?>? attributes)

Updates an existing batch, calls the PATCH /batches/{batchId} endpoint.

Parameters

  • batchId Id of the batch

  • attributes Additional attributes

Returns

Batch response from REST API

public objectDeleteBatch(string batchId,bool deleteDocuments)

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

[Client](#a00043) client = new [Client()](#a00043_1a0ba3cc00461a4ee4d4a346d9600efa4a); var response = client.DeleteBatch("&lt;batchId&gt;");

Parameters

  • batchId Id of the batch

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

Returns

Batch response from REST API

public objectCreateDataset(string? name,string? description)

Create a dataset handle, calls the POST /datasets endpoint.

Create a new dataset with the provided description. on the document specified by ''

Client client = new Client();
var response = client.CreateDataset("Data gathered from the Mars Rover Invoice Scan Mission");

Parameters

  • name Name of the dataset

  • description A brief description of the dataset

Returns

A deserialized object that can be interpreted as a Dictionary with the fields datasetId and description. datasetId can be used as an input when posting documents to make them a part of this dataset.

public objectListDatasets(int? maxResults,string? nextToken)

List datasets available, calls the GET /datasets endpoint.

Client client = new Client();
var response = client.ListDatasets();

Parameters

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

JSON object with two keys:

  • "datasets" which contains a list of Dataset objects

  • "nextToken" allowing for retrieving the next portion of data

public objectUpdateDataset(string datasetId,Dictionary< string, string?>? attributes)

Updates an existing dataset, calls the PATCH /datasets/{datasetId} endpoint.

Parameters

  • datasetId Id of the dataset

  • attributes Additional attributes

Returns

Dataset response from REST API

public objectDeleteDataset(string datasetId,bool deleteDocuments)

Delete a dataset, calls the DELETE /datasets/{datasetId} endpoint.

[Client](#a00043) client = new [Client()](#a00043_1a0ba3cc00461a4ee4d4a346d9600efa4a); var response = client.DeleteDataset("&lt;datasetId&gt;");

Parameters

  • datasetId Id of the dataset

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

Returns

Dataset response from REST API

public objectCreatePrediction(string documentId,string modelId,int? maxPages,bool? autoRotate,string? imageQuality)

Run inference and create a prediction, calls the POST /predictions endpoint.

Run inference and create a prediction using the invoice model on the document specified by ''

Client client = new Client();
var response = client.CreatePrediction('<documentId>',"las:model:99cac468f7cf47ddad12e5e017540389");

Parameters

  • documentId Path to document to upload Same as provided to CreateDocument

  • modelId Id of the model to use for inference

  • maxPages Maximum number of pages to run predictions on

  • autoRotate Whether or not to let the API try different rotations on the document when running

  • extras Extra information to add to json body

Returns

A deserialized object that can be interpreted as a Dictionary with the fields documentId and predictions, the value of predictions is the output from the model.

public objectListPredictions(int? maxResults,string? nextToken)

List predictions available, calls the GET /predictions endpoint.

Client client = new Client();
var response = client.ListPredictions();

Parameters

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

JSON object with two keys:

  • "predictions" which contains a list of Prediction objects

  • "nextToken" allowing for retrieving the next portion of data

public objectListLogs(string? transitionId,string? transitionExecutionId,string? workflowId,string? workflowExecutionId,int? maxResults,string? nextToken)

List logs, calls the GET /logs endpoint.

Client client = new Client();
var response = client.ListLogs();

Parameters

  • transitionId Only show logs from this transition

  • transitionExecutionId Only show logs from this transition execution

  • workflowId Only show logs from this workflow

  • workflowExecutionId Only show logs from this workflow execution

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

Logs response from REST API

public objectCreateModel(int width,int height,Dictionary< string, object > fieldConfig,Dictionary< string, object >? preprocessConfig,string? name,string? description,Dictionary< string, string?>? attributes)

Creates a model, calls the POST /models endpoint.

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

  • preprocessConfig Specification of the processing steps prior to the prediction of an image

  • name Name of the model

  • description Description of the model

  • attributes Additional attributes

Returns

Model response from REST API

public objectListModels(int? maxResults,string? nextToken)

List models available, calls the GET /models endpoint.

Client client = new Client();
var response = client.ListModels();

Parameters

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

JSON object with two keys:

  • "models" which contains a list of Prediction objects

  • "nextToken" allowing for retrieving the next portion of data

public objectGetModel(string modelId)

Get information about a specific model, calls the GET /models/{modelId} endpoint.

Parameters

  • modelId Id of the model

Returns

Model response from REST API

public objectUpdateModel(string modelId,int? width,int? height,Dictionary< string, object >? fieldConfig,Dictionary< string, object >? preprocessConfig,string? name,string? description,string? status,Dictionary< string, string?>? attributes)

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

Parameters

  • modelId Id of the model

  • 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

  • preprocessConfig Specification of the processing steps prior to the prediction of an image

  • name Name of the model

  • description Description of the model

  • status New status for the model

  • attributes Additional attributes

Returns

Model response from REST API

public objectCreateDataBundle(string modelId,List< string > datasetIds,string? name,string? description)

Create a data bundle handle, calls the POST /models/{modelId}/dataBundles endpoint.

Parameters

  • modelId Id of the model

  • datasetIds List of Dataset Ids that will be included in the data bundle

    Parameters

  • name Name of the data bundle

  • description A brief description of the data bundle

Returns

Data Bundle response from REST API

public objectListDataBundles(string modelId,int? maxResults,string? nextToken)

List data bundles available, calls the GET /models/{modelId}/dataBundles endpoint.

Parameters

  • modelId Id of the model

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

JSON object with two keys:

  • "dataBundles" which contains a list of data bundle objects

  • "nextToken" allowing for retrieving the next portion of data

public objectUpdateDataBundle(string modelId,string dataBundleId,Dictionary< string, string?>? attributes)

Updates an existing data bundle, calls the PATCH /models/{modelId}/dataBundles/{dataBundleId} endpoint.

Parameters

  • modelId Id of the model

  • dataBundleId Id of the data bundle

  • attributes Additional attributes

Returns

Data Bundle response from REST API

public objectDeleteDataBundle(string modelId,string dataBundleId)

Delete a data bundle, calls the DELETE /models/{modelId}/dataBundles/{dataBundleId} endpoint.

Parameters

  • modelId Id of the model

  • dataBundleId Id of the data bundle

Returns

Data Bundle response from REST API

public objectCreateSecret(Dictionary< string, string > data,Dictionary< string, string?>? attributes)

Creates an secret, calls the POST /secrets endpoint.

Client client = new Client();
var data = new Dictionary<string, string>{
{"key", "my_secret_value"}
}
var response = client.CreateSecret(data);

Parameters

  • data A dictionary containing values to be hidden

  • attributes Additional attributes

Returns

A Secret object

public objectListSecrets(int? maxResults,string? nextToken)

List secrets available, calls the GET /secrets endpoint.

Client client = new Client();
var response = client.ListSecrets();

Parameters

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

JSON object with two keys:

  • "secrets" which contains a list of Prediction objects

  • "nextToken" allowing for retrieving the next portion of data

public objectUpdateSecret(string secretId,Dictionary< string, string >? data,Dictionary< string, string?>? attributes)

Updates a secret, calls the PATCH /secrets/secretId endpoint.

Client client = new Client();
var data = new Dictionary<string, string>{
{"key", "my_new_secret_value"}
}
var response = client.UpdateSecret("<secretId>", data);

Parameters

  • secretId Secret ID

  • data New data

  • attributes Additional attributes

public objectDeleteSecret(string secretId)

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

[Client](#a00043) client = new [Client()](#a00043_1a0ba3cc00461a4ee4d4a346d9600efa4a); var response = client.DeleteSecret("&lt;secretId&gt;");

Parameters

  • secretId Id of the secret

Returns

Secret response from REST API

public objectCreateTransition(string transitionType,Dictionary< string, string >? inputJsonSchema,Dictionary< string, string >? outputJsonSchema,Dictionary< string, object?>? parameters,Dictionary< string, string?>? attributes)

Creates a transition, calls the POST /transitions endpoint.

Client client = new Client();
var inputSchema = new Dictionary<string, string>{
{"$schema", "https://json-schema.org/draft-04/schema#"},
{"title", "input"}
};
var outputSchema = new Dictionary<string, string>{
{"$schema", "https://json-schema/draft-04/schema#"},
{"title", "output"}
};
var params = new Dictionary<string, object>{
{"imageUrl", "<image_url>"},
{"credentials", new Dictionary<string, string>{
{"username", "<username>"},
{"password", "<password>"}
}
};
var response = client.CreateTransition("<transition_type>", inputSchema, outputSchema, parameters: params);

Parameters

  • transitionType Type of transition: "docker"|"manual"

  • inputJsonSchema Json-schema that defines the input to the transition

  • outputJsonSchema Json-schema that defines the output of the transition

  • parameters Parameters to the corresponding transition type

  • attributes Additional attributes

Returns

Transition response from REST API

public objectListTransitions(string? transitionType,int? maxResults,string? nextToken)

List transitions, calls the GET /transitions endpoint.

Client client = new Client();
var response = client.ListTransitions();

Parameters

  • transitionType Type of transitions

  • maxResults Number of items to show on a single page

  • nextToken Token to retrieve the next page

Returns

Transitions response from REST API

public objectGetTransition(string transitionId)

Get information about a specific transition, calls the GET /transitions/{transition_id} endpoint.

Client client = new Client();
var response = client.GetTransition("<transition_id>");

Parameters

  • transitionId Id of the transition

Returns

Transition response from REST API

public objectDeleteTransition(string transitionId)

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

Client client = new Client();
var response = client.DeleteTransition("<transition_id>");

Parameters

  • transitionId Id of the transition

Returns

Transition response from REST API

public objectGetTransitionExecution(string transitionId,string executionId)

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

Client client = new Client();
var response = client.GetTransitionExecution("<transition_id>", "<execution_id>");

Parameters

  • transitionId Id of the transition

  • executionId Id of the execution

Returns

Transition execution response from REST API

public objectUpdateTransition(string transitionId,Dictionary< string, string >? inputJsonSchema,Dictionary< string, string >? outputJsonSchema,Dictionary< string, string >? assets,Dictionary< string, string >? environment,List< string >? environmentSecrets,Dictionary< string, string?> attributes)

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

Client client = new Client();
var response = client.UpdateTransition("<transitionId>");

Parameters

  • transitionId Id of the transition

  • inputJsonSchema Json-schema that defines the input to the transition

  • outputJsonSchema Json-schema that defines the output of the transition

  • attributes Additional attributes

Returns

Transition response from REST API

public objectExecuteTransition(string transitionId)

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

Client client = new Client();
var response = client.ExecuteTransition("<transitionId>");

Parameters

  • transitionId Id of the transition

Returns

Transition exexution response from REST API

public objectListTransitionExecutions(string transitionId,string? status,List< string >? executionIds,int? maxResults,string? nextToken,string? sortBy,string? order)

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

Client client = new Client();
var response = client.ListTransitionExecutions("<transitionId>", new [] {"succeeded", "failed"});

Parameters

  • transitionId Id of the transition

  • status Status to filter by

  • executionIds List of execution ids to filter by

  • maxResults Maximum number of results to be returned

  • nextToken A unique token used to retrieve the next page

  • sortBy The sorting variable of the execution: "endTime" | "startTime"

  • order Order of the executions: "ascending" | "descending"

Returns

Transition executions response from the REST API

public objectListTransitionExecutions(string transitionId,List< string >? statuses,List< string >? executionIds,int? maxResults,string? nextToken,string? sortBy,string? order)

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

Client client = new Client();
var response = client.ListTransitionExecutions("<transitionId>", new [] {"succeeded", "failed"});

Parameters

  • transitionId Id of the transition

  • statuses List of execution statuses to filter by

  • executionIds List of execution ids to filter by

  • maxResults Maximum number of results to be returned

  • nextToken A unique token used to retrieve the next page

  • sortBy The sorting variable of the execution: "endTime" | "startTime"

  • order Order of the executions: "ascending" | "descending"

Returns

Transition executions response from the REST API

public objectUpdateTransitionExecution(string transitionId,string executionId,string status,Dictionary< string, string >? output,Dictionary< string, string >? error,DateTime? startTime)

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

Client client = new Client();
var output = new Dictionary<string, string>();
client.UpdateTransitionExecution("<transitionId>", "<executionId>, "succeeded", output: output);

Parameters

  • transitionId Id of the transition

  • executionId Id of the execution

  • status Status of the execution: "succeeded" | "failed"

  • output Output from the execution, required when status is "succeeded"

  • error Error from the execution, required when status is "failed"

  • startTime Utc start time that will replace the original start time of the execution

Returns

Transition execution response from REST API

public objectSendHeartbeat(string transitionId,string executionId)

Send heartbeat for a manual execution, calls the POST /transitions/{transitionId}/executions/{executionId}/heartbeats endpoint.

Client client = new Client();
var response = client.sendHeartbeat("<transitionId>", "<executionId>");

Parameters

  • transitionId Id of the transition

  • executionId Id of the execution

Returns

Transition exexution response from REST API

public objectCreateUser(string email,Dictionary< string, string?>? attributes)

Creates a new user, calls the POST /users endpoint.

Client client = new Client();
var response = client.CreateUser("[email protected]");

Parameters

  • email New user's email

  • attributes Additional attributes. Currently supported are: name, avatar

Returns

User response from REST API

public objectListUsers(int? maxResults,string? nextToken)

List users, calls the GET /users endpoint.

Client client = new Client();
var response = client.ListUsers();

Parameters

  • maxResults Maximum number of results to be returned

  • nextToken A unique token used to retrieve the next page

Returns

Users response from REST API

public objectGetUser(string userId)

Get information about a specific user, calls the GET /users/{user_id} endpoint.

Client client = new Client();
var response = client.GetUser("<user_id>");

Parameters

  • userId Id of the user

Returns

User response from REST API

public objectDeleteUser(string userId)

Delete the user with the provided user_id, calls the DELETE /users/{userId} endpoint.

Client client = new Client();
var response = client.DeleteUser("<user_id>");

Parameters

  • userId Id of the user

Returns

User response from REST API

public objectUpdateUser(string userId,Dictionary< string, object?> attributes)

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

Client client = new Client();
var parameters = new Dictionary<string, string>{
{"name", "User"}
};
var response = client.UpdateUser("<user_id>", parameters);

Parameters

  • userId Id of the user

  • attributes Attributes to update. Allowed attributes: name (string), avatar (base64-encoded image)

Returns

User response from REST API

public objectCreateWorkflow(Dictionary< string, object > specification,Dictionary< string, object >? errorConfig,Dictionary< string, object >? completedConfig,Dictionary< string, string?>? attributes)

Creates a new workflow, calls the POST /workflows endpoint. Check out Lucidtech's tutorials for more info on how to create a workflow.

Client client = new Client();
var specification = new Dictionary<string, object>{
{"language", "ASL"},
{"version", "1.0.0"},
{"definition", {...}}
};
var environmentSecrets = new List<string>{ "las:secret:<hex-uuid>" };
var env = new Dictionary<string, string>{{"FOO", "BAR"}};
var completedConfig = new Dictionary<string, object>{
{"imageUrl", "my/docker:image"},
{"secretId", secretId},
{"environment", env},
{"environmentSecrets", environmentSecrets}
};
var errorConfig = new Dictionary<string, object>{
{"email", "[email protected]"},
{"manualRetry", true}
};
var parameters = new Dictionary<string, string?>{
{"name", name},
{"description", description}
};
var response = Toby.CreateWorkflow(spec, errorConfig, completedConfig, parameters);

Parameters

  • specification Workflow specification. Currently only ASL is supported: https://states-language.net/spec.html

  • errorConfig Error handler configuration

  • completedConfig Configuration of a job to run whenever a workflow execution ends

  • attributes Additional attributes. Currently supported are: name, description.

Returns

Workflow response from REST API

public objectListWorkflows(int? maxResults,string nextToken)

List workflows, calls the GET /workflows endpoint.

Client client = new Client();
var response = client.ListWorkflows();

Parameters

  • maxResults Maximum number of results to be returned

  • nextToken A unique token used to retrieve the next page

Returns

Workflows response from REST API

public objectUpdateWorkflow(string workflowId,Dictionary< string, object >? errorConfig,Dictionary< string, object >? completedConfig,Dictionary< string, string?> attributes)

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

Client client = new Client();
var newParameters = new Dictionary<string, string>{
{"name", "New Name"},
{"description", "My updated awesome workflow"}
};
var response = client.UpdateWorkflow("<workflow_id>, newParameters);

Parameters

  • workflowId Id of the workflow

  • attributes Attributes to update. Currently supported are: name, description

Returns

Workflow response from REST API

public objectGetWorkflow(string workflowId)

Get information about a specific workflow, calls the GET /workflows/{workflow_id} endpoint.

Client client = new Client();
var response = client.GetWorkflow("<workflow_id>");

Parameters

  • workflowId Id of the workflow

Returns

Workflow response from REST API

public objectDeleteWorkflow(string workflowId)

Delete the workflow with the provided workflow_id, calls the DELETE /workflows/{workflowId} endpoint.

Client client = new Client();
var response = client.DeleteWorkflow("<workflow_id>");

Parameters

  • workflowId Id of the workflow

Returns

Workflow response from REST API

public objectExecuteWorkflow(string workflowId,Dictionary< string, object > content)

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

Client client = new Client();
var content = new Dictionary<string, object>();
var response = client.ExecuteWorkflow("<workflowId>, content);

Parameters

  • workflowId Id of the workflow

  • content Input to the first step of the workflow

Returns

Workflow execution response from REST API

public objectListWorkflowExecutions(string workflowId,string? status,int? maxResults,string? nextToken,string? sortBy,string? order)

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

Client client = new Client();
var statuses = new [] {"running", "succeeded"};
var response = client.ListWorkflowExecutions("<workflow_id>", statuses);

Parameters

  • workflowId Id of the workflow

  • status Workflow execution status to filter by

  • maxResults Maximum number of results to be returned

  • nextToken A unique token used to retrieve the next page

  • sortBy The sorting variable of the execution: "endTime" | "startTime"

  • order Order of the executions: "ascending" | "descending"

Returns

WorkflowExecutions response from REST API

public objectListWorkflowExecutions(string workflowId,List< string >? statuses,int? maxResults,string? nextToken,string? sortBy,string? order)

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

Client client = new Client();
var statuses = new [] {"running", "succeeded"};
var response = client.ListWorkflowExecutions("<workflow_id>", statuses);

Parameters

  • workflowId Id of the workflow

  • statuses Workflow execution statuses to filter by

  • maxResults Maximum number of results to be returned

  • nextToken A unique token used to retrieve the next page

  • sortBy The sorting variable of the execution: "endTime" | "startTime"

  • order Order of the executions: "ascending" | "descending"

Returns

WorkflowExecutions response from REST API

public objectGetWorkflowExecution(string workflowId,string executionId)

Get an execution of a workflow, calls the GET /workflows/{workflowId}/executions/{executionId} endpoint

Client client = new Client();
var response = client.GetWorkflowExecution("<workflow_id>", "<execution_id>");

Parameters

  • workflowId Id of the workflow

  • executionId Id of the execution

Returns

Workflow execution response from REST API

public objectUpdateWorkflowExecution(string workflowId,string executionId,string nextTransitionId)

Retry or end the processing of a workflow execution, calls the PATCH /workflows/{workflowId}/executions/{executionId} endpoint.

Client client = new Client();
var response = client.UpdateWorkflowExecution("<workflow_id>", "<execution_id>", "<next_transition_id>");

Parameters

  • workflowId Id of the workflow

  • executionId Id of the execution

  • nextTransitionId The next transition to transition into, to end the workflow-execution, use: las:transition:commons-failed

Returns

WorkflowExecution response from REST API

public objectDeleteWorkflowExecution(string workflowId,string executionId)

Deletes the execution with the provided execution_id from workflow_id, calls the DELETE /workflows/{workflowId}/executions/{executionId} endpoint.

Client client = new Client();
var response = client.DeleteWorkflowExecution("<workflow_id>", "<execution_id>");

Parameters

  • workflowId Id of the workflow

  • executionId Id of the execution

Returns

WorkflowExecution response from REST API

namespace Lucidtech::Las::Core

Summary

Members

Descriptions

classLucidtech::Las::Core::ClientException

A ClientException is raised if the client refuses to send request due to incorrect usage or bad request data.

classLucidtech::Las::Core::Credentials

Used to fetch and store credentials. One of 3 conditions must be met to successfully create credentials.

classLucidtech::Las::Core::FeedbackResponse

The structured format of the response from a send feedback request.

classLucidtech::Las::Core::InvalidCredentialsException

An InvalidCredentialsException is raised if api key, access key id or secret access key is invalid.

classLucidtech::Las::Core::LimitExceededException

A LimitExceededException is raised if you have reached the limit of total requests per month associated with your credentials.

classLucidtech::Las::Core::Prediction

A class that contains all the necessary information regarding a prediction performed by ApiClient.

classLucidtech::Las::Core::RequestException

A RequestException is raised if something went wrong with the request.

classLucidtech::Las::Core::RevokeResponse

The structured format of the response from a revoke consent request.

classLucidtech::Las::Core::TooManyRequestsException

A TooManyRequestsException is raised if you have reached the number of requests per second limit associated with your credentials.

class Lucidtech::Las::Core::ClientException

class Lucidtech::Las::Core::ClientException
: public Exception

A ClientException is raised if the client refuses to send request due to incorrect usage or bad request data.

Summary

Members

Descriptions

publicClientException(string s)

Members

publicClientException(string s)

class Lucidtech::Las::Core::Credentials

Used to fetch and store credentials. One of 3 conditions must be met to successfully create credentials.

  • ClientId, ClientSecret, ApiKey, AuthEndpoint and ApiEndpoint are provided

  • The path to the file where the credentials are stored is provided

  • Credentials are located in default path ~/.lucidtech/credentials.cfg

Get credentials by contacting [email protected]

Summary

Members

Descriptions

{property} stringClientId

Client ID. Provided by Lucidtech.

{property} stringClientSecret

Client Secret. Provided by Lucidtech.

{property} stringApiKey

AWS API Gateway API key. Provided by Lucidtech.

{property} stringAuthEndpoint

AWS Authorization endpoint. Provided by Lucidtech.

{property} stringApiEndpoint

AWS API Gateway API endpoint. Provided by Lucidtech.

{property} RestClientRestSharpClient

RestClient for making request to the authorization endpoint.

public stringGetAccessToken()

Get Access token to API endpoint.

publicCredentials(string clientId,string clientSecret,string apiKey,string authEndpoint,string apiEndpoint)

Credentials constructor where ClientId, ClientSecret, ApiKey, AuthEndpoint and ApiEndpoint are provided by Lucidtech.

publicCredentials(string credentialsPath)

Credentials constructor where the path to the credentials config is provided.

publicCredentials()

Credentials constructor where the credentials are located at the default path. ~/.lucidtech/credentials.cfg for linux and USERPROFILE%.lucidtech\credentials.cfg for Windows.

protectedstring

protected virtual voidCommonConstructor()

Members

{property} stringClientId

Client ID. Provided by Lucidtech.

{property} stringClientSecret

Client Secret. Provided by Lucidtech.

{property} stringApiKey

AWS API Gateway API key. Provided by Lucidtech.

{property} stringAuthEndpoint

AWS Authorization endpoint. Provided by Lucidtech.

{property} stringApiEndpoint

AWS API Gateway API endpoint. Provided by Lucidtech.

{property} RestClientRestSharpClient

RestClient for making request to the authorization endpoint.

public stringGetAccessToken()

Get Access token to API endpoint.

publicCredentials(string clientId,string clientSecret,string apiKey,string authEndpoint,string apiEndpoint)

Credentials constructor where ClientId, ClientSecret, ApiKey, AuthEndpoint and ApiEndpoint are provided by Lucidtech.

Parameters

  • clientId client id

  • clientSecret client secret

  • apiKey API key

  • authEndpoint Authorization endpoint

  • apiEndpoint API endpoint

Exceptions

  • ArgumentException

publicCredentials(string credentialsPath)

Credentials constructor where the path to the credentials config is provided.

Parameters

  • credentialsPath Path to the file where the credentials are stored

publicCredentials()

Credentials constructor where the credentials are located at the default path. ~/.lucidtech/credentials.cfg for linux and USERPROFILE%.lucidtech\credentials.cfg for Windows.

protectedstring

protected virtual voidCommonConstructor()

class Lucidtech::Las::Core::FeedbackResponse

The structured format of the response from a send feedback request.

Summary

Members

Descriptions

{property} stringDocumentId

Document id

{property} stringConsentId

Consent id

{property} stringContentType

Content type

{property} List< Dictionary< string, string > >Feedback

The same information as was uploaded as feedback.

publicFeedbackResponse(object response)

public stringToJsonString(Formatting format)

Convert an object of this class to a string ready to be interpreted as a json object.

Members

{property} stringDocumentId

Document id

{property} stringConsentId

Consent id

{property} stringContentType

Content type

{property} List< Dictionary< string, string > >Feedback

The same information as was uploaded as feedback.

publicFeedbackResponse(object response)

public stringToJsonString(Formatting format)

Convert an object of this class to a string ready to be interpreted as a json object.

Parameters

  • format The format of the string, either Formatting.None or Formatting.Indented

Returns

A string that is formatted as a json object

class Lucidtech::Las::Core::InvalidCredentialsException

class Lucidtech::Las::Core::InvalidCredentialsException
: public Lucidtech.Las.Core.ClientException

An InvalidCredentialsException is raised if api key, access key id or secret access key is invalid.

Summary

Members

Descriptions

publicInvalidCredentialsException(string s)

Members

class Lucidtech::Las::Core::LimitExceededException

class Lucidtech::Las::Core::LimitExceededException
: public Lucidtech.Las.Core.ClientException

A LimitExceededException is raised if you have reached the limit of total requests per month associated with your credentials.

Summary

Members

Descriptions

publicLimitExceededException(string s)

Members

publicLimitExceededException(string s)

class Lucidtech::Las::Core::Prediction

A class that contains all the necessary information regarding a prediction performed by ApiClient.

Summary

Members

Descriptions

{property} stringConsentId

Consent id