Skip to content
Framework Docs

Get Directory

DirectoryGetResponse beta().directories().get(DirectoryGetParamsparams = DirectoryGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/beta/directories/{directory_id}

Retrieve a directory by its identifier.

ParametersExpand Collapse
DirectoryGetParams params
Optional<String> directoryId
Optional<String> organizationId
Optional<String> projectId
ReturnsExpand Collapse
class DirectoryGetResponse:

API response schema for a directory.

String id

Unique identifier for the directory.

String name

Human-readable name for the directory.

minLength1
String projectId

Project the directory belongs to.

Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<LocalDateTime> deletedAt

Optional timestamp of when the directory was deleted. Null if not deleted.

formatdate-time
Optional<String> description

Optional description shown to users.

Optional<LocalDateTime> expiresAt

When this directory expires and is eligible for cleanup.

formatdate-time
Optional<SystemMetadata> systemMetadata

Reserved system-managed metadata.

Optional<Type> type

Directory type: ‘user’, ‘index’, ‘ephemeral’, or ‘system_ephemeral’.

One of the following:
USER("user")
INDEX("index")
EPHEMERAL("ephemeral")
SYSTEM_EPHEMERAL("system_ephemeral")
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time

Get Directory

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.beta.directories.DirectoryGetParams;
import com.llamacloud_prod.api.models.beta.directories.DirectoryGetResponse;

public final class Main {
    private Main() {}

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

        DirectoryGetResponse directory = client.beta().directories().get("directory_id");
    }
}
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "system_metadata": {
    "foo": "bar"
  },
  "type": "user",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "system_metadata": {
    "foo": "bar"
  },
  "type": "user",
  "updated_at": "2019-12-27T18:11:19.117Z"
}