List projects in an organization. Requires organization_id or a project-scoped API key.
List Projects
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"),
)
page, err := client.Projects.List(context.TODO(), llamacloudadmin.ProjectListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"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"
}
],
"next_page_token": "next_page_token",
"total_size": 0
}Returns Examples
{
"items": [
{
"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"
}
],
"next_page_token": "next_page_token",
"total_size": 0
}