Logo DataHubClient

ValidationApi Type

Client for ARC validation (CQC) results. Every ARC on a DataHub has a cqc branch holding the output of validation package runs, one folder per validated ARC branch, containing one <name>@<version> folder per package with badge.svg, validation_report.xml, and validation_summary.json. See the . All methods default ref to the cqc branch head; pass a commit SHA from ListHistoryAsync to read results from any point in the branch history.

Constructors

Constructor Description

ValidationApi(baseUrl, auth, http)

Full Usage: ValidationApi(baseUrl, auth, http)

Parameters:
Returns: ValidationApi
baseUrl : string
auth : Authentication
http : IHttpClient
Returns: ValidationApi

Instance members

Instance member Description

this.GetAllSummariesAsync

Full Usage: this.GetAllSummariesAsync

Parameters:
    projectId : int - The project identifier.
    ?branch : string - The validated ARC branch. Defaults to main.
    ?ref : string - The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<ResizeArray<ValidationSummary>>

Discovers the packages validated for an ARC branch and fetches every package's summary.

projectId : int

The project identifier.

?branch : string

The validated ARC branch. Defaults to main.

?ref : string

The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<ResizeArray<ValidationSummary>>

this.GetBadgeAsync

Full Usage: this.GetBadgeAsync

Parameters:
    projectId : int - The project identifier.
    package : ValidationPackageRef - The validation package whose results to read.
    ?ref : string - The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<string>

Gets a package's badge.svg as raw SVG text.

projectId : int

The project identifier.

package : ValidationPackageRef

The validation package whose results to read.

?ref : string

The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<string>

this.GetReportAsync

Full Usage: this.GetReportAsync

Parameters:
    projectId : int - The project identifier.
    package : ValidationPackageRef - The validation package whose results to read.
    ?ref : string - The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<string>

Gets a package's validation_report.xml (JUnit XML) as raw text.

projectId : int

The project identifier.

package : ValidationPackageRef

The validation package whose results to read.

?ref : string

The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<string>

this.GetSummaryAsync

Full Usage: this.GetSummaryAsync

Parameters:
    projectId : int - The project identifier.
    package : ValidationPackageRef - The validation package whose results to read.
    ?ref : string - The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<ValidationSummary>

Gets a package's validation_summary.json, decoded.

projectId : int

The project identifier.

package : ValidationPackageRef

The validation package whose results to read.

?ref : string

The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<ValidationSummary>

this.ListHistoryAsync

Full Usage: this.ListHistoryAsync

Parameters:
    projectId : int - The project identifier.
    ?branch : string - Optional validated ARC branch used to scope the history to that branch's result folder.
    ?ref : string - The results branch (or SHA to start from). Defaults to cqc.

Returns: Async<ResizeArray<Commit>>

Lists the commits of the cqc branch, newest first. Each SHA can be passed as ref to the other methods to read historic results.

projectId : int

The project identifier.

?branch : string

Optional validated ARC branch used to scope the history to that branch's result folder.

?ref : string

The results branch (or SHA to start from). Defaults to cqc.

Returns: Async<ResizeArray<Commit>>

this.ListPackagesAsync

Full Usage: this.ListPackagesAsync

Parameters:
    projectId : int - The project identifier.
    ?branch : string - The validated ARC branch. Defaults to main.
    ?ref : string - The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<ResizeArray<ValidationPackageRef>>

Lists the validation packages that produced results for an ARC branch, parsed from the <name>@<version> result folders. Folders without a version suffix are skipped.

projectId : int

The project identifier.

?branch : string

The validated ARC branch. Defaults to main.

?ref : string

The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<ResizeArray<ValidationPackageRef>>

this.ListValidatedBranchesAsync

Full Usage: this.ListValidatedBranchesAsync

Parameters:
    projectId : int - The project identifier.
    ?ref : string - The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<ResizeArray<string>>

Lists the ARC branches that have validation results — the top-level folders of the cqc branch (usually just main).

projectId : int

The project identifier.

?ref : string

The results branch or commit SHA to read from. Defaults to cqc.

Returns: Async<ResizeArray<string>>

Type something to start searching.