Skip to content
Docs

    Update RPC Node Flex

    client.RPCNodes.Flex.Update(ctx, nodeID, body) (*Flex, error)
    PATCH/v1/rpc_nodes/flex/{node_id}

    Update an existing RPC Node Flex

    ParametersExpand Collapse
    nodeID string
    body FlexUpdateParams
    Name param.Field[string]Optional

    Name of the RPC Node Flex.

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

    Tags to attach to the RPC Node Flex (optional, max 50).

    ReturnsExpand Collapse
    type Flex struct{…}

    RPC Node Flex details.

    ID string

    Unique identifier for the RPC Node Flex.

    Blockchain string

    Blockchain type.

    CreatedAt Time

    When the RPC Node Flex was created.

    formatdate-time
    Endpoint string

    RPC endpoint URL.

    Name string

    Name of the RPC Node Flex.

    Network string

    Network type (e.g., mainnet, testnet).

    ProjectID string

    Project identifier associated with the RPC Node Flex.

    Tags []string

    Tags to attach to the RPC Node Flex.

    UpdatedAt Time

    When the RPC Node Flex was updated.

    formatdate-time

    Update RPC Node Flex

    package main
    
    import (
      "context"
      "fmt"
    
      "github.com/nirvana-labs/nirvana-go"
      "github.com/nirvana-labs/nirvana-go/option"
      "github.com/nirvana-labs/nirvana-go/rpc_nodes"
    )
    
    func main() {
      client := nirvana.NewClient(
        option.WithAPIKey("My API Key"),
      )
      flex, err := client.RPCNodes.Flex.Update(
        context.TODO(),
        "node_id",
        rpc_nodes.FlexUpdateParams{
    
        },
      )
      if err != nil {
        panic(err.Error())
      }
      fmt.Printf("%+v\n", flex.ID)
    }
    
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "blockchain": "ethereum",
      "created_at": "2025-01-01T00:00:00Z",
      "endpoint": "https://ethereum-mainnet.nirvanalabs.xyz/my-ethereum-node-abc12?apikey=apiKey",
      "name": "my-ethereum-node",
      "network": "mainnet",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }
    Returns Examples
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "blockchain": "ethereum",
      "created_at": "2025-01-01T00:00:00Z",
      "endpoint": "https://ethereum-mainnet.nirvanalabs.xyz/my-ethereum-node-abc12?apikey=apiKey",
      "name": "my-ethereum-node",
      "network": "mainnet",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }