Skip to main content

Interface IArtifactMetadataLookupClient

Defines the contract for retrieving artifact metadata from the Xperiflow system.

Namespace: Workspace.XBR.Xperiflow.Routines.Artifacts

Assembly: Xperiflow.dll

Declaration
public interface IArtifactMetadataLookupClient

Examples

Basic usage example:

// Get all artifacts for a routine instance
var instanceArtifacts = await client.GetByInstanceIdentifierAsync("instance-123").Result;

// Get artifacts from a specific run
var runArtifacts = await client.GetByRunIdentifierAsync("instance-123", "run-456").Result;

// Find a specific artifact by qualified key
var artifact = client.GetByQualifiedKeyAsync("instance-123", "run-456", "output.dataframe").Result;

Remarks

The Workspace.XBR.Xperiflow.Routines.Artifacts.IArtifactMetadataLookupClient provides methods for querying artifact metadata using various lookup strategies. This interface enables efficient retrieval of artifact information without requiring full artifact data access.

Lookup Strategies:

  • Instance-Based LookupRetrieve all artifacts associated with a specific routine instance

  • Run-Based LookupRetrieve all artifacts from a specific routine run

  • Path-Based LookupFind artifacts by their storage path

  • Qualified Key LookupRetrieve specific artifacts using their qualified key within a run

Implementation Notes:

Implementations should handle authentication, caching, and error handling for artifact metadata retrieval. All methods support cancellation tokens for responsive operations.

Methods

GetByInstanceIdentifierAsync(string, CancellationToken)

Retrieves all artifact metadata associated with the specified routine instance.

Declaration
Task<List<ArtifactMetadata>> GetByInstanceIdentifierAsync(string instanceIdentifier, CancellationToken cancellationToken = default)
Remarks

This method retrieves metadata for all artifacts that have been created by any run of the specified routine instance. The results include artifacts from all runs, both completed and in-progress.

Returns

Task<System.Collections.Generic.List{Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactMetadata}>

A task that represents the asynchronous operation. The task result contains a list of Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactMetadata objects for all artifacts associated with the specified instance.

Parameters
TypeNameDescription
System.StringinstanceIdentifierThe unique identifier of the routine instance
System.Threading.CancellationTokencancellationTokenToken to monitor for cancellation requests
Exceptions

System.ArgumentException Thrown when instanceIdentifier is null or empty Workspace.XBR.Xperiflow.Routines.RoutineClientException Thrown when an error occurs during artifact metadata retrieval

GetByRunIdentifierAsync(string, string, CancellationToken)

Retrieves all artifact metadata for the specified routine run.

Declaration
Task<List<ArtifactMetadata>> GetByRunIdentifierAsync(string instanceIdentifier, string runIdentifier, CancellationToken cancellationToken = default)
Remarks

This method retrieves metadata for all artifacts that were created during the specified routine run. This provides a focused view of artifacts from a single execution context.

Returns

Task<System.Collections.Generic.List{Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactMetadata}>

A task that represents the asynchronous operation. The task result contains a list of Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactMetadata objects for all artifacts created by the specified run.

Parameters
TypeNameDescription
System.StringinstanceIdentifierThe unique identifier of the routine instance
System.StringrunIdentifierThe unique identifier of the routine run
System.Threading.CancellationTokencancellationTokenToken to monitor for cancellation requests
Exceptions

System.ArgumentException Thrown when instanceIdentifier or runIdentifier is null or empty Workspace.XBR.Xperiflow.Routines.RoutineClientException Thrown when an error occurs during artifact metadata retrieval

GetByPathAsync(string, CancellationToken)

Retrieves artifact metadata for the artifact at the specified storage path.

Declaration
Task<ArtifactMetadata?> GetByPathAsync(string artifactPath, CancellationToken cancellationToken = default)
Remarks

This method enables path-based artifact discovery, which is useful when working with artifacts through file system operations or when the artifact path is known but the routine context is not.

Returns

Task< Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactMetadata >

A task that represents the asynchronous operation. The task result contains the Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactMetadata if found, or null if no artifact exists at the specified path.

Parameters
TypeNameDescription
System.StringartifactPathThe storage path of the artifact
System.Threading.CancellationTokencancellationTokenToken to monitor for cancellation requests
Exceptions

System.ArgumentException Thrown when artifactPath is null or empty Workspace.XBR.Xperiflow.Routines.RoutineClientException Thrown when an error occurs during artifact metadata retrieval

GetByQualifiedKeyAsync(string, string, string, CancellationToken)

Retrieves artifact metadata for the artifact with the specified qualified key within a routine run.

Declaration
Task<ArtifactMetadata?> GetByQualifiedKeyAsync(string instanceIdentifier, string runIdentifier, string qualifiedKey, CancellationToken cancellationToken = default)
Remarks

This method provides the most specific artifact lookup mechanism, allowing retrieval of individual artifacts by their qualified key within a specific run context. The qualified key is a dot-delimited path that uniquely identifies the artifact within the run's output structure.

Returns

Task< Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactMetadata >

A task that represents the asynchronous operation. The task result contains the Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactMetadata if found, or null if no artifact with the specified qualified key exists in the run.

Parameters
TypeNameDescription
System.StringinstanceIdentifierThe unique identifier of the routine instance
System.StringrunIdentifierThe unique identifier of the routine run
System.StringqualifiedKeyThe qualified key of the artifact (e.g., "output.dataframe", "results.metrics")
System.Threading.CancellationTokencancellationTokenToken to monitor for cancellation requests
Exceptions

System.ArgumentException Thrown when any parameter is null or empty Workspace.XBR.Xperiflow.Routines.RoutineClientException Thrown when an error occurs during artifact metadata retrieval

Was this page helpful?