# Projects

## Create Project

`$ nirvana projects create`

**post** `/v1/projects`

Create a new project

### Parameters

- `--name: string`

  Project name.

- `--tag: optional array of string`

  Tags to attach to the Project.

### Returns

- `project: object { id, created_at, name, 3 more }`

  Project response.

  - `id: string`

    Project ID.

  - `created_at: string`

    When the Project was created.

  - `name: string`

    Project name.

  - `resources: object { blockchain, cloud }`

    Resource counts for the project.

    - `blockchain: object { rpc_nodes_dedicated, rpc_nodes_flex }`

      Blockchain resources.

      - `rpc_nodes_dedicated: number`

        Number of dedicated RPC nodes in the project.

      - `rpc_nodes_flex: number`

        Number of flex RPC nodes in the project.

    - `cloud: object { connect_connections, nks_clusters, nks_node_pools, 3 more }`

      Cloud infrastructure resources.

      - `connect_connections: number`

        Number of Connect connections in the project.

      - `nks_clusters: number`

        Number of NKS clusters in the project.

      - `nks_node_pools: number`

        Number of NKS node pools in the project.

      - `vms: number`

        Number of VMs in the project.

      - `volumes: number`

        Number of volumes in the project.

      - `vpcs: number`

        Number of VPCs in the project.

  - `tags: array of string`

    Tags attached to the Project.

  - `updated_at: string`

    When the Project was updated.

### Example

```cli
nirvana projects create \
  --api-key 'My API Key' \
  --name 'My Project'
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "name": "My Project",
  "resources": {
    "blockchain": {
      "rpc_nodes_dedicated": 1,
      "rpc_nodes_flex": 3
    },
    "cloud": {
      "connect_connections": 1,
      "nks_clusters": 2,
      "nks_node_pools": 4,
      "vms": 5,
      "volumes": 10,
      "vpcs": 2
    }
  },
  "tags": [
    "production",
    "ethereum"
  ],
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Get Project Details

`$ nirvana projects get`

**get** `/v1/projects/{project_id}`

Get details about a project

### Parameters

- `--project-id: string`

  Project ID

### Returns

- `project: object { id, created_at, name, 3 more }`

  Project response.

  - `id: string`

    Project ID.

  - `created_at: string`

    When the Project was created.

  - `name: string`

    Project name.

  - `resources: object { blockchain, cloud }`

    Resource counts for the project.

    - `blockchain: object { rpc_nodes_dedicated, rpc_nodes_flex }`

      Blockchain resources.

      - `rpc_nodes_dedicated: number`

        Number of dedicated RPC nodes in the project.

      - `rpc_nodes_flex: number`

        Number of flex RPC nodes in the project.

    - `cloud: object { connect_connections, nks_clusters, nks_node_pools, 3 more }`

      Cloud infrastructure resources.

      - `connect_connections: number`

        Number of Connect connections in the project.

      - `nks_clusters: number`

        Number of NKS clusters in the project.

      - `nks_node_pools: number`

        Number of NKS node pools in the project.

      - `vms: number`

        Number of VMs in the project.

      - `volumes: number`

        Number of volumes in the project.

      - `vpcs: number`

        Number of VPCs in the project.

  - `tags: array of string`

    Tags attached to the Project.

  - `updated_at: string`

    When the Project was updated.

### Example

```cli
nirvana projects get \
  --api-key 'My API Key' \
  --project-id project_id
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "name": "My Project",
  "resources": {
    "blockchain": {
      "rpc_nodes_dedicated": 1,
      "rpc_nodes_flex": 3
    },
    "cloud": {
      "connect_connections": 1,
      "nks_clusters": 2,
      "nks_node_pools": 4,
      "vms": 5,
      "volumes": 10,
      "vpcs": 2
    }
  },
  "tags": [
    "production",
    "ethereum"
  ],
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Update Project

`$ nirvana projects update`

**patch** `/v1/projects/{project_id}`

Update an existing project

### Parameters

- `--project-id: string`

  Project ID

- `--name: optional string`

  Project name.

- `--tag: optional array of string`

  Tags to attach to the Project.

### Returns

