List Projects By User
client.Organizations.Users.ListProjects(ctx, userID, query) (*[]OrganizationUserListProjectsResponse, error)
GET/api/v1/organizations/{organization_id}/users/{user_id}/projects
List Projects By User
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"),
)
response, err := client.Organizations.Users.ListProjects(
context.TODO(),
"user_id",
llamacloudadmin.OrganizationUserListProjectsParams{
OrganizationID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
}
[
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "x",
"organization_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",
"created_at": "2019-12-27T18:11:19.117Z",
"is_default": true,
"updated_at": "2019-12-27T18:11:19.117Z"
}
]