OpenAPI Specification
openapi: 3.0.3
info:
title: Cesanta mDash REST Data Keys API
description: 'mDash is Cesanta''s managed IoT cloud platform for devices built with Mongoose OS.
It provides device management, over-the-air (OTA) firmware updates, a device
shadow/database, remote RPC, API key management, and notification logs.
This OpenAPI description was captured from Cesanta''s published REST API reference
(https://mongoose-os.com/docs/mdash/api.md). Every request must be authenticated
with an `Authorization: Bearer KEY` header; POST/PUT calls that carry a JSON body
must set `Content-Type: application/json`.
'
version: v2
contact:
name: Cesanta Support
email: support@cesanta.com
url: https://mdash.net/home/
license:
name: Cesanta Terms
url: https://mongoose-os.com/
servers:
- url: https://dash.mongoose-os.com/api/v2
description: mDash hosted production API
security:
- bearerAuth: []
tags:
- name: Keys
description: API key management
paths:
/keys:
get:
operationId: listKeys
summary: List all API keys
tags:
- Keys
responses:
'200':
description: List of API keys
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ApiKey'
'401':
description: Missing or invalid bearer token
post:
operationId: createKey
summary: Create an API key
tags:
- Keys
responses:
'200':
description: Created API key
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
'401':
description: Missing or invalid bearer token
/keys/{id}:
delete:
operationId: deleteKey
summary: Delete an API key
tags:
- Keys
parameters:
- $ref: '#/components/parameters/KeyId'
responses:
'200':
description: API key deleted
'401':
description: Missing or invalid bearer token
components:
parameters:
KeyId:
name: id
in: path
required: true
description: API key identifier
schema:
type: string
schemas:
ApiKey:
type: object
description: An mDash API key.
properties:
id:
type: string
key:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: mDash API key sent as an HTTP bearer token.