- `project: object { id, created_at, name, 3 more }`

  Project response.

  - `id: string`

    Project ID.

  - `created_at: string`

    When the Project was created.

  - `name: string`

    Project name.

  - `resources: object { blockchain, cloud }`

    Resource counts for the project.

    - `blockchain: object { rpc_nodes_dedicated, rpc_nodes_flex }`

      Blockchain resources.

      - `rpc_nodes_dedicated: number`

        Number of dedicated RPC nodes in the project.

      - `rpc_nodes_flex: number`

        Number of flex RPC nodes in the project.

    - `cloud: object { connect_connections, nks_clusters, nks_node_pools, 3 more }`

      Cloud infrastructure resources.

      - `connect_connections: number`

        Number of Connect connections in the project.

      - `nks_clusters: number`

        Number of NKS clusters in the project.

      - `nks_node_pools: number`

        Number of NKS node pools in the project.

      - `vms: number`

        Number of VMs in the project.

      - `volumes: number`

        Number of volumes in the project.

      - `vpcs: number`

        Number of VPCs in the project.

  - `tags: array of string`

    Tags attached to the Project.

  - `updated_at: string`

    When the Project was updated.

### Example

```cli
nirvana projects update \
  --api-key 'My API Key' \
  --project-id project_id
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "name": "My Project",
  "resources": {
    "blockchain": {
      "rpc_nodes_dedicated": 1,
      "rpc_nodes_flex": 3
    },
    "cloud": {
      "connect_connections": 1,
      "nks_clusters": 2,
      "nks_node_pools": 4,
      "vms": 5,
      "volumes": 10,
      "vpcs": 2
    }
  },
  "tags": [
    "production",
    "ethereum"
  ],
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Delete Project

`$ nirvana projects delete`

**delete** `/v1/projects/{project_id}`

Delete a project

### Parameters

- `--project-id: string`

  Project ID

### Example

```cli
nirvana projects delete \
  --api-key 'My API Key' \
  --project-id project_id
```

## List Projects

`$ nirvana projects list`

**get** `/v1/projects`

List all projects

### Parameters

- `--cursor: optional string`

  Pagination cursor returned by a previous request

- `--limit: optional number`

  Maximum number of items to return

### Returns

- `project_list: object { items, pagination }`

  - `items: array of Project`

    - `id: string`

      Project ID.

    - `created_at: string`

      When the Project was created.

    - `name: string`

      Project name.

    - `resources: object { blockchain, cloud }`

      Resource counts for the project.

      - `blockchain: object { rpc_nodes_dedicated, rpc_nodes_flex }`

        Blockchain resources.

        - `rpc_nodes_dedicated: number`

          Number of dedicated RPC nodes in the project.

        - `rpc_nodes_flex: number`

          Number of flex RPC nodes in the project.

      - `cloud: object { connect_connections, nks_clusters, nks_node_pools, 3 more }`

        Cloud infrastructure resources.

        - `connect_connections: number`

          Number of Connect connections in the project.

        - `nks_clusters: number`

          Number of NKS clusters in the project.

        - `nks_node_pools: number`

          Number of NKS node pools in the project.

        - `vms: number`

          Number of VMs in the project.

        - `volumes: number`

          Number of volumes in the project.

        - `vpcs: number`

          Number of VPCs in the project.

    - `tags: array of string`

      Tags attached to the Project.

    - `updated_at: string`

      When the Project was updated.

  - `pagination: object { next_cursor, previous_cursor, total_count }`

    Pagination response details.

    - `next_cursor: string`

    - `previous_cursor: string`

    - `total_count: number`

### Example

```cli
nirvana projects list \
  --api-key 'My API Key'
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "name": "My Project",
      "resources": {
        "blockchain": {
          "rpc_nodes_dedicated": 1,
          "rpc_nodes_flex": 3
        },
        "cloud": {
          "connect_connections": 1,
          "nks_clusters": 2,
          "nks_node_pools": 4,
          "vms": 5,
          "volumes": 10,
          "vpcs": 2
        }
      },
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### Project

