Skip to content

Update Directory

client.Beta.Directories.Update(ctx, directoryID, params) (*BetaDirectoryUpdateResponse, error)
PATCH/api/v1/beta/directories/{directory_id}

Update directory metadata.

ParametersExpand Collapse
directoryID string
params BetaDirectoryUpdateParams
OrganizationID param.Field[string]optional

Query param

formatuuid
ProjectID param.Field[string]optional

Query param

formatuuid
Description param.Field[string]optional

Body param: Updated description for the directory.

Name param.Field[string]optional

Body param: Updated name for the directory.

minLength1
ReturnsExpand Collapse
type BetaDirectoryUpdateResponse struct{…}

API response schema for a directory.

ID string

Unique identifier for the directory.

Name string

Human-readable name for the directory.

minLength1
ProjectID string

Project the directory belongs to.

CreatedAt Timeoptional

Creation datetime

formatdate-time
DeletedAt Timeoptional

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

formatdate-time
Description stringoptional

Optional description shown to users.

UpdatedAt Timeoptional

Update datetime

formatdate-time

Update Directory

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/llamacloud-prod-go"
  "github.com/stainless-sdks/llamacloud-prod-go/option"
)

func main() {
  client := llamacloudprod.NewClient(
    option.WithAPIKey("My API Key"),
  )
  directory, err := client.Beta.Directories.Update(
    context.TODO(),
    "directory_id",
    llamacloudprod.BetaDirectoryUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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",
  "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",
  "updated_at": "2019-12-27T18:11:19.117Z"
}