Result Files¶
Result Files or Artifacts are files that can be created or consumed during the processing of a task.
In this section you will find how to manipulate these files via SDK.
BotCity Orchestrator
You can view the Result Files functionality directly on the BotCity Orchestrator platform.
See more at:
Send an artifact¶
When executing a task, files of any type can be produced as a result of the processing.
You can send files of any type to the BotCity Orchestrator using the SDK. You need the following information:
- Task ID: Reference of the task that will receive the file.
- Artifact Name: Give a name and extension to the file that will be available in the Orchestrator.
- Path: Define the path in the execution environment where the file is located.
File Size
It is recommended that a file be smaller than 100MB for the transfer to occur without issues.
Example of sending a file:
Listing all artifacts¶
You can list the result files available in the BotCity Orchestrator using the SDK. You need the following information:
- Days: Filter by number of days from the current date.
Default parameter
When the number of days is not provided, files from the last 7 days are returned by default.
Example of how to list files:
Return example
The artifact list is a list of Artifact objects.
Download an artifact¶
You can download the result files available in the BotCity Orchestrator using the SDK. You need the following information:
- Artifact ID: Identification number of the file to download it.
Return
The default return is the file name and a byte array with the binary content of the artifact that can be saved locally.
Example of how to download files:
using System;
using System.IO;
// Define artifact ID
string artifactId = "<ARTIFACT_ID>";
// Get artifact content
var (fileName, fileContent) = await maestro.GetArtifactAsync(artifactId);
string filePath = Path.Combine(Environment.CurrentDirectory, fileName);
// Write to disk
await File.WriteAllBytesAsync(filePath, fileContent);