Skip to content
Framework Docs

Get Project

client.Projects.Get(ctx, projectID, query) (*Project, error)
GET/api/v1/projects/{project_id}

Get a project by ID.

ParametersExpand Collapse
projectID string
query ProjectGetParams
OrganizationID param.Field[string]optional
ReturnsExpand Collapse
type Project struct{…}

Schema for a 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

Get Project

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"),
  )
  project, err := client.Projects.Get(
    context.TODO(),
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    llamacloudprod.ProjectGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", project.ID)
}
{
  "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"
}