> ## Documentation Index
> Fetch the complete documentation index at: https://learn.servitly.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get connection-tokens
> Retrieves the connection-tokens, or the details of a single one when the token parameter is provided.
A connection-token authorizes a device or a gateway to establish the connection with the cloud and publish data without using the credentials of a user.
Required permissions: READ_THING_CONNECTION_TOKENS.
## OpenAPI
````json GET /inventory/thingConnectionTokens
{
"openapi": "3.1.0",
"info": {
"title": "Servitly DPS API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.servitly-sandbox.com",
"description": "[AWS SANDBOX]"
},
{
"url": "https://api.servitly.com",
"description": "[AWS PRODUCTION Ireland]"
},
{
"url": "https://api-ap.servitly.com",
"description": "[AWS Hong Kong]"
},
{
"url": "https://azapi.servitly-dev.com",
"description": "[AZURE DEV Frankfurt]"
},
{
"url": "https://azapi.servitly-staging.com",
"description": "[AZURE STAGING Frankfurt]"
},
{
"url": "https://azapi.servitly.com",
"description": "[AZURE PRODUCTION Frankfurt]"
}
],
"security": [
{
"bearerAuth": []
}
],
"tags": [
{
"name": "ACTIONS"
},
{
"name": "ALERTS"
},
{
"name": "API GATEWAY"
},
{
"name": "AUTHENTICATION"
},
{
"name": "AUTHORIZATIONS"
},
{
"name": "CUSTOMERS"
},
{
"name": "DATA IMPORT / EXPORT"
},
{
"name": "EVENTS"
},
{
"name": "LOCATIONS"
},
{
"name": "MAINTENANCE"
},
{
"name": "MAPPING"
},
{
"name": "METRIC DATA"
},
{
"name": "MOBILE APP"
},
{
"name": "ORGANIZATION"
},
{
"name": "PARTNERS"
},
{
"name": "PRODUCT MODELS"
},
{
"name": "SPARE PARTS"
},
{
"name": "STATISTICS"
},
{
"name": "STORE ORDERS"
},
{
"name": "SUBSCRIPTIONS"
},
{
"name": "SUBSCRIPTIONS (OLD)"
},
{
"name": "THING CONTROL"
},
{
"name": "THING DEFINITIONS"
},
{
"name": "THING MANAGEMENT"
},
{
"name": "THINGS"
},
{
"name": "TICKETS"
},
{
"name": "USER TYPES"
},
{
"name": "USERS"
},
{
"name": "WORK SESSIONS"
}
],
"paths": {
"/inventory/thingConnectionTokens": {
"get": {
"summary": "Get connection-tokens",
"description": "Retrieves the connection-tokens, or the details of a single one when the token parameter is provided.
A connection-token authorizes a device or a gateway to establish the connection with the cloud and publish data without using the credentials of a user.
Required permissions: READ_THING_CONNECTION_TOKENS.",
"tags": [
"THING MANAGEMENT"
],
"parameters": [
{
"$ref": "#/components/parameters/tenantNameHeader"
},
{
"in": "query",
"name": "token",
"required": "false",
"schema": {
"type": "string",
"minimum": "1"
},
"description": "The connection-token whose details must be retrieved. If omitted, all connection-tokens are retrieved."
}
],
"responses": {
"200": {
"description": "Successful operation.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConnectionToken"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/NotAuthenticated"
},
"403": {
"$ref": "#/components/responses/NotAuthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/ApiLimit"
},
"500": {
"$ref": "#/components/responses/IntError"
}
}
}
}
},
"components": {
"parameters": {
"tenantNameHeader": {
"in": "header",
"name": "X-Servitly-Tenant",
"required": "true",
"schema": {
"type": "string",
"example": "{{tenantName}}"
},
"description": "The name of the tenant (e.g. acme)."
}
},
"schemas": {
"ConnectionToken": {
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The connection-token object identifier."
},
"token": {
"type": "string",
"description": "The token value."
},
"description": {
"type": "string",
"description": "The description associated with the connection-token at registration time."
},
"timestamp": {
"type": "integer",
"format": "int64",
"description": "The timestamp associated with the connection-token during the registration."
}
}
},
{
"$ref": "#/components/schemas/ConnectionMapping"
},
{
"$ref": "#/components/schemas/AssetMapping"
}
]
},
"ConnectionMapping": {
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "The username required to establish the connection with the cloud."
},
"password": {
"type": "string",
"description": "The password required to establish the connection with the cloud."
},
"type": {
"type": "string",
"enum": [
"SEMIOTY_THING_CONNECTOR",
"EDC",
"LEMONBEAT",
"AZURE_SERVICE_BUS",
"ALLEANTIA"
]
},
"payloadFormat": {
"type": "string",
"enum": [
"JSON"
],
"description": "The payload format of the messages exchanged with the cloud (default JSON)."
}
}
},
"AssetMapping": {
"type": "object",
"properties": {
"assetId": {
"type": "string",
"description": "The asset-id (e.g. MAC address)."
},
"path": {
"type": "string",
"description": "The optional mapping path."
}
}
}
},
"responses": {
"NotAuthenticated": {
"description": "User not authenticated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "User not authenticated"
}
}
}
}
}
},
"NotAuthorized": {
"description": "User not authorized.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "User not authorized"
}
}
}
}
}
},
"NotFound": {
"description": "Resource was not found.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "Resource not found"
}
}
}
}
}
},
"ApiLimit": {
"description": "API call rate limit exceeded.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "API call rate limit exceeded"
}
}
}
}
}
},
"IntError": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "Internal Server Error"
}
}
}
}
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
}
}
````