- `project: object { id, created_at, name, 3 more }`

  Project response.

  - `id: string`

    Project ID.

  - `created_at: string`

    When the Project was created.

  - `name: string`

    Project name.

  - `resources: object { blockchain, cloud }`

    Resource counts for the project.

    - `blockchain: object { rpc_nodes_dedicated, rpc_nodes_flex }`

      Blockchain resources.

      - `rpc_nodes_dedicated: number`

        Number of dedicated RPC nodes in the project.

      - `rpc_nodes_flex: number`

        Number of flex RPC nodes in the project.

    - `cloud: object { connect_connections, nks_clusters, nks_node_pools, 3 more }`

      Cloud infrastructure resources.

      - `connect_connections: number`

        Number of Connect connections in the project.

      - `nks_clusters: number`

        Number of NKS clusters in the project.

      - `nks_node_pools: number`

        Number of NKS node pools in the project.

      - `vms: number`

        Number of VMs in the project.

      - `volumes: number`

        Number of volumes in the project.

      - `vpcs: number`

        Number of VPCs in the project.

  - `tags: array of string`

    Tags attached to the Project.

  - `updated_at: string`

    When the Project was updated.

### Project Blockchain Resources

- `project_blockchain_resources: object { rpc_nodes_dedicated, rpc_nodes_flex }`

  Blockchain resources.

  - `rpc_nodes_dedicated: number`

    Number of dedicated RPC nodes in the project.

  - `rpc_nodes_flex: number`

    Number of flex RPC nodes in the project.

### Project Cloud Resources

- `project_cloud_resources: object { connect_connections, nks_clusters, nks_node_pools, 3 more }`

  Cloud infrastructure resources.

  - `connect_connections: number`

    Number of Connect connections in the project.

  - `nks_clusters: number`

    Number of NKS clusters in the project.

  - `nks_node_pools: number`

    Number of NKS node pools in the project.

  - `vms: number`

    Number of VMs in the project.

  - `volumes: number`

    Number of volumes in the project.

  - `vpcs: number`

    Number of VPCs in the project.

### Project List

- `project_list: object { items, pagination }`

  - `items: array of Project`

    - `id: string`

      Project ID.

    - `created_at: string`

      When the Project was created.

    - `name: string`

      Project name.

    - `resources: object { blockchain, cloud }`

      Resource counts for the project.

      - `blockchain: object { rpc_nodes_dedicated, rpc_nodes_flex }`

        Blockchain resources.

        - `rpc_nodes_dedicated: number`

          Number of dedicated RPC nodes in the project.

        - `rpc_nodes_flex: number`

          Number of flex RPC nodes in the project.

      - `cloud: object { connect_connections, nks_clusters, nks_node_pools, 3 more }`

        Cloud infrastructure resources.

        - `connect_connections: number`

          Number of Connect connections in the project.

        - `nks_clusters: number`

          Number of NKS clusters in the project.

        - `nks_node_pools: number`

          Number of NKS node pools in the project.

        - `vms: number`

          Number of VMs in the project.

        - `volumes: number`

          Number of volumes in the project.

        - `vpcs: number`

          Number of VPCs in the project.

    - `tags: array of string`

      Tags attached to the Project.

    - `updated_at: string`

      When the Project was updated.

  - `pagination: object { next_cursor, previous_cursor, total_count }`

    Pagination response details.

    - `next_cursor: string`

    - `previous_cursor: string`

    - `total_count: number`

### Project Resources

- `project_resources: object { blockchain, cloud }`

  Resource counts for the project.

  - `blockchain: object { rpc_nodes_dedicated, rpc_nodes_flex }`

    Blockchain resources.

    - `rpc_nodes_dedicated: number`

      Number of dedicated RPC nodes in the project.

    - `rpc_nodes_flex: number`

      Number of flex RPC nodes in the project.

  - `cloud: object { connect_connections, nks_clusters, nks_node_pools, 3 more }`

    Cloud infrastructure resources.

    - `connect_connections: number`

      Number of Connect connections in the project.

    - `nks_clusters: number`

      Number of NKS clusters in the project.

    - `nks_node_pools: number`

      Number of NKS node pools in the project.

    - `vms: number`

      Number of VMs in the project.

    - `volumes: number`

      Number of volumes in the project.

    - `vpcs: number`

      Number of VPCs in the project.
