Skip to content
DocsOpenAPI spec

    Update Project

    client.Projects.Update(ctx, projectID, body) (*Project, error)
    PATCH/v1/projects/{project_id}

    Update an existing project

    ParametersExpand Collapse
    projectID string
    body ProjectUpdateParams
    Name param.Field[string]Optional

    Project name.

    maxLength255
    minLength1
    Tags param.Field[[]string]Optional

    Tags to attach to the Project.

    ReturnsExpand Collapse
    type Project struct{…}

    Project response.

    ID string

    Project ID.

    CreatedAt Time

    When the Project was created.

    formatdate-time
    ManagedBy ProjectManagedBy

    What manages the resource, or null when nothing does. A managed resource can be read but not changed.

    ID string

    ID of the thing managing the resource.

    Type string

    Kind of thing managing the resource.

    Name string

    Project name.

    maxLength255
    minLength1

    Resource counts for the project.

    Blockchain resources.

    RPCNodesDedicated int64

    Number of dedicated RPC nodes in the project.

    RPCNodesFlex int64

    Number of flex RPC nodes in the project.

    Cloud infrastructure resources.

    NKSClusters int64

    Number of NKS clusters in the project.

    NKSNodePools int64

    Number of NKS node pools in the project.

    VMs int64

    Number of VMs in the project.

    Volumes int64

    Number of volumes in the project.

    VPCs int64

    Number of VPCs in the project.

    Tags []string

    Tags attached to the Project.

    UpdatedAt Time

    When the Project was updated.

    formatdate-time

    Update Project

    package main
    
    import (
      "context"
      "fmt"
    
      "github.com/nirvana-labs/nirvana-go"
      "github.com/nirvana-labs/nirvana-go/option"
      "github.com/nirvana-labs/nirvana-go/projects"
    )
    
    func main() {
      client := nirvana.NewClient(
        option.WithAPIKey("My API Key"),
      )
      project, err := client.Projects.Update(
        context.TODO(),
        "project_id",
        projects.ProjectUpdateParams{
    
        },
      )
      if err != nil {
        panic(err.Error())
      }
      fmt.Printf("%+v\n", project.ID)
    }
    
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "managed_by": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "type": "sandbox_environment"
      },
      "name": "My Project",
      "resources": {
        "blockchain": {
          "rpc_nodes_dedicated": 1,
          "rpc_nodes_flex": 3
        },
        "cloud": {
          "nks_clusters": 2,
          "nks_node_pools": 4,
          "vms": 5,
          "volumes": 10,
          "vpcs": 2
        }
      },
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }
    Returns Examples
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "managed_by": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "type": "sandbox_environment"
      },
      "name": "My Project",
      "resources": {
        "blockchain": {
          "rpc_nodes_dedicated": 1,
          "rpc_nodes_flex": 3
        },
        "cloud": {
          "nks_clusters": 2,
          "nks_node_pools": 4,
          "vms": 5,
          "volumes": 10,
          "vpcs": 2
        }
      },
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }