LightMesh API

Prerequisites

To connect with the LightMesh API, you need to be a registered user on next.lightmesh.com.

Generate an API Key

  1. Log in to next.lightmesh.com.
  2. Navigate to Admin > API Keys.
  3. Click Add an API Key.
  4. Before hitting Submit, copy the API Key. After submission, it will be encrypted and cannot be retrieved again.

For a detailed tutorial on how to generate an API Key, refer to our API Key generation guide.

Connecting LightMesh API via Postman

Setting Up Postman

Once you have the API Key, follow these steps to connect to LightMesh API using Postman.

  1. Open Postman and create a new request.
  2. Set the request type to POST.
  3. In the URL field, enter:
    http://next.lightmesh.com/graphql
    

Adding Headers

Navigate to the Headers section and add the following key-value pairs:

Content-Type: application/json
token: <api-key-you-copied-from-above>

Postman Headers

Configuring the Request Body

Go to the Body section and select raw as the data type.

Example Query (Fetching Subnet Details)

{
  "query": "query ($id: Int!) { subnet(id: $id) { id name networkAddress } }",
  "variables": {
    "id": 21
  }
}

Finding the Subnet ID

To retrieve a subnet’s ID:

  1. Go to your LightMesh dashboard.
  2. Navigate to the Subnets section.
  3. Locate the desired subnet and note its ID.

ID for Subnet

Sending the Request

Once the headers and body are set up:

  1. Click Send.
  2. Postman will return the subnet details in JSON format.

Postman Screenshot

For detailed API documentation, including all types, queries, mutations and inputs, please visit LightMesh API Documentation.

This guide provides a basic workflow for interacting with the LightMesh API.