POST
/
pipelines
const url: string = 'https://api.lume.ai"';
const headers = {'Content-Type': 'application/json', 'API-Key': '<lume_api_key>'};

const body = {
    name: "ordered_test_2",
    description: "ordered_test_2",
    target_schema: {
        type: "object",
        properties: {
            first_name: {
                type: "string",
                description: "The first name of the user"
            },
            last_name: {
                type: "string",
                description: "The last name of the user"
            }
        },
        required: ["first_name", "last_name"]
    }
};

fetch(`${'url'}/pipelines`, {
    method: 'POST',
    headers: headers,
    body: JSON.stringify(body),
})
.then(response => response.json())
.catch(err => console.error(err));
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "description": "<string>",
  "target_schema": {},
  "source_schema": {},
  "updated_at": "2023-11-07T05:31:56Z"
}

Creates a new pipeline.

See Target Schema Guide to learn more about the target_schema format requirements.

Authorizations

lume-api-key
string
headerrequired

Body

application/json
name
string
required

The name of the pipeline. Must be unique within the organization.

description
string | null

The description of the pipeline

target_schema
object
required

The target schema of the pipeline. In json-schema format.

Response

200 - application/json
id
string
required

The unique identifier of this object

created_at
string
required

The date and time this object was created

name
string
required

The name of the pipeline. Must be unique within the organization.

description
string | null

The description of the pipeline

target_schema
object
required

The target schema of the pipeline. In json-schema format.

source_schema
object | null

The source schema of the pipeline, infered from the pipeline's jobs. In json-schema format

updated_at
string | null
required

The date and time this object was last updated