> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platform.toloka.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# client.pipelines.export()

> Export a pipeline.

Return a document containing the pipeline name and graph for import into another project. The attached dataset is omitted.

## Signature

Method signature on `client.pipelines`:

```ts theme={null}
export(args: {
  pipelineId: string;
}): Promise<{ name: string; graph: PipelineGraphV1 }>;
```

## Parameters

**pipelineId** `string` *required*

Pipeline ID with prefix `pl.`.

## Returns

`Promise<{ name: string; graph: PipelineGraphV1 }>`

**name** `string` *required*

Name of the pipeline.

**graph** `PipelineGraphV1` *required*

Pipeline graph in version 1 of the public graph format.

**Fields**

**version** `1` *required*

Graph format version; always 1.

**fields** `object[]` *required*

Fields used by the pipeline, with names and JSON Schemas.

See the [HTTP endpoint](https://docs.platform.toloka.ai/docs/api-reference/pipelines/export-pipeline.md) for the complete schema.

**nodes** `(RootNode | CodeNode | GenerationNode | MatchNode | QuorumNode)[]` *required*

Nodes that make up the pipeline.

See the [HTTP endpoint](https://docs.platform.toloka.ai/docs/api-reference/pipelines/export-pipeline.md) for the complete schema.

**connections** `object[]` *required*

Directed connections between node handles.

See the [HTTP endpoint](https://docs.platform.toloka.ai/docs/api-reference/pipelines/export-pipeline.md) for the complete schema.

**layout** `object`

Optional node positions for the visual editor, keyed by node ID and block group; each position is an \[x, y] pair.

**Fields**

**\[key: string]** `object`

## Errors

HTTP errors throw [`PotatoApiError`](https://docs.platform.toloka.ai/docs/sdk/errors). The endpoint documents these error responses:

| Status | Description |
| - | - |
| 404 | Pipeline not found |
| 409 | Pipeline graph contains a field schema that cannot be exported |
| 429 | Rate limit exceeded |

HTTP endpoint: [`GET /pipelines/{pipelineId}/export`](https://docs.platform.toloka.ai/docs/api-reference/pipelines/export-pipeline).

```ts export() theme={null}
import { createClient } from "@toloka-platform/sdk";

const client = createClient({
  baseUrl: "https://platform.toloka.ai",
  apiKey: process.env.TOLOKA_API_KEY!,
});

const exportedPipeline = await client.pipelines.export({
  pipelineId: "pl.019a0000-0000-7000-8000-000000000001"
});
console.log(exportedPipeline);
```

Nested values in this example are abbreviated. The HTTP endpoint has the complete schema.

```json export() theme={null}
{
  "name": "<string>",
  "graph": {
    "version": 1,
    "fields": [
      {
        "id": "example",
        "name": "<string>",
        "jsonSchema": {}
      }
    ],
    "nodes": [
      {
        "id": "example",
        "type": "root",
        "settings": {
          "startedFieldProxies": {},
          "completedFieldProxies": {}
        }
      }
    ],
    "connections": [
      {
        "from": {
          "node": "example",
          "handle": "example"
        },
        "to": {
          "node": "example",
          "handle": "example"
        },
        "settings": {}
      }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.