Summary
| Members | Descriptions |
|---|---|
namespace Lucidtech::Las | |
namespace Lucidtech::Las::Core | |
namespace Lucidtech::Las::Utils |
namespace Lucidtech::Las
Summary
| Members | Descriptions |
|---|---|
class Lucidtech::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} 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
credentialsKeys, 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
-
generateSecretSet to false to ceate a Public app client, default: true -
logoutUrlsList of logout urls -
callbackUrlsList of callback urls -
loginUrlsList of login urls -
defaultLoginUrldefault login url -
attributesAdditional 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
-
maxResultsNumber of items to show on a single page -
nextTokenToken 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
-
appClientIdId of the appClient -
attributesAdditional 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("<appClientId>");
Parameters
appClientIdId 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
-
contentAsset content -
attributesAdditional 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
-
maxResultsNumber of items to show on a single page -
nextTokenToken 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
assetIdAsset 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
-
assetIdAsset ID -
contentNew content -
attributesAdditional attributes
Returns
Asset object
public object DeleteAsset(string assetId)
Delete an asset, calls the DELETE /assets/{assetId} endpoint.
var response = client.DeleteAsset("<assetId>");
Parameters
assetIdId 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
-
contentContent to POST -
contentTypeA mime type for the document handle -
consentIdAn identifier to mark the owner of the document handle -
datasetIdSpecifies the dataset to which the document will be associated with -
groundTruthA 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
-
consentIdAn identifier to mark the owner of the document handle -
datasetIdThe dataset id that contains the documents of interest -
maxResultsNumber of items to show on a single page -
nextTokenToken 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
documentIdThe 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
-
documentIdPath to document to upload, Same as provided to CreateDocument -
groundTruthA list of ground truth items -
datasetIdchange 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
-
consentIdDelete documents with provided consentId -
datasetIdDelete documents with provided datasetId -
maxResultsMaximum number of items to delete -
nextTokenToken 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
documentIdId 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
-
nameName of the dataset -
descriptionA 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
-
maxResultsNumber of items to show on a single page -
nextTokenToken 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
-
datasetIdId of the dataset -
attributesAdditional 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("<datasetId>");
Parameters
-
datasetIdId of the dataset -
deleteDocumentsSet 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
-
documentIdPath to document to upload Same as provided to CreateDocument -
modelIdId of the model to use for inference -
maxPagesMaximum number of pages to run predictions on -
autoRotateWhether or not to let the API try different rotations on the document when running -
extrasExtra 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
-
maxResultsNumber of items to show on a single page -
nextTokenToken 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
-
transitionIdOnly show logs from this transition -
transitionExecutionIdOnly show logs from this transition execution -
workflowIdOnly show logs from this workflow -
workflowExecutionIdOnly show logs from this workflow execution -
maxResultsNumber of items to show on a single page -
nextTokenToken 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
-
widthThe number of pixels to be used for the input image width of your model -
heightThe number of pixels to be used for the input image height of your model -
fieldConfigSpecification of the fields that the model is going to predict -
preprocessConfigSpecification of the processing steps prior to the prediction of an image -
nameName of the model -
descriptionDescription of the model -
attributesAdditional 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
-
maxResultsNumber of items to show on a single page -
nextTokenToken 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
modelIdId 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
-
modelIdId of the model -
widthThe number of pixels to be used for the input image width of your model -
heightThe number of pixels to be used for the input image height of your model -
fieldConfigSpecification of the fields that the model is going to predict -
preprocessConfigSpecification of the processing steps prior to the prediction of an image -
nameName of the model -
descriptionDescription of the model -
statusNew status for the model -
attributesAdditional 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
-
modelIdId of the model -
datasetIdsList of Dataset Ids that will be included in the data bundle
Parameters
-
nameName of the data bundle -
descriptionA 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
-
modelIdId of the model -
maxResultsNumber of items to show on a single page -
nextTokenToken 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
-
modelIdId of the model -
dataBundleIdId of the data bundle -
attributesAdditional 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
-
modelIdId of the model -
dataBundleIdId 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
-
dataA dictionary containing values to be hidden -
attributesAdditional 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
-
maxResultsNumber of items to show on a single page -
nextTokenToken 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
-
secretIdSecret ID -
dataNew data -
attributesAdditional attributes
public object DeleteSecret(string secretId)
Delete a secret, calls the DELETE /secrets/{secretId} endpoint.
var response = client.DeleteSecret("<secretId>");
Parameters
secretIdId 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
-
transitionTypeType of transition: "docker"|"manual" -
inputJsonSchemaJson-schema that defines the input to the transition -
outputJsonSchemaJson-schema that defines the output of the transition -
parametersParameters to the corresponding transition type -
attributesAdditional 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
-
transitionTypeType of transitions -
maxResultsNumber of items to show on a single page -
nextTokenToken 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
transitionIdId 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
transitionIdId 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
-
transitionIdId of the transition -
executionIdId 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
-
transitionIdId of the transition -
inputJsonSchemaJson-schema that defines the input to the transition -
outputJsonSchemaJson-schema that defines the output of the transition -
attributesAdditional 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
transitionIdId 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
-
transitionIdId of the transition -
statusStatus to filter by -
executionIdsList of execution ids to filter by -
maxResultsMaximum number of results to be returned -
nextTokenA unique token used to retrieve the next page -
sortByThe sorting variable of the execution: "endTime" | "startTime" -
orderOrder 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
-
transitionIdId of the transition -
statusesList of execution statuses to filter by -
executionIdsList of execution ids to filter by -
maxResultsMaximum number of results to be returned -
nextTokenA unique token used to retrieve the next page -
sortByThe sorting variable of the execution: "endTime" | "startTime" -
orderOrder 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
-
transitionIdId of the transition -
executionIdId of the execution -
statusStatus of the execution: "succeeded" | "failed" -
outputOutput from the execution, required when status is "succeeded" -
errorError from the execution, required when status is "failed" -
startTimeUtc 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
-
transitionIdId of the transition -
executionIdId 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
-
emailNew user's email -
attributesAdditional 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
-
maxResultsMaximum number of results to be returned -
nextTokenA 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
userIdId 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
userIdId 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
-
userIdId of the user -
attributesAttributes 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
-
specificationWorkflow specification. Currently only ASL is supported: https://states-language.net/spec.html -
errorConfigError handler configuration -
completedConfigConfiguration of a job to run whenever a workflow execution ends -
attributesAdditional 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
-
maxResultsMaximum number of results to be returned -
nextTokenA 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
-
workflowIdId of the workflow -
attributesAttributes 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
workflowIdId 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
workflowIdId 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
-
workflowIdId of the workflow -
contentInput 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
-
workflowIdId of the workflow -
statusWorkflow execution status to filter by -
maxResultsMaximum number of results to be returned -
nextTokenA unique token used to retrieve the next page -
sortByThe sorting variable of the execution: "endTime" | "startTime" -
orderOrder 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
-
workflowIdId of the workflow -
statusesWorkflow execution statuses to filter by -
maxResultsMaximum number of results to be returned -
nextTokenA unique token used to retrieve the next page -
sortByThe sorting variable of the execution: "endTime" | "startTime" -
orderOrder 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
-
workflowIdId of the workflow -
executionIdId 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
-
workflowIdId of the workflow -
executionIdId of the execution -
nextTransitionIdThe 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
-
workflowIdId of the workflow -
executionIdId of the execution
Returns
WorkflowExecution response from REST API
namespace Lucidtech::Las::Core
Summary
| Members | Descriptions |
|---|---|
class Lucidtech::Las::Core::ClientException | A ClientException is raised if the client refuses to send request due to incorrect usage or bad request data. |
class Lucidtech::Las::Core::Credentials | Used to fetch and store credentials. One of 3 conditions must be met to successfully create credentials. |
class Lucidtech::Las::Core::FeedbackResponse | The structured format of the response from a send feedback request. |
class Lucidtech::Las::Core::InvalidCredentialsException | An InvalidCredentialsException is raised if access key id or secret access key is invalid. |
class Lucidtech::Las::Core::LimitExceededException | A LimitExceededException is raised if you have reached the limit of total requests per month associated with your credentials. |
class Lucidtech::Las::Core::Prediction | A class that contains all the necessary information regarding a prediction performed by ApiClient. |
class Lucidtech::Las::Core::RequestException | A RequestException is raised if something went wrong with the request. |
class Lucidtech::Las::Core::RevokeResponse | The structured format of the response from a revoke consent request. |
class Lucidtech::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 |
|---|---|
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
| Members | Descriptions |
|---|---|
{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. |
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
-
clientIdclient id -
clientSecretclient secret -
authEndpointAuthorization endpoint -
apiEndpointAPI endpoint
Exceptions
ArgumentException
public Credentials(string credentialsPath)
Credentials constructor where the path to the credentials config is provided.
Parameters
credentialsPathPath 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
| Members | Descriptions |
|---|---|
{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. |
Members
{property} string DocumentId
Document id
{property} string ConsentId
Consent id