Skip to content
Framework Docs

List Projects

client.Projects.List(ctx, query) (*[]Project, error)
GET/api/v1/projects

List projects or get one by name

ParametersExpand Collapse
query ProjectListParams
OrganizationID param.Field[string]optional
ProjectName param.Field[string]optional
ReturnsExpand Collapse
type ProjectListResponse []Project
ID string

Unique identifier

formatuuid
Name string
OrganizationID string

The Organization ID the project is under.

formatuuid
AdHocEvalDatasetID stringoptional
CreatedAt Timeoptional

Creation datetime

formatdate-time
IsDefault booloptional

Whether this project is the default project for the user.

UpdatedAt Timeoptional

Update datetime

formatdate-time

List Projects

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"),
  )
  projects, err := client.Projects.List(context.TODO(), llamacloudprod.ProjectListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", projects)
}
[
  {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "name": "x",
    "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "ad_hoc_eval_dataset_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "is_default": true,
    "updated_at": "2019-12-27T18:11:19.117Z"
  }
]
Returns Examples
[
  {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "name": "x",
    "organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "ad_hoc_eval_dataset_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "is_default": true,
    "updated_at": "2019-12-27T18:11:19.117Z"
  }
]