Skip to content
Docs

    List RPC Node Flex

    client.RPCNodes.Flex.List(ctx, query) (*Cursor[Flex], error)
    GET/v1/rpc_nodes/flex

    List all RPC Node Flex you created

    ParametersExpand Collapse
    query FlexListParams
    ProjectID param.Field[string]

    Project ID of resources to request

    Blockchain param.Field[string]Optional

    Filter by blockchain

    Cursor param.Field[string]Optional

    Pagination cursor returned by a previous request. Only valid for the same filters and sort order.

    Limit param.Field[int64]Optional

    Maximum number of items to return

    maximum100
    minimum10
    Name param.Field[string]Optional

    Filter by a case-insensitive substring of the RPC Node Flex name

    Network param.Field[string]Optional

    Filter by network

    Sort param.Field[string]Optional

    Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, name, blockchain, network

    Tags param.Field[[]string]Optional

    Filter by tags. Repeat the parameter to require several tags; an RPC Node Flex must carry all of them.

    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

    List 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"),
      )
      page, err := client.RPCNodes.Flex.List(context.TODO(), rpc_nodes.FlexListParams{
        ProjectID: "project_id",
      })
      if err != nil {
        panic(err.Error())
      }
      fmt.Printf("%+v\n", page)
    }
    
    {
      "items": [
        {
          "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"
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }
    Returns Examples
    {
      "items": [
        {
          "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"
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }