Lunar Energy Devices API

List, get, and partially update customer devices

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lunar-energy-devices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lunar-energy-devices-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Gridshare Customer Devices API
  description: 'The Gridshare Customer API is the homeowner-delegated surface of

    Lunar Energy''s Gridshare DERMS platform. It allows partners — apps,

    installers, retailers — to read or control devices on behalf of a

    specific Lunar Energy customer once that customer has granted

    consent via OAuth 2.0 Authorization Code flow against the

    lunar-customer Amazon Cognito user pool.


    Four scopes are available: `lunar/device.read`, `lunar/device.write`,

    `lunar/plan.read`, `lunar/plan.write`.

    '
  version: v1.0
  contact:
    name: Lunar Energy
    url: https://www.gridshare.com
    email: developers@gridshare.com
  x-logo:
    url: https://www.lunarenergy.com/favicon.ico
servers:
- url: https://developer-api.customer.mygridshare.com
  description: Production server
- url: https://developer-api.customer.dev0.mygridshare.com
  description: Development server
security:
- bearerAuth: []
tags:
- name: Devices
  description: List, get, and partially update customer devices
paths:
  /api/v2/devices:
    get:
      operationId: listDevices
      summary: List Devices
      description: List all devices the authenticated customer has access to.
      tags:
      - Devices
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceList'
        '400':
          $ref: '#/components/responses/Malformed'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/Unprocessable'
  /api/v2/devices/{synthId}:
    parameters:
    - $ref: '#/components/parameters/SynthId'
    get:
      operationId: getDevice
      summary: Get Device
      description: Get a device by ID along with its static properties.
      tags:
      - Devices
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Device'
    patch:
      operationId: patchDevice
      summary: Partially Update Device
      description: Update a device.
      tags:
      - Devices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Device'
      responses:
        '200':
          description: OK
  /api/v1/devices:
    get:
      operationId: listDevices
      summary: List Devices
      description: List all devices in the partner fleet.
      tags:
      - Devices
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceList'
    post:
      operationId: createDevice
      summary: Create Device
      description: Create a new device.
      tags:
      - Devices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Device_2'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Device_2'
  /api/v1/devices/{synthId}:
    parameters:
    - $ref: '#/components/parameters/SynthId'
    get:
      operationId: getDevice
      summary: Get Device
      description: Get a device by ID with its static properties.
      tags:
      - Devices
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Device_2'
    put:
      operationId: replaceOrCreateDevice
      summary: Replace Or Create Device
      description: Override an existing device with new properties or create one if it does not yet exist.
      tags:
      - Devices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Device_2'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Device_2'
components:
  responses:
    Forbidden:
      description: 403 Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenResponse'
    Unauthorized:
      description: 401 Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedResponse'
    Malformed:
      description: 400 Malformed Input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MalformedInputResponse'
    Unprocessable:
      description: 422 Unprocessable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnprocessableResponse'
  schemas:
    Device:
      type: object
      required:
      - synthId
      properties:
        synthId:
          type: string
        kind:
          type: string
          enum:
          - inverter
          - battery_pack
          - PV
          - EV
          - meter
          - load_control_relay
        siteId:
          type: string
        manufacturer:
          type: string
        model:
          type: string
        serialNumber:
          type: string
    DeviceListItem:
      type: object
      required:
      - synthId
      properties:
        synthId:
          type: string
    UnprocessableResponse:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
    Device_2:
      type: object
      required:
      - synthId
      properties:
        synthId:
          type: string
        deviceId:
          type: string
        kind:
          type: string
          enum:
          - inverter
          - battery_pack
          - PV
          - EV
          - meter
          - load_control_relay
        type:
          type: string
        siteId:
          type: string
        manufacturer:
          type: string
        model:
          type: string
        serialNumber:
          type: string
        properties:
          type: object
          additionalProperties: true
    ForbiddenResponse:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
    MalformedInputResponse:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
    UnauthorizedResponse:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
    DeviceList:
      type: object
      required:
      - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/DeviceListItem'
  parameters:
    SynthId:
      in: path
      name: synthId
      required: true
      schema:
        type: string
      description: A device ID or a sensor ID from the site topology.
  securitySchemes:
    bearerAuth:
      type: oauth2
      description: 'OAuth 2.0 Authorization Code flow against the lunar-customer

        Amazon Cognito user pool.

        '
      flows:
        authorizationCode:
          authorizationUrl: https://lunar-customer-prod-us-west-1.auth.us-west-1.amazoncognito.com/oauth2/authorize
          tokenUrl: https://lunar-customer-prod-us-west-1.auth.us-west-1.amazoncognito.com/oauth2/token
          refreshUrl: https://lunar-customer-prod-us-west-1.auth.us-west-1.amazoncognito.com/oauth2/token
          scopes:
            lunar/device.read: Read device metadata and telemetry (excluding plans)
            lunar/device.write: Modify devices including operation mode
            lunar/plan.read: Read existing device plans
            lunar/plan.write: Send plans to a device