Create Directory
client.beta.directories.create(DirectoryCreateParams { name, organization_id, project_id, 4 more } params, RequestOptionsoptions?): DirectoryCreateResponse { id, name, project_id, 7 more }
POST/api/v1/beta/directories
Create Directory
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 directory = await client.beta.directories.create({ name: 'x' });
console.log(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"
}