Skip to content
Framework Docs

Read File Content

PresignedUrl files().get(FileGetParamsparams = FileGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/beta/files/{file_id}/content

Get a presigned URL to download the file content.

ParametersExpand Collapse
FileGetParams params
Optional<String> fileId
Optional<Long> expiresAtSeconds
Optional<String> organizationId
Optional<String> projectId
ReturnsExpand Collapse
class PresignedUrl:

Schema for a presigned URL.

LocalDateTime expiresAt

The time at which the presigned URL expires

formatdate-time
String url

A presigned URL for IO operations against a private file

minLength1
formaturi
Optional<FormFields> formFields

Form fields for a presigned POST request

Read File Content

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.files.FileGetParams;
import com.llamacloud_prod.api.models.files.PresignedUrl;

public final class Main {
    private Main() {}

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

        PresignedUrl presignedUrl = client.files().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
    }
}
{
  "expires_at": "2019-12-27T18:11:19.117Z",
  "url": "https://example.com",
  "form_fields": {
    "foo": "string"
  }
}
Returns Examples
{
  "expires_at": "2019-12-27T18:11:19.117Z",
  "url": "https://example.com",
  "form_fields": {
    "foo": "string"
  }
}