GET
/
v1
/
networks
/
{network}
/
subnets
/
{subnetId}
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  serverURL: "https://api.example.com",
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.data.primaryNetwork.getSubnetById({
    network: "mainnet",
    subnetId: "11111111111111111111111111111111LpoYY",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "createBlockTimestamp": 123,
  "createBlockIndex": "<string>",
  "subnetId": "<string>",
  "ownerAddresses": [
    "<string>"
  ],
  "threshold": 123,
  "locktime": 123,
  "subnetOwnershipInfo": {
    "locktime": 0,
    "threshold": 1,
    "addresses": [
      "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
    ]
  },
  "isL1": true,
  "l1ConversionTransactionHash": "<string>",
  "l1ValidatorManagerDetails": {
    "blockchainId": "<string>",
    "contractAddress": "<string>"
  },
  "blockchains": [
    {
      "createBlockTimestamp": 123,
      "createBlockNumber": "<string>",
      "blockchainId": "<string>",
      "vmId": "<string>",
      "subnetId": "<string>",
      "blockchainName": "<string>",
      "evmChainId": 43114
    }
  ]
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Path Parameters

network
enum<string>
required

Either mainnet or testnet/fuji.

Available options:
mainnet,
fuji,
testnet
subnetId
string
required

Subnet ID to fetch details for

Response

200
application/json

Successful response

The response is of type object.