Add Files To Pipeline Api
client.pipelines.files.create(stringpipelineID, FileCreateParams { body } params, RequestOptionsoptions?): FileCreateResponse { id, pipeline_id, config_hash, 16 more }
PUT/api/v1/pipelines/{pipeline_id}/files
Add files to a pipeline.
Parameters
pipelineID: string
Returns
Add Files To Pipeline Api
import LlamaCloud from '@llamaindex/llama-cloud';
const client = new LlamaCloud({
apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});
const pipelineFiles = await client.pipelines.files.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
body: [{ file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],
});
console.log(pipelineFiles);[
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"config_hash": {
"foo": {
"foo": "bar"
}
},
"created_at": "2019-12-27T18:11:19.117Z",
"custom_metadata": {
"foo": {
"foo": "bar"
}
},
"data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"external_file_id": "external_file_id",
"file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"file_size": 0,
"file_type": "x",
"indexed_page_count": 0,
"last_modified_at": "2019-12-27T18:11:19.117Z",
"name": "x",
"permission_info": {
"foo": {
"foo": "bar"
}
},
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"resource_info": {
"foo": {
"foo": "bar"
}
},
"status": "NOT_STARTED",
"status_updated_at": "2019-12-27T18:11:19.117Z",
"updated_at": "2019-12-27T18:11:19.117Z"
}
]Returns Examples
[
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"config_hash": {
"foo": {
"foo": "bar"
}
},
"created_at": "2019-12-27T18:11:19.117Z",
"custom_metadata": {
"foo": {
"foo": "bar"
}
},
"data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"external_file_id": "external_file_id",
"file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"file_size": 0,
"file_type": "x",
"indexed_page_count": 0,
"last_modified_at": "2019-12-27T18:11:19.117Z",
"name": "x",
"permission_info": {
"foo": {
"foo": "bar"
}
},
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"resource_info": {
"foo": {
"foo": "bar"
}
},
"status": "NOT_STARTED",
"status_updated_at": "2019-12-27T18:11:19.117Z",
"updated_at": "2019-12-27T18:11:19.117Z"
}
]