---
updatedAt: 2025-09-17T00:08:16.000Z
agentTools:
  projectIndex: https://docs.api.everactive.com/llms.txt
---

# get an mqtt subscription

Retrieve the configuration of a single mqtt subscription.

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Everactive Data Service API",
    "version": "v1",
    "description": "This API provides access to administrative operations for configuring, monitoring, and maintaining\n\nthe gateways and sensors that make up an Everactive installation, \n\nand for managing the software that detects and responds to events reported by sensors.",
    "contact": {
      "url": "https://everactive.com",
      "email": "success@everactive.com",
      "name": "Everactive"
    },
    "x-logo": {
      "url": "https://everactive.com/content/themes/storyware/assets/svg/logo.svg",
      "backgroundColor": "#0d0d3d",
      "altText": "Everactive"
    }
  },
  "servers": [
    {
      "url": "https://api.data.everactive.com/ds/v1",
      "description": "Everactive Data Service v1 API."
    }
  ],
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "description": "The Everactive internal API uses OAuth2 to authenticate and generate a Bearer token to authorize API endpoints. \nExternal clients must use the client_credentials flow to authenticate. The expectation is the client_secret \nvalue is protected at all times. It must not be used in a mobile application or web application\nas it is not possible to protect the secret in these types of applications.\n\nExample client_credentials grant_type request body:\n```json\n{\n  \"client_id\": \"the_client_id\",\n  \"client_secret\": \"the_client_secret\",\n  \"grant_type\": \"client_credentials\"\n}\n```",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.data.everactive.com/auth/token",
            "scopes": {
              "super-admin": "full access to all API endpoints",
              "integration-partner": "access to all public API endpoints",
              "customer-admin": "full access to API endpoints related to the customer the client belongs to",
              "user": "limited access to endpoints related to the customer the client belongs to"
            },
            "x-everactive-public": true
          }
        }
      }
    },
    "responses": {
      "400Error": {
        "description": "The request is invalid.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "$ref": "#/components/schemas/ClientError"
            }
          }
        }
      },
      "401Unauthorized": {
        "description": "The request did not include the correct authorization or the included authorization has expired."
      },
      "403Forbidden": {
        "description": "The requested resource is not accessible to the currently authenticated client."
      },
      "MqttSubscriptionResponse": {
        "description": "Retrieve the configuration of a mqtt subscription.",
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/MqttSubscription"
                }
              },
              "type": "object"
            }
          }
        }
      }
    },
    "schemas": {
      "ClientError": {
        "title": "ClientError",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "A code that uniquely identifies the error type, e.g. `error_validation`.",
            "example": "error_validation"
          },
          "message": {
            "type": "string",
            "description": "A description of the error code.",
            "example": "Validation error."
          },
          "errors": {
            "type": "array",
            "description": "A collection of sub-errors that are encompassed by the top-level error. Validation errors will often have one or more specific fields that did not pass validation, this collection will describe the specific errors.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "A code that uniquely identifies the error type, e.g. `error_no_value`.",
                  "example": "error_invalid_mac_address"
                },
                "field": {
                  "type": "string",
                  "description": "Errors for a specific field passed in the body will indicate which field caused the error.",
                  "example": "sensor.macAddress"
                },
                "message": {
                  "type": "string",
                  "description": "A description of the error.",
                  "example": "no:ta:re:al:ma:c0 is an invalid MAC address"
                }
              },
              "required": [
                "code",
                "message"
              ]
            }
          }
        },
        "required": [
          "code",
          "message"
        ],
        "description": "An error specific to an action the client is attempting."
      },
      "CustomerMinimal": {
        "readOnly": true,
        "title": "CustomerMinimal",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique id of the customer.",
            "example": "54c32003-0d20-4c41-a8a5-3d24e4997975"
          },
          "enabledProducts": {
            "title": "CustomerProducts",
            "type": "object",
            "properties": {
              "dataServices": {
                "type": "boolean",
                "example": true
              },
              "flareSystemMonitor": {
                "type": "boolean",
                "example": false
              },
              "machineHealthMonitor": {
                "type": "boolean",
                "example": true
              },
              "steamTrapMonitor": {
                "type": "boolean",
                "example": true
              }
            },
            "required": [
              "dataServices",
              "flareSystemMonitor",
              "machineHealthMonitor",
              "steamTrapMonitor"
            ]
          },
          "name": {
            "type": "string",
            "description": "The name of the customer.",
            "example": "Example Inc."
          },
          "status": {
            "type": "string",
            "enum": [
              "Decommissioned",
              "Demo",
              "Production",
              "To Be Installed"
            ],
            "description": "The status of the customer",
            "example": "Production"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "MqttSubscription": {
        "title": "Mqtt Subscription",
        "type": "object",
        "description": "Metadata defining an mqtt subscription, containing connection information\nthat Evercloud can use to send data to an external mqtt service.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique id of the mqtt subscription.",
            "example": "b3f089e4-1be5-4638-997f-cc4df8e22f34",
            "readOnly": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Specifies whether the mqtt subscription is enabled.",
            "example": true,
            "default": false
          },
          "customer": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerMinimal"
              }
            ]
          },
          "mqttConfig": {
            "type": "object",
            "description": "Target MQTT connection parameters.",
            "properties": {
              "mqttUrl": {
                "type": "string",
                "description": "The mqtt service URL that the subscription will connect to. It should contain the protocol, the hostname, and the port.",
                "example": "ssl://dev-ingest-1.data.everactive.com:8883"
              },
              "mqttClientPrefix": {
                "type": "string",
                "description": "A prefix for the mqtt client id value. This is useful when using authentication policies based on the client id.",
                "example": "my_service"
              },
              "mqttTopicPrefix": {
                "type": "string",
                "description": "A prefix for the mqtt topics. This is useful to insert the everactive data in an existing topic hierarchy.",
                "example": "my/parent_topic"
              },
              "mqttQos": {
                "type": "integer",
                "format": "int32",
                "description": "Mqtt connection QoS. Supported values are 0 and 1.",
                "default": 0,
                "example": 0,
                "minimum": 0,
                "maximum": 1
              },
              "mqttAuth": {
                "type": "string",
                "enum": [
                  "none",
                  "password",
                  "tls"
                ],
                "description": "The type of authentication for the target mqtt service.",
                "example": "tls",
                "default": "none"
              },
              "mqttUsername": {
                "type": "string",
                "description": "The mqtt service username, required when the mqttAuth is password",
                "example": "some_user"
              },
              "mqttPassword": {
                "type": "string",
                "description": "The mqtt service password, required when the mqttAuth is password",
                "example": "some_secret"
              },
              "mqttKey": {
                "type": "string",
                "description": "PEM string of the TLS Private Key, required when the mqttAuth is tls",
                "example": "-----BEGIN RSA PRIVATE KEY-----the pem content\nof the private key\n----END RSA PRIVATE KEY-----"
              },
              "mqttCert": {
                "type": "string",
                "description": "PEM string of the TLS Certificate, required when the mqttAuth is tls",
                "example": "-----BEGIN CERTIFICATE-----the pem content\nof the public key\n-----END CERTIFICATE-----"
              },
              "mqttCA": {
                "type": "string",
                "description": "PEM string of the CA Certificate for the secure connection. This is optional.",
                "example": "-----BEGIN CERTIFICATE-----the pem content\nof the CA cert\n-----END CERTIFICATE-----"
              }
            },
            "required": [
              "mqttUrl"
            ]
          }
        },
        "required": [
          "mqttConfig"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Mqtt",
      "description": "Endpoints related to managing and viewing MQTT subscriptions.",
      "x-everactive-public": true
    }
  ],
  "paths": {
    "/mqtt-subscriptions/{mqttSubscriptionId}": {
      "parameters": [
        {
          "name": "mqttSubscriptionId",
          "in": "path",
          "schema": {
            "type": "string"
          },
          "required": true,
          "description": "The ID of the mqtt subscription.",
          "example": "c405bb1a-7249-4e4c-be40-fbcd37bd1334"
        }
      ],
      "get": {
        "x-everactive-public": true,
        "summary": "get an mqtt subscription",
        "description": "Retrieve the configuration of a single mqtt subscription.",
        "operationId": "get-mqtt-subscription",
        "security": [
          {
            "OAuth2": [
              "super-admin",
              "developer"
            ]
          }
        ],
        "tags": [
          "Mqtt"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/MqttSubscriptionResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403Forbidden"
          }
        }
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "API Calls",
      "tags": [
        "Eversensors",
        "Evergateways",
        "Health",
        "Webhooks",
        "Mqtt"
      ]
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
````