## List Projects

`client.Projects.List(ctx, query) (*PaginatedCursor[Project], error)`

**get** `/api/v2/projects`

List projects in an organization. Requires `organization_id` or a project-scoped API key.

### Parameters

- `query ProjectListParams`

  - `Name param.Field[string]`

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

### Returns

- `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 Time`

    Creation datetime

  - `IsDefault bool`

    Whether this project is the default project for its organization.

  - `UpdatedAt Time`

    Update datetime

### Example

```go
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)
}
```

#### Response

```json
{
  "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
}
```
