Skip to content
Product Docs

Get Project

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

Get a project by ID.

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

API response schema for a project.

ID string

The project’s unique identifier.

Name string

The project’s display name.

OrganizationID string

The organization the project belongs to.

CreatedAt TimeOptional

Creation datetime

formatdate-time
IsDefault boolOptional

Whether this project is the default project for its organization.

UpdatedAt TimeOptional

Update datetime

formatdate-time

Get Project

package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llamacloud-admin-go"
  "github.com/run-llama/llamacloud-admin-go/option"
)

func main() {
  client := llamacloudadmin.NewClient(
    option.WithAPIKey("My API Key"),
  )
  project, err := client.Projects.Get(
    context.TODO(),
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    llamacloudadmin.ProjectGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", project.ID)
}
{
  "id": "id",
  "name": "name",
  "organization_id": "organization_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "is_default": true,
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "id",
  "name": "name",
  "organization_id": "organization_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "is_default": true,
  "updated_at": "2019-12-27T18:11:19.117Z"
}