Skip to main content

Summary

MembersDescriptions
namespace Lucidtech::Las
namespace Lucidtech::Las::Core
namespace Lucidtech::Las::Utils

namespace Lucidtech::Las

Summary

MembersDescriptions
class Lucidtech::Las::ClientClient to invoke api methods from Lucidtech AI Services.

class Lucidtech::Las::Client

Client to invoke api methods from Lucidtech AI Services.

Summary

MembersDescriptions
{property} RestClient RestSharpClient
{property} Credentials LasCredentials
public Client(Credentials credentials)Client constructor.
public Client()Client constructor with credentials read from local file.
public object CreateAppClient(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 object ListAppClients(int? maxResults,string? nextToken)List available appClients, calls the GET /appClients endpoint.
public object UpdateAppClient(string appClientId,Dictionary< string, string?>? attributes)Updates an existing appClient, calls the PATCH /appClients/{appClientId} endpoint.
public object DeleteAppClient(string appClientId)Delete an appClient, calls the DELETE /appClients/{appClientId} endpoint.
public object CreateAsset(byte[] content,Dictionary< string, string?>? attributes)Creates an asset, calls the POST /assets endpoint.
public object ListAssets(int? maxResults,string? nextToken)List available assets, calls the GET /assets endpoint.
public object GetAsset(string assetId)Get asset from the REST API, calls the GET /assets/{assetId} endpoint.
public object UpdateAsset(string assetId,byte?[] content,Dictionary< string, string?>? attributes)Updates an asset, calls the PATCH /assets/{assetId} endpoint.
public object DeleteAsset(string assetId)Delete an asset, calls the DELETE /assets/{assetId} endpoint.
public object CreateDocument(byte[] content,string contentType,string? consentId,List< Dictionary< string, string >>? groundTruth,string? datasetId)Creates a document handle, calls the POST /documents endpoint
public object ListDocuments(string? consentId,int? maxResults,string? nextToken,string? datasetId)Get documents from the REST API, calls the GET /documents endpoint.
public object GetDocument(string documentId)Get document from the REST API, calls the GET /documents/{documentId} endpoint.
public object UpdateDocument(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 object DeleteDocuments(string? consentId,int? maxResults,string? nextToken,string? datasetId,bool deleteAll)Delete documents with specified consentId, calls DELETE /documents endpoint.
public object DeleteDocument(string documentId)Delete a document, calls the DELETE /documents/{documentId} endpoint.
public object CreateDataset(string? name,string? description)Create a dataset handle, calls the POST /datasets endpoint.
public object ListDatasets(int? maxResults,string? nextToken)List datasets available, calls the GET /datasets endpoint.
public object UpdateDataset(string datasetId,Dictionary< string, string?>? attributes)Updates an existing dataset, calls the PATCH /datasets/{datasetId} endpoint.
public object DeleteDataset(string datasetId,bool deleteDocuments)Delete a dataset, calls the DELETE /datasets/{datasetId} endpoint.
public object CreatePrediction(string documentId,string modelId,int? maxPages,bool? autoRotate,string? imageQuality,Dictionary< string, object >? postprocessConfig)Run inference and create a prediction, calls the POST /predictions endpoint.
public object ListPredictions(int? maxResults,string? nextToken)List predictions available, calls the GET /predictions endpoint.
public object ListLogs(string? transitionId,string? transitionExecutionId,string? workflowId,string? workflowExecutionId,int? maxResults,string? nextToken)List logs, calls the GET /logs endpoint.
public object CreateModel(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 object ListModels(int? maxResults,string? nextToken)List models available, calls the GET /models endpoint.
public object GetModel(string modelId)Get information about a specific model, calls the GET /models/{modelId} endpoint.
public object UpdateModel(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 object CreateDataBundle(string modelId,List< string > datasetIds,string? name,string? description)Create a data bundle handle, calls the POST /models/{modelId}/dataBundles endpoint.
public object ListDataBundles(string modelId,int? maxResults,string? nextToken)List data bundles available, calls the GET /models/{modelId}/dataBundles endpoint.
public object UpdateDataBundle(string modelId,string dataBundleId,Dictionary< string, string?>? attributes)Updates an existing data bundle, calls the PATCH /models/{modelId}/dataBundles/{dataBundleId} endpoint.
public object DeleteDataBundle(string modelId,string dataBundleId)Delete a data bundle, calls the DELETE /models/{modelId}/dataBundles/{dataBundleId} endpoint.
public object CreateSecret(Dictionary< string, string > data,Dictionary< string, string?>? attributes)Creates an secret, calls the POST /secrets endpoint.
public object ListSecrets(int? maxResults,string? nextToken)List secrets available, calls the GET /secrets endpoint.
public object UpdateSecret(string secretId,Dictionary< string, string >? data,Dictionary< string, string?>? attributes)Updates a secret, calls the PATCH /secrets/secretId endpoint.
public object DeleteSecret(string secretId)Delete a secret, calls the DELETE /secrets/{secretId} endpoint.
public object CreateTransition(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 object ListTransitions(string? transitionType,int? maxResults,string? nextToken)List transitions, calls the GET /transitions endpoint.
public object GetTransition(string transitionId)Get information about a specific transition, calls the GET /transitions/{transition_id} endpoint.
public object DeleteTransition(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 object GetTransitionExecution(string transitionId,string executionId)Get an execution of a transition, calls the GET /transitions/{transitionId}/executions/{executionId} endpoint
public object UpdateTransition(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 object ExecuteTransition(string transitionId)Start executing a manual transition, calls the POST /transitions/{transitionId}/executions endpoint.
public object ListTransitionExecutions(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 object ListTransitionExecutions(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 object UpdateTransitionExecution(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 object SendHeartbeat(string transitionId,string executionId)Send heartbeat for a manual execution, calls the POST /transitions/{transitionId}/executions/{executionId}/heartbeats endpoint.
public object CreateUser(string email,Dictionary< string, string?>? attributes)Creates a new user, calls the POST /users endpoint.
public object ListUsers(int? maxResults,string? nextToken)List users, calls the GET /users endpoint.
public object GetUser(string userId)Get information about a specific user, calls the GET /users/{user_id} endpoint.
public object DeleteUser(string userId)Delete the user with the provided user_id, calls the DELETE /users/{userId} endpoint.
public object UpdateUser(string userId,Dictionary< string, object?> attributes)Updates a user, calls the PATCH /users/{userId} endpoint.
public object CreateWorkflow(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 object ListWorkflows(int? maxResults,string nextToken)List workflows, calls the GET /workflows endpoint.
public object UpdateWorkflow(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 object GetWorkflow(string workflowId)Get information about a specific workflow, calls the GET /workflows/{workflow_id} endpoint.
public object DeleteWorkflow(string workflowId)Delete the workflow with the provided workflow_id, calls the DELETE /workflows/{workflowId} endpoint.
public object ExecuteWorkflow(string workflowId,Dictionary< string, object > content)Start a workflow execution, calls the POST /workflows/{workflowId}/executions endpoint.
public object ListWorkflowExecutions(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 object ListWorkflowExecutions(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 object GetWorkflowExecution(string workflowId,string executionId)Get an execution of a workflow, calls the GET /workflows/{workflowId}/executions/{executionId} endpoint
public object UpdateWorkflowExecution(string workflowId,string executionId,string nextTransitionId)Retry or end the processing of a workflow execution, calls the PATCH /workflows/{workflowId}/executions/{executionId} endpoint.
public object DeleteWorkflowExecution(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} RestClient RestSharpClient

{property} Credentials LasCredentials

public Client(Credentials credentials)

Client constructor.

Parameters

  • credentials Keys, endpoints and credentials needed for authorization

public Client()

Client constructor with credentials read from local file.

public object CreateAppClient(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 object ListAppClients(int? maxResults,string? nextToken)

List available appClients, calls the GET /appClients endpoint.

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 object UpdateAppClient(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 object DeleteAppClient(string appClientId)

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

var response = client.DeleteAppClient("&lt;appClientId&gt;");

Parameters

  • appClientId Id of the appClient

Returns

AppClient response from REST API

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

Creates an asset, calls the POST /assets endpoint.

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

Parameters

  • content Asset content

  • attributes Additional attributes

Returns

Asset response from REST API

public object ListAssets(int? maxResults,string? nextToken)

List available assets, calls the GET /assets endpoint.

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 object GetAsset(string assetId)

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

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

Parameters

  • assetId Asset ID

Returns

Asset object

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

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

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 object DeleteAsset(string assetId)

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

var response = client.DeleteAsset("&lt;assetId&gt;");

Parameters

  • assetId Id of the asset

Returns

Asset response from REST API

public object CreateDocument(byte[] content,string contentType,string? consentId,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

  • 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 documentId, contentType and consentId

public object ListDocuments(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

var response = client.ListDocuments('<datasetId>');

Parameters

  • 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

public object GetDocument(string documentId)

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

Get information of document specified by documentId

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 object UpdateDocument(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 object DeleteDocuments(string? consentId,int? maxResults,string? nextToken,string? datasetId,bool deleteAll)

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

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

Parameters

  • 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 object DeleteDocument(string documentId)

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

Parameters

  • documentId Id of the document

Returns

Document response from REST API

public object CreateDataset(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 datasetId

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 object ListDatasets(int? maxResults,string? nextToken)

List datasets available, calls the GET /datasets endpoint.

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 object UpdateDataset(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 object DeleteDataset(string datasetId,bool deleteDocuments)

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

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 object CreatePrediction(string documentId,string modelId,int? maxPages,bool? autoRotate,string? imageQuality,Dictionary< string, object >? postprocessConfig)

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 documentId

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 object ListPredictions(int? maxResults,string? nextToken)

List predictions available, calls the GET /predictions endpoint.

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 object ListLogs(string? transitionId,string? transitionExecutionId,string? workflowId,string? workflowExecutionId,int? maxResults,string? nextToken)

List logs, calls the GET /logs endpoint.

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 object CreateModel(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 object ListModels(int? maxResults,string? nextToken)

List models available, calls the GET /models endpoint.

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 object GetModel(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 object UpdateModel(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 object CreateDataBundle(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 object ListDataBundles(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 object UpdateDataBundle(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 object DeleteDataBundle(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 object CreateSecret(Dictionary< string, string > data,Dictionary< string, string?>? attributes)

Creates an secret, calls the POST /secrets endpoint.

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 object ListSecrets(int? maxResults,string? nextToken)

List secrets available, calls the GET /secrets endpoint.

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 object UpdateSecret(string secretId,Dictionary< string, string >? data,Dictionary< string, string?>? attributes)

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

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 object DeleteSecret(string secretId)

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

var response = client.DeleteSecret("&lt;secretId&gt;");

Parameters

  • secretId Id of the secret

Returns

Secret response from REST API

public object CreateTransition(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.

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 object ListTransitions(string? transitionType,int? maxResults,string? nextToken)

List transitions, calls the GET /transitions endpoint.

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 object GetTransition(string transitionId)

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

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

Parameters

  • transitionId Id of the transition

Returns

Transition response from REST API

public object DeleteTransition(string transitionId)

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

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

Parameters

  • transitionId Id of the transition

Returns

Transition response from REST API

public object GetTransitionExecution(string transitionId,string executionId)

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

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 object UpdateTransition(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.

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 object ExecuteTransition(string transitionId)

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

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

Parameters

  • transitionId Id of the transition

Returns

Transition exexution response from REST API

public object ListTransitionExecutions(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.

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 object ListTransitionExecutions(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.

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 object UpdateTransitionExecution(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.

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 object SendHeartbeat(string transitionId,string executionId)

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

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 object CreateUser(string email,Dictionary< string, string?>? attributes)

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

var response = client.CreateUser("foo@bar.com");

Parameters

  • email New user's email

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

Returns

User response from REST API

public object ListUsers(int? maxResults,string? nextToken)

List users, calls the GET /users endpoint.

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 object GetUser(string userId)

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

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

Parameters

  • userId Id of the user

Returns

User response from REST API

public object DeleteUser(string userId)

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

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

Parameters

  • userId Id of the user

Returns

User response from REST API

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

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

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 object CreateWorkflow(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.

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", "foo@example.com"},
{"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 object ListWorkflows(int? maxResults,string nextToken)

List workflows, calls the GET /workflows endpoint.

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 object UpdateWorkflow(string workflowId,Dictionary< string, object >? errorConfig,Dictionary< string, object >? completedConfig,Dictionary< string, string?> attributes)

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

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 object GetWorkflow(string workflowId)

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

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

Parameters

  • workflowId Id of the workflow

Returns

Workflow response from REST API

public object DeleteWorkflow(string workflowId)

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

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

Parameters

  • workflowId Id of the workflow

Returns

Workflow response from REST API

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

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

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 object ListWorkflowExecutions(string workflowId,string? status,int? maxResults,string? nextToken,string? sortBy,string? order)

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

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 object ListWorkflowExecutions(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.

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 object GetWorkflowExecution(string workflowId,string executionId)

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

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 object UpdateWorkflowExecution(string workflowId,string executionId,string nextTransitionId)

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

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 object DeleteWorkflowExecution(string workflowId,string executionId)

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

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

MembersDescriptions
class Lucidtech::Las::Core::ClientExceptionA ClientException is raised if the client refuses to send request due to incorrect usage or bad request data.
class Lucidtech::Las::Core::CredentialsUsed to fetch and store credentials. One of 3 conditions must be met to successfully create credentials.
class Lucidtech::Las::Core::FeedbackResponseThe structured format of the response from a send feedback request.
class Lucidtech::Las::Core::InvalidCredentialsExceptionAn InvalidCredentialsException is raised if access key id or secret access key is invalid.
class Lucidtech::Las::Core::LimitExceededExceptionA LimitExceededException is raised if you have reached the limit of total requests per month associated with your credentials.
class Lucidtech::Las::Core::PredictionA class that contains all the necessary information regarding a prediction performed by ApiClient.
class Lucidtech::Las::Core::RequestExceptionA RequestException is raised if something went wrong with the request.
class Lucidtech::Las::Core::RevokeResponseThe structured format of the response from a revoke consent request.
class Lucidtech::Las::Core::TooManyRequestsExceptionA 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

MembersDescriptions
public ClientException(string s)

Members

public ClientException(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, 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 hello@lucidtech.ai

Summary

MembersDescriptions
{property} string ClientIdClient ID. Provided by Lucidtech.
{property} string ClientSecretClient Secret. Provided by Lucidtech.
{property} string AuthEndpointAWS Authorization endpoint. Provided by Lucidtech.
{property} string ApiEndpointAWS API Gateway API endpoint. Provided by Lucidtech.
{property} RestClient RestSharpClientRestClient for making request to the authorization endpoint.
public string GetAccessToken()Get Access token to API endpoint.
public Credentials(string clientId,string clientSecret,string authEndpoint,string apiEndpoint)Credentials constructor where ClientId, ClientSecret, AuthEndpoint and ApiEndpoint are provided by Lucidtech.
public Credentials(string credentialsPath)Credentials constructor where the path to the credentials config is provided.
public Credentials()Credentials constructor where the credentials are located at the default path. ~/.lucidtech/credentials.cfg for linux and USERPROFILE%.lucidtech\credentials.cfg for Windows.
protected string
protected virtual void CommonConstructor()

Members

{property} string ClientId

Client ID. Provided by Lucidtech.

{property} string ClientSecret

Client Secret. Provided by Lucidtech.

{property} string AuthEndpoint

AWS Authorization endpoint. Provided by Lucidtech.

{property} string ApiEndpoint

AWS API Gateway API endpoint. Provided by Lucidtech.

{property} RestClient RestSharpClient

RestClient for making request to the authorization endpoint.

public string GetAccessToken()

Get Access token to API endpoint.

public Credentials(string clientId,string clientSecret,string authEndpoint,string apiEndpoint)

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

Parameters

  • clientId client id

  • clientSecret client secret

  • authEndpoint Authorization endpoint

  • apiEndpoint API endpoint

Exceptions

  • ArgumentException

public Credentials(string credentialsPath)

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

Parameters

  • credentialsPath Path to the file where the credentials are stored

public Credentials()

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

protected string

protected virtual void CommonConstructor()

class Lucidtech::Las::Core::FeedbackResponse

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

Summary

MembersDescriptions
{property} string DocumentIdDocument id
{property} string ConsentIdConsent id
{property} string ContentTypeContent type
{property} List< Dictionary< string, string > > FeedbackThe same information as was uploaded as feedback.
public FeedbackResponse(object response)
public string ToJsonString(Formatting format)Convert an object of this class to a string ready to be interpreted as a json object.

Members

{property} string DocumentId

Document id

{property} string ConsentId

Consent id

{property} string ContentType

Content type

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

The same information as was uploaded as feedback.

public FeedbackResponse(object response)

public string ToJsonString(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 access key id or secret access key is invalid.

Summary

MembersDescriptions
public InvalidCredentialsException(string s)

Members

public InvalidCredentialsException(string s)

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

MembersDescriptions
public LimitExceededException(string s)

Members

public LimitExceededException(string s)

class Lucidtech::Las::Core::Prediction

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

Summary

MembersDescriptions
{property} string ConsentIdConsent id
{property} string ModelNameUpload url
{property} string DocumentIdDocument id
{property} List< Dictionary< string, object > > FieldsA list of the responses from a prediction
public Prediction(string documentId,string consentId,string modelName,List< Dictionary< string, object >> predictionResponse)Constructor of s Prediction object
public string ToJsonString(Formatting format)Convert an object of this class to a string ready to be interpreted as a json object.

Members

{property} string ConsentId

Consent id

{property} string ModelName

Upload url

{property} string DocumentId

Document id

{property} List< Dictionary< string, object > > Fields

A list of the responses from a prediction

public Prediction(string documentId,string consentId,string modelName,List< Dictionary< string, object >> predictionResponse)

Constructor of s Prediction object

Parameters

  • documentId The id of the document used in the prediction

  • consentId The consent id

  • modelName The name of the model used

  • predictionResponse The response from prediction

public string ToJsonString(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::RequestException

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

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

Summary

MembersDescriptions
{property} IRestResponse Response
public RequestException(string s)
public RequestException(IRestResponse response)

Members

{property} IRestResponse Response

public RequestException(string s)

public RequestException(IRestResponse response)

class Lucidtech::Las::Core::RevokeResponse

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

Summary

MembersDescriptions
{property} string ConsentIdThe consent Id where documents where deleted.
{property} List< string > DocumentIdsThe document Ids of the deleted documents.
public RevokeResponse(object deleteConsentResponse)
public string ToJsonString(Formatting format)Convert an object of this class to a string ready to be interpreted as a json object.

Members

{property} string ConsentId

The consent Id where documents where deleted.

{property} List< string > DocumentIds

The document Ids of the deleted documents.

public RevokeResponse(object deleteConsentResponse)

public string ToJsonString(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::TooManyRequestsException

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

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

Summary

MembersDescriptions
public TooManyRequestsException(string s)

Members

public TooManyRequestsException(string s)

namespace Lucidtech::Las::Utils

Summary

MembersDescriptions
class Lucidtech::Las::Utils::FileTypeHelp determine the type of a file, inspired by pythons imghdr.what().
class Lucidtech::Las::Utils::JsonSerialPublisherA Json publishes that allows the user to serialize and deserialize back and forth between serialized json objects and deserialized general objects and specific Dictionaries.

class Lucidtech::Las::Utils::FileType

Help determine the type of a file, inspired by pythons imghdr.what().

Summary

MembersDescriptions

Members

class Lucidtech::Las::Utils::JsonSerialPublisher

class Lucidtech::Las::Utils::JsonSerialPublisher
: public ISerializer
: public IDeserializer

A Json publishes that allows the user to serialize and deserialize back and forth between serialized json objects and deserialized general objects and specific Dictionaries.

Summary

MembersDescriptions
{property} string ContentType
public JsonSerialPublisher(Newtonsoft.Json.JsonSerializer serializer)
public string Serialize(object obj)Serialize a general object.
public T Deserialize< T >(IRestResponse response)Deserialize the content of an IRestResponse.

Members

{property} string ContentType

public JsonSerialPublisher(Newtonsoft.Json.JsonSerializer serializer)

public string Serialize(object obj)

Serialize a general object.

Parameters

  • obj A general object to be serialized

Returns

A string ready to be interpreted as a json file

public T Deserialize< T >(IRestResponse response)

Deserialize the content of an IRestResponse.

Parameters

  • response The response from a request performed by RestSharp.RestClient

Parameters

  • T The type of the output, e.g. Dictionary or a List of some sort

Returns

A deserialized object of type T

Generated by Moxygen