Skip to content
Framework Docs

Update Pipeline File

PipelineFile pipelines().files().update(FileUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/api/v1/pipelines/{pipeline_id}/files/{file_id}

Update a file for a pipeline.

ParametersExpand Collapse
FileUpdateParams params
String pipelineId
Optional<String> fileId
Optional<CustomMetadata> customMetadata

Custom metadata for the file

class UnionMember0:
List<JsonValue>
String
double
boolean
ReturnsExpand Collapse
class PipelineFile:

A file associated with a pipeline.

String id

Unique identifier for the pipeline file.

formatuuid
String pipelineId

The ID of the pipeline that the file is associated with.

formatuuid
Optional<ConfigHash> configHash

Hashes for the configuration of the pipeline.

One of the following:
class UnionMember0:
List<JsonValue>
String
double
boolean
Optional<LocalDateTime> createdAt

When the pipeline file was created.

formatdate-time
Optional<CustomMetadata> customMetadata

Custom metadata for the file.

One of the following:
class UnionMember0:
List<JsonValue>
String
double
boolean
Optional<String> dataSourceId

The ID of the data source that the file belongs to.

formatuuid
Optional<String> externalFileId

The ID of the file in the external system.

Optional<String> fileId

The ID of the file.

formatuuid
Optional<Long> fileSize

Size of the file in bytes.

Optional<String> fileType

File type (e.g. pdf, docx, etc.).

Optional<Long> indexedPageCount

The number of pages that have been indexed for this file.

Optional<LocalDateTime> lastModifiedAt

The last modified time of the file.

formatdate-time
Optional<String> name

Name of the file.

Optional<PermissionInfo> permissionInfo

Permission information for the file.

One of the following:
class UnionMember0:
List<JsonValue>
String
double
boolean
Optional<String> projectId

The ID of the project that the file belongs to.

formatuuid
Optional<ResourceInfo> resourceInfo

Resource information for the file.

One of the following:
class UnionMember0:
List<JsonValue>
String
double
boolean
Optional<Status> status

Status of the pipeline file.

One of the following:
NOT_STARTED("NOT_STARTED")
IN_PROGRESS("IN_PROGRESS")
SUCCESS("SUCCESS")
ERROR("ERROR")
CANCELLED("CANCELLED")
Optional<LocalDateTime> statusUpdatedAt

The last time the status was updated.

formatdate-time
Optional<LocalDateTime> updatedAt

When the pipeline file was last updated.

formatdate-time

Update Pipeline File

package com.llamacloud_prod.api.example;

import com.llamacloud_prod.api.client.LlamaCloudClient;
import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;
import com.llamacloud_prod.api.models.pipelines.files.FileUpdateParams;
import com.llamacloud_prod.api.models.pipelines.files.PipelineFile;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        FileUpdateParams params = FileUpdateParams.builder()
            .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            .build();
        PipelineFile pipelineFile = client.pipelines().files().update(params);
    }
}
{
  "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": "file_type",
  "indexed_page_count": 0,
  "last_modified_at": "2019-12-27T18:11:19.117Z",
  "name": "name",
  "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": "file_type",
  "indexed_page_count": 0,
  "last_modified_at": "2019-12-27T18:11:19.117Z",
  "name": "name",
  "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"
}