# V2 Projects

## List Projects

`V2ProjectListPage v2Projects().list(V2ProjectListParamsparams = V2ProjectListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

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

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

### Parameters

- `V2ProjectListParams params`

  - `Optional<String> name`

  - `Optional<String> organizationId`

  - `Optional<Long> pageSize`

  - `Optional<String> pageToken`

### Returns

- `class V2ProjectListResponse:`

  API response schema for a project.

  - `String id`

    The project's unique identifier.

  - `String name`

    The project's display name.

  - `String organizationId`

    The organization the project belongs to.

  - `Optional<LocalDateTime> createdAt`

    Creation datetime

  - `Optional<Boolean> isDefault`

    Whether this project is the default project for its organization.

  - `Optional<LocalDateTime> updatedAt`

    Update datetime

### Example

```java
package ai.llamaindex.llamacloud.example;

import ai.llamaindex.llamacloud.client.LlamaCloudClient;
import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;
import ai.llamaindex.llamacloud.models.v2projects.V2ProjectListPage;
import ai.llamaindex.llamacloud.models.v2projects.V2ProjectListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        V2ProjectListPage page = client.v2Projects().list();
    }
}
```

#### 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
}
```

## Get Project

`V2ProjectGetResponse v2Projects().get(V2ProjectGetParamsparams = V2ProjectGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

**get** `/api/v2/projects/{project_id}`

Get a project by ID.

### Parameters

- `V2ProjectGetParams params`

  - `Optional<String> projectId`

  - `Optional<String> organizationId`

### Returns

- `class V2ProjectGetResponse:`

  API response schema for a project.

  - `String id`

    The project's unique identifier.

  - `String name`

    The project's display name.

  - `String organizationId`

    The organization the project belongs to.

  - `Optional<LocalDateTime> createdAt`

    Creation datetime

  - `Optional<Boolean> isDefault`

    Whether this project is the default project for its organization.

  - `Optional<LocalDateTime> updatedAt`

    Update datetime

### Example

```java
package ai.llamaindex.llamacloud.example;

import ai.llamaindex.llamacloud.client.LlamaCloudClient;
import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;
import ai.llamaindex.llamacloud.models.v2projects.V2ProjectGetParams;
import ai.llamaindex.llamacloud.models.v2projects.V2ProjectGetResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        V2ProjectGetResponse v2Project = client.v2Projects().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
    }
}
```

#### Response

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