Skip to main content
Version: 2.0.0

Pipelines - Get multiple

caution

We have limited support for pipeline CRUD operations at this time. We hope to expand this in the future.

Get the pipelines associated with a given organization (through the supplied API key) using getPipelines(). Filter the pipeline output by certain parameters.

Arguments

params

This object has the type PipelineParams to filter retrieved pipeline objects by certain parameters.

Return value

An array of Pipeline objects. Consult the Pipeline type below for more information.

Types

🛠️ PipelineParams

The PipelineParams type is used to define parameters related to a pipeline. Here are the properties that can be included in PipelineParams:

label?

An optional label for the pipeline. If provided, it's a string.

slug?

An optional slug for the pipeline.

🛠️ Pipeline

The Pipeline type represents the structure of a pipeline in TypeScript. Below are the properties that define a Pipeline.

id

The unique identifier for the pipeline as a string.

createdAt

The timestamp when the pipeline was created as a string.

updatedAt

The timestamp when the pipeline was last updated as a string.

archivedAt?

The timestamp when the pipeline was archived as a string. This can be null if the pipeline has not been archived.

labels

An array of strings representing the labels attached to the pipeline.

displayName?

The display name of the pipeline. This can be null.

slug

The slug of the pipeline, used in URLs and as an identifier in the user interface.

organizationId

The identifier for the organization that owns the pipeline as a string.

branch?

The branch that the pipeline is associated with. This can be null.

Examples

typescript
import { init, getPipelines } from '@gentrace/core';
 
init({
apiKey: process.env.GENTRACE_API_KEY,
});
 
const pipelines = await getPipelines({
label: 'example-label',
slug: 'example-slug',
});
 
for (const pipeline of pipelines) {
console.log("Pipeline: ", pipeline.displayName, pipeline.slug);
}