2020-09-23 15:44:39 +02:00
|
|
|
openapi: 3.0.1
|
2017-09-23 01:03:27 +02:00
|
|
|
info:
|
2018-05-15 17:13:09 +02:00
|
|
|
title: Mainflux things service
|
2019-04-20 14:09:11 +02:00
|
|
|
description: HTTP API for managing platform things and channels.
|
2017-09-23 01:03:27 +02:00
|
|
|
version: "1.0.0"
|
2020-09-23 15:44:39 +02:00
|
|
|
|
2017-09-23 01:03:27 +02:00
|
|
|
paths:
|
2018-05-15 17:13:09 +02:00
|
|
|
/things:
|
2017-09-23 01:03:27 +02:00
|
|
|
post:
|
2018-05-15 17:13:09 +02:00
|
|
|
summary: Adds new thing
|
2017-09-23 01:03:27 +02:00
|
|
|
description: |
|
2018-05-15 17:13:09 +02:00
|
|
|
Adds new thing to the list of things owned by user identified using
|
2017-09-23 01:03:27 +02:00
|
|
|
the provided access token.
|
|
|
|
tags:
|
2018-05-15 17:13:09 +02:00
|
|
|
- things
|
2017-09-23 01:03:27 +02:00
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
|
|
|
$ref: "#/components/requestBodies/ThingCreateReq"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'201':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/CreateThingRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Failed due to malformed JSON.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'409':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Entity already exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2018-04-08 22:57:56 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'422':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Database can't process request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2017-09-23 01:03:27 +02:00
|
|
|
get:
|
2020-12-15 00:20:42 +01:00
|
|
|
summary: Retrieves things
|
2017-09-23 01:03:27 +02:00
|
|
|
description: |
|
2020-12-16 16:00:56 +01:00
|
|
|
Retrieves a list of things. Due to performance concerns, data
|
2018-05-15 17:13:09 +02:00
|
|
|
is retrieved in subsets. The API things must ensure that the entire
|
2017-09-23 01:03:27 +02:00
|
|
|
dataset is consumed either by making subsequent requests, or by
|
|
|
|
increasing the subset size of the initial request.
|
|
|
|
tags:
|
2018-05-15 17:13:09 +02:00
|
|
|
- things
|
2017-09-23 01:03:27 +02:00
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/Limit"
|
|
|
|
- $ref: "#/components/parameters/Offset"
|
|
|
|
- $ref: "#/components/parameters/Name"
|
2020-12-08 21:30:47 +01:00
|
|
|
- $ref: "#/components/parameters/Order"
|
|
|
|
- $ref: "#/components/parameters/Direction"
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Metadata"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ThingsPageRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2019-01-08 11:53:24 +01:00
|
|
|
description: Failed due to malformed query parameters.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2019-01-08 11:53:24 +01:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: A non-existent entity request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'422':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Database can't process request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2019-11-04 13:14:17 -07:00
|
|
|
/things/bulk:
|
2019-10-29 05:59:54 -06:00
|
|
|
post:
|
|
|
|
summary: Bulk provisions new things
|
|
|
|
description: |
|
|
|
|
Adds new things to the list of things owned by user identified using
|
|
|
|
the provided access token.
|
|
|
|
tags:
|
|
|
|
- things
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
|
|
|
$ref: "#/components/requestBodies/ThingsCreateReq"
|
2019-10-29 05:59:54 -06:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'201':
|
2019-10-29 05:59:54 -06:00
|
|
|
description: Things registered.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2019-10-29 05:59:54 -06:00
|
|
|
description: Failed due to malformed JSON.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2019-10-29 05:59:54 -06:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2019-10-29 05:59:54 -06:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2018-05-15 17:13:09 +02:00
|
|
|
/things/{thingId}:
|
2017-09-23 01:03:27 +02:00
|
|
|
get:
|
2018-05-15 17:13:09 +02:00
|
|
|
summary: Retrieves thing info
|
2017-09-23 01:03:27 +02:00
|
|
|
tags:
|
2018-05-15 17:13:09 +02:00
|
|
|
- things
|
2017-09-23 01:03:27 +02:00
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ThingId"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ThingRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2018-05-15 17:13:09 +02:00
|
|
|
description: Thing does not exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'422':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Database can't process request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2017-09-23 01:03:27 +02:00
|
|
|
put:
|
2018-05-15 17:13:09 +02:00
|
|
|
summary: Updates thing info
|
2017-09-23 01:03:27 +02:00
|
|
|
description: |
|
|
|
|
Update is performed by replacing the current resource data with values
|
2018-05-15 17:13:09 +02:00
|
|
|
provided in a request payload. Note that the thing's type and ID
|
2018-03-11 18:06:01 +01:00
|
|
|
cannot be changed.
|
2017-09-23 01:03:27 +02:00
|
|
|
tags:
|
2018-05-15 17:13:09 +02:00
|
|
|
- things
|
2017-09-23 01:03:27 +02:00
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ThingId"
|
|
|
|
requestBody:
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/requestBodies/ThingUpdateReq"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2018-05-15 17:13:09 +02:00
|
|
|
description: Thing updated.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Failed due to malformed JSON.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2018-05-15 17:13:09 +02:00
|
|
|
description: Thing does not exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2018-04-08 22:57:56 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2017-09-23 01:03:27 +02:00
|
|
|
delete:
|
2018-05-15 17:13:09 +02:00
|
|
|
summary: Removes a thing
|
2017-09-23 01:03:27 +02:00
|
|
|
description: |
|
2018-05-15 17:13:09 +02:00
|
|
|
Removes a thing. The service will ensure that the removed thing is
|
2017-09-23 01:03:27 +02:00
|
|
|
disconnected from all of the existing channels.
|
|
|
|
tags:
|
2018-05-15 17:13:09 +02:00
|
|
|
- things
|
2017-09-23 01:03:27 +02:00
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ThingId"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'204':
|
2018-05-15 17:13:09 +02:00
|
|
|
description: Thing removed.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2018-11-19 21:27:01 +01:00
|
|
|
description: Failed due to malformed thing's ID.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2019-04-25 14:37:51 +02:00
|
|
|
/things/{thingId}/key:
|
|
|
|
patch:
|
|
|
|
summary: Updates thing key
|
|
|
|
description: |
|
|
|
|
Update is performed by replacing current key with a new one.
|
|
|
|
tags:
|
|
|
|
- things
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ThingId"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
|
|
|
$ref: "#/components/requestBodies/KeyUpdateReq"
|
2019-04-25 14:37:51 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2019-04-25 14:37:51 +02:00
|
|
|
description: Thing key updated.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2019-04-25 14:37:51 +02:00
|
|
|
description: Failed due to malformed JSON.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2019-04-25 14:37:51 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2019-04-25 14:37:51 +02:00
|
|
|
description: Thing does not exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'409':
|
2019-04-25 14:37:51 +02:00
|
|
|
description: Specified key already exists.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2019-04-25 14:37:51 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2017-09-23 01:03:27 +02:00
|
|
|
/channels:
|
|
|
|
post:
|
|
|
|
summary: Creates new channel
|
|
|
|
description: |
|
|
|
|
Creates new channel. User identified by the provided access token will
|
|
|
|
be the channel's owner.
|
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
|
|
|
$ref: "#/components/requestBodies/ChannelCreateReq"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'201':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ChannelCreateRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Failed due to malformed JSON.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'409':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Entity already exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2018-04-08 22:57:56 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2017-09-23 01:03:27 +02:00
|
|
|
get:
|
2020-12-16 16:00:56 +01:00
|
|
|
summary: Retrieves channels
|
2017-09-23 01:03:27 +02:00
|
|
|
description: |
|
2020-12-16 16:00:56 +01:00
|
|
|
Retrieves a list of channels. Due to performance concerns, data
|
2018-05-15 17:13:09 +02:00
|
|
|
is retrieved in subsets. The API things must ensure that the entire
|
2017-09-23 01:03:27 +02:00
|
|
|
dataset is consumed either by making subsequent requests, or by
|
|
|
|
increasing the subset size of the initial request.
|
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/Limit"
|
|
|
|
- $ref: "#/components/parameters/Offset"
|
|
|
|
- $ref: "#/components/parameters/Name"
|
2020-12-08 21:30:47 +01:00
|
|
|
- $ref: "#/components/parameters/Order"
|
|
|
|
- $ref: "#/components/parameters/Direction"
|
|
|
|
- $ref: "#/components/parameters/Metadata"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ChannelsPageRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Failed due to malformed query parameters.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'422':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Database can't process request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2019-11-04 13:14:17 -07:00
|
|
|
/channels/bulk:
|
2019-10-29 05:59:54 -06:00
|
|
|
post:
|
|
|
|
summary: Bulk provisions new channels
|
|
|
|
description: |
|
|
|
|
Adds new channels to the list of channels owned by user identified using
|
|
|
|
the provided access token.
|
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
|
|
|
$ref: "#/components/requestBodies/ChannelsCreateReq"
|
2019-10-29 05:59:54 -06:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'201':
|
2019-10-29 05:59:54 -06:00
|
|
|
description: Channels registered.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2019-10-29 05:59:54 -06:00
|
|
|
description: Failed due to malformed JSON.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2019-10-29 05:59:54 -06:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'409':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Entity already exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2019-10-29 05:59:54 -06:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2018-03-11 18:06:01 +01:00
|
|
|
/channels/{chanId}:
|
2017-09-23 01:03:27 +02:00
|
|
|
get:
|
|
|
|
summary: Retrieves channel info
|
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ChanId"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ChannelRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Failed due to malformed channel's ID.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Channel does not exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'422':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Database can't process request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2017-09-23 01:03:27 +02:00
|
|
|
put:
|
|
|
|
summary: Updates channel info
|
|
|
|
description: |
|
|
|
|
Update is performed by replacing the current resource data with values
|
2018-03-11 18:06:01 +01:00
|
|
|
provided in a request payload. Note that the channel's ID will not be
|
2017-09-23 01:03:27 +02:00
|
|
|
affected.
|
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ChanId"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
|
|
|
$ref: "#/components/requestBodies/ChannelCreateReq"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Channel updated.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Failed due to malformed JSON.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Channel does not exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2018-04-08 22:57:56 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2017-09-23 01:03:27 +02:00
|
|
|
delete:
|
|
|
|
summary: Removes a channel
|
|
|
|
description: |
|
|
|
|
Removes a channel. The service will ensure that the subscribed apps and
|
2019-04-20 14:09:11 +02:00
|
|
|
things are unsubscribed from the removed channel.
|
2017-09-23 01:03:27 +02:00
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ChanId"
|
2017-09-23 01:03:27 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'204':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Channel removed.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2018-11-19 21:27:01 +01:00
|
|
|
description: Failed due to malformed channel's ID.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2017-09-23 01:03:27 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
|
|
|
/connect:
|
|
|
|
post:
|
|
|
|
summary: Connects thing and channel.
|
|
|
|
description: |
|
|
|
|
Connect things specified by IDs to channels specified by IDs.
|
|
|
|
Channel and thing are owned by user identified using the provided access token.
|
|
|
|
tags:
|
|
|
|
- things
|
|
|
|
parameters:
|
|
|
|
- $ref: "#/components/parameters/Authorization"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
|
|
|
$ref: "#/components/requestBodies/ConnCreateReq"
|
2020-09-23 15:44:39 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'201':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ConnCreateRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Failed due to malformed JSON.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: A non-existent entity request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'409':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Entity already exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2019-01-08 11:53:24 +01:00
|
|
|
/things/{thingId}/channels:
|
|
|
|
get:
|
2020-12-15 00:20:42 +01:00
|
|
|
summary: List of channels connected to specified thing
|
2019-01-08 11:53:24 +01:00
|
|
|
description: |
|
MF-532 - Password reset (#873)
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add default value for metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add default value for metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add default value for metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add default value for metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add default value for metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add default value for metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* when metadata is not set dont save 'null' string
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* when metadata is not set dont save 'null' string
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* when metadata is not set dont save 'null' string
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change metadata type, add error handling
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change metadata type, add error handling
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change metadata type, add error handling
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove extra char
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove extra char
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove extra char
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* few small fixes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* few small fixes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* few small fixes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix identityRes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix identityRes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix identityRes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* mail
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* mail
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reset request endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reset request endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reset request endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add token
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add token
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add token
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add token methods
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add token methods
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add token methods
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding token endpoints
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding token endpoints
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding token endpoints
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding reset passw endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding reset passw endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding reset passw endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add logic for token verifying
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add logic for token verifying
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add logic for token verifying
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove mail from main
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove mail from main
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove mail from main
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* token and passwd update logic
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* token and passwd update logic
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* token and passwd update logic
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize mailing code
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add comments for password reset flow
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add comments for password reset flow
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change struct members to private
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small changes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small changes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small changes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add space
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add space
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add space
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* revert back changes used for testing
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* revert back changes used for testing
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* revert back changes used for testing
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize endpoints, extract host for link from Referer
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize endpoints, extract host for link from Referer
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding swagger docs for reset passw
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding swagger docs for reset passw
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix imports and some typos
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix imports and some typos
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding swagger docs for reset passw
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize endpoints, extract host for link from Referer
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize endpoints, extract host for link from Referer
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* addint test and update swagger for pass reset
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* addint test and update swagger for pass reset
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* addint test and update swagger for pass reset
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding test for endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding test for endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding test for endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding test for endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding endpoint test
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding endpoint test
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding endpoint test
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change token generation
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change token generation
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change token generation
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize and change token gen
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize and change token gen
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize and change token gen
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* addint token and mail
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding token env
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding token env
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix error reporting
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix some comments and update readme
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix some comments and update readme
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix some comments and update readme
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* update readme
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix problmes due merge
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix problmes due merge
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix typos
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix typos
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add trusted certificates
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add endpoint for password change of currently authenticated user
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add env variable for conf reset endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add metadata to users
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add default value for metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add default value for metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* when metadata is not set dont save 'null' string
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change metadata type, add error handling
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove extra char
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* few small fixes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix identityRes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add users metadata
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* password reset, sketching
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reset request endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding token endpoints
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding reset passw endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add logic for token verifying
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove mail from main
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small changes
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add space
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* revert back changes used for testing
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize endpoints, extract host for link from Referer
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize endpoints, extract host for link from Referer
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* addint test and update swagger for pass reset
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* adding endpoint test
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix some comments and update readme
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add env variable for conf reset endpoint
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix tests
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* resolving some style comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* minor fixes due to bad merge
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix problem with unsigned commits
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix problem with unsigned commits
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix call to users.New
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix call to users.New
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* rename file
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* rename to email.go
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* additional comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* additional comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* refactor email util
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* refactor email util
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* refactor email util
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* refactor email util
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove debug bin
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add driver conf for mail
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* refactor email
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* refactor email
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix failing tests
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add testify
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small fix
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add token conf
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small fix
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small fix
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* configurable email template
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix missing var
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add env for email template file
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add env for email template file
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix tests
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix test
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix test
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* revert to master
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove dev container
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small fixes, typos, namings
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* fix typo
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* resolving comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* resolving comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* resolving comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* resolving comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* resolving comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add line
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* return err from email New()
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* change MF_TOKEN_RESET_ENDPOINT
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* add and remove env vars
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* separate password logic into two methods Change and Reset
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* update comments
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* remove blank line
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* update docs
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* dont use camel case
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* small fix
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize email template for passw reset
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
* reorganize email template for passw reset
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2019-10-22 14:53:14 +02:00
|
|
|
Retrieves list of channels connected to specified thing with pagination
|
2019-01-08 11:53:24 +01:00
|
|
|
metadata.
|
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-12-15 00:20:42 +01:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/ThingId"
|
|
|
|
- $ref: "#/components/parameters/Offset"
|
|
|
|
- $ref: "#/components/parameters/Limit"
|
|
|
|
- $ref: "#/components/parameters/Connected"
|
2019-01-08 11:53:24 +01:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ChannelsPageRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2019-01-08 11:53:24 +01:00
|
|
|
description: Failed due to malformed query parameters.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2019-01-08 11:53:24 +01:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Thing does not exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'422':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Database can't process request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
|
|
|
/channels/{chanId}/things:
|
|
|
|
get:
|
2020-12-15 00:20:42 +01:00
|
|
|
summary: List of things connected to specified channel
|
2020-09-23 15:44:39 +02:00
|
|
|
description: |
|
|
|
|
Retrieves list of things connected to specified channel with pagination
|
|
|
|
metadata.
|
|
|
|
tags:
|
|
|
|
- things
|
|
|
|
parameters:
|
2021-01-27 11:42:55 +01:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/ChanId"
|
|
|
|
- $ref: "#/components/parameters/Offset"
|
|
|
|
- $ref: "#/components/parameters/Limit"
|
|
|
|
- $ref: "#/components/parameters/Connected"
|
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ThingsPageRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Failed due to malformed query parameters.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2020-09-23 15:44:39 +02:00
|
|
|
description: A non-existent entity request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'422':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Database can't process request.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2018-05-15 17:13:09 +02:00
|
|
|
/channels/{chanId}/things/{thingId}:
|
2018-03-11 18:06:01 +01:00
|
|
|
put:
|
2018-05-15 17:13:09 +02:00
|
|
|
summary: Connects the thing to the channel
|
2018-03-11 18:06:01 +01:00
|
|
|
description: |
|
2018-05-15 17:13:09 +02:00
|
|
|
Creates connection between a thing and a channel. Once connected to
|
|
|
|
the channel, things are allowed to exchange messages through it.
|
2018-03-11 18:06:01 +01:00
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ChanId"
|
|
|
|
- $ref: "#/components/parameters/ThingId"
|
2018-03-11 18:06:01 +01:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2018-05-15 17:13:09 +02:00
|
|
|
description: Thing connected.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Failed due to malformed query parameters.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2018-03-11 18:06:01 +01:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2018-05-15 17:13:09 +02:00
|
|
|
description: Channel or thing does not exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2018-03-11 18:06:01 +01:00
|
|
|
delete:
|
2018-05-15 17:13:09 +02:00
|
|
|
summary: Disconnects the thing from the channel
|
2018-03-11 18:06:01 +01:00
|
|
|
description: |
|
2018-05-15 17:13:09 +02:00
|
|
|
Removes connection between a thing and a channel. Once connection is
|
|
|
|
removed, thing can no longer exchange messages through the channel.
|
2018-03-11 18:06:01 +01:00
|
|
|
tags:
|
|
|
|
- channels
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/Authorization"
|
|
|
|
- $ref: "#/components/parameters/ChanId"
|
|
|
|
- $ref: "#/components/parameters/ThingId"
|
2018-03-11 18:06:01 +01:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'204':
|
2018-05-15 17:13:09 +02:00
|
|
|
description: Thing disconnected.
|
2020-12-15 00:20:42 +01:00
|
|
|
'400':
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Failed due to malformed query parameters.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2018-03-11 18:06:01 +01:00
|
|
|
description: Missing or invalid access token provided.
|
2020-12-15 00:20:42 +01:00
|
|
|
'404':
|
2018-05-15 17:13:09 +02:00
|
|
|
description: Channel or thing does not exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2021-01-27 11:42:55 +01:00
|
|
|
/channels/{chanId}/access-by-key:
|
2019-07-04 17:06:56 +02:00
|
|
|
post:
|
|
|
|
summary: Checks if thing has access to a channel.
|
|
|
|
description: |
|
2019-10-31 16:36:19 +01:00
|
|
|
Checks if a thing with a specified key has an access to a specified
|
2019-07-04 17:06:56 +02:00
|
|
|
channel and if it has, it returns that things id.
|
|
|
|
tags:
|
|
|
|
- access
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/ChanId"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
|
|
|
$ref: "#/components/requestBodies/IdentityReq"
|
2019-07-04 17:06:56 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/AccessGrantedRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2019-07-04 17:06:56 +02:00
|
|
|
description: |
|
|
|
|
Thing and channel are not connected, or thing with specified key doesn't
|
|
|
|
exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2019-07-04 17:06:56 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2019-07-15 18:28:15 +02:00
|
|
|
/channels/{chanId}/access-by-id:
|
|
|
|
post:
|
|
|
|
summary: Checks if thing has access to a channel.
|
|
|
|
description: |
|
2019-10-31 16:36:19 +01:00
|
|
|
Checks if a thing with a specified ID has an access to a specified
|
2019-07-15 18:28:15 +02:00
|
|
|
channel.
|
|
|
|
tags:
|
|
|
|
- access
|
|
|
|
parameters:
|
2020-09-23 15:44:39 +02:00
|
|
|
- $ref: "#/components/parameters/ChanId"
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/requestBodies/AccessByIDReq"
|
2019-07-15 18:28:15 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2019-07-15 18:28:15 +02:00
|
|
|
description: Thing has access to the specified channel.
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2019-07-15 18:28:15 +02:00
|
|
|
description: |
|
|
|
|
Thing and channel are not connected, or thing with specified ID doesn't
|
|
|
|
exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2019-07-15 18:28:15 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
2019-07-04 17:06:56 +02:00
|
|
|
/identify:
|
|
|
|
post:
|
|
|
|
summary: Validates thing's key and returns it's ID if key is valid.
|
|
|
|
description: |
|
|
|
|
Validates thing's key and returns it's ID if specified key exists
|
|
|
|
and is valid.
|
|
|
|
tags:
|
|
|
|
- identity
|
2020-10-09 15:25:09 +02:00
|
|
|
requestBody:
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/requestBodies/IdentityReq"
|
2019-07-04 17:06:56 +02:00
|
|
|
responses:
|
2020-12-15 00:20:42 +01:00
|
|
|
'200':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/IdentityRes"
|
2020-12-15 00:20:42 +01:00
|
|
|
'401':
|
2019-07-04 17:06:56 +02:00
|
|
|
description: Thing with specified key doesn't exist.
|
2020-12-15 00:20:42 +01:00
|
|
|
'415':
|
2019-07-04 17:06:56 +02:00
|
|
|
description: Missing or invalid content type.
|
2020-12-15 00:20:42 +01:00
|
|
|
'500':
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/responses/ServiceError"
|
|
|
|
|
|
|
|
|
2020-09-23 15:44:39 +02:00
|
|
|
components:
|
|
|
|
schemas:
|
|
|
|
Key:
|
|
|
|
type: string
|
2021-01-27 11:42:55 +01:00
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
description: |
|
|
|
|
Thing key that is used for thing auth. If there is
|
|
|
|
not one provided service will generate one in UUID
|
|
|
|
format.
|
|
|
|
Identity:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
2021-01-27 11:42:55 +01:00
|
|
|
format: uuid
|
|
|
|
description: Thing unique identifier
|
2020-09-23 15:44:39 +02:00
|
|
|
ThingReqSchema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
key:
|
|
|
|
$ref: "#/components/schemas/Key"
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
description: Free-form thing name.
|
|
|
|
metadata:
|
|
|
|
type: object
|
|
|
|
description: Arbitrary, object-encoded thing's data.
|
2020-10-09 15:25:09 +02:00
|
|
|
ThingResSchema:
|
2020-09-23 15:44:39 +02:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
2021-01-27 11:42:55 +01:00
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Unique thing identifier generated by the service.
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
description: Free-form thing name.
|
|
|
|
key:
|
|
|
|
type: string
|
2021-01-27 11:42:55 +01:00
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Auto-generated access key.
|
|
|
|
metadata:
|
|
|
|
type: object
|
|
|
|
description: Arbitrary, object-encoded thing's data.
|
|
|
|
required:
|
|
|
|
- id
|
|
|
|
- type
|
|
|
|
- key
|
|
|
|
ThingsPage:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
things:
|
|
|
|
type: array
|
|
|
|
minItems: 0
|
|
|
|
uniqueItems: true
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/ThingResSchema"
|
|
|
|
total:
|
|
|
|
type: integer
|
|
|
|
description: Total number of items.
|
|
|
|
offset:
|
|
|
|
type: integer
|
|
|
|
description: Number of items to skip during retrieval.
|
|
|
|
limit:
|
|
|
|
type: integer
|
|
|
|
description: Maximum number of items to return in one page.
|
|
|
|
required:
|
2020-10-09 15:25:09 +02:00
|
|
|
- things
|
2020-09-23 15:44:39 +02:00
|
|
|
ChannelReqSchema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
description: Free-form channel name.
|
|
|
|
metadata:
|
|
|
|
type: object
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Arbitrary, object-encoded channel's data.
|
|
|
|
ChannelResSchema:
|
2020-09-23 15:44:39 +02:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
description: Unique channel identifier generated by the service.
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
description: Free-form channel name.
|
|
|
|
metadata:
|
|
|
|
type: object
|
|
|
|
description: Arbitrary, object-encoded channel's data.
|
|
|
|
required:
|
|
|
|
- id
|
|
|
|
ChannelsPage:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
channels:
|
|
|
|
type: array
|
|
|
|
minItems: 0
|
|
|
|
uniqueItems: true
|
|
|
|
items:
|
|
|
|
$ref: "#/components/schemas/ChannelResSchema"
|
|
|
|
total:
|
|
|
|
type: integer
|
|
|
|
description: Total number of items.
|
|
|
|
offset:
|
|
|
|
type: integer
|
|
|
|
description: Number of items to skip during retrieval.
|
|
|
|
limit:
|
|
|
|
type: integer
|
|
|
|
description: Maximum number of items to return in one page.
|
|
|
|
required:
|
|
|
|
- channels
|
|
|
|
ConnectionReqSchema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
channel_ids:
|
|
|
|
type: array
|
2020-10-09 15:25:09 +02:00
|
|
|
description: Channel IDs.
|
2020-09-23 15:44:39 +02:00
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
thing_ids:
|
|
|
|
type: array
|
|
|
|
description: Thing IDs
|
|
|
|
items:
|
|
|
|
type: string
|
2017-09-23 01:03:27 +02:00
|
|
|
|
2020-09-23 15:44:39 +02:00
|
|
|
parameters:
|
|
|
|
Authorization:
|
|
|
|
name: Authorization
|
|
|
|
description: User's access token.
|
|
|
|
in: header
|
|
|
|
schema:
|
2017-09-23 01:03:27 +02:00
|
|
|
type: string
|
2020-12-15 00:20:42 +01:00
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
required: true
|
|
|
|
ChanId:
|
|
|
|
name: chanId
|
|
|
|
description: Unique channel identifier.
|
|
|
|
in: path
|
2020-10-09 15:25:09 +02:00
|
|
|
schema:
|
2017-09-23 01:03:27 +02:00
|
|
|
type: string
|
2020-12-08 21:30:47 +01:00
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
required: true
|
|
|
|
ThingId:
|
|
|
|
name: thingId
|
|
|
|
description: Unique thing identifier.
|
|
|
|
in: path
|
|
|
|
schema:
|
2020-12-08 21:30:47 +01:00
|
|
|
type: string
|
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
required: true
|
|
|
|
Limit:
|
|
|
|
name: limit
|
|
|
|
description: Size of the subset to retrieve.
|
|
|
|
in: query
|
2020-10-09 15:25:09 +02:00
|
|
|
schema:
|
2019-01-08 11:53:24 +01:00
|
|
|
type: integer
|
2020-09-23 15:44:39 +02:00
|
|
|
default: 10
|
|
|
|
maximum: 100
|
|
|
|
minimum: 1
|
|
|
|
required: false
|
|
|
|
Offset:
|
|
|
|
name: offset
|
|
|
|
description: Number of items to skip during retrieval.
|
|
|
|
in: query
|
2020-10-09 15:25:09 +02:00
|
|
|
schema:
|
2019-01-08 11:53:24 +01:00
|
|
|
type: integer
|
2020-09-23 15:44:39 +02:00
|
|
|
default: 0
|
|
|
|
minimum: 0
|
|
|
|
required: false
|
|
|
|
Connected:
|
|
|
|
name: connected
|
|
|
|
description: Connection state of the subset to retrieve.
|
|
|
|
in: query
|
2020-10-09 15:25:09 +02:00
|
|
|
schema:
|
2020-09-23 15:44:39 +02:00
|
|
|
type: boolean
|
|
|
|
default: true
|
|
|
|
required: false
|
|
|
|
Name:
|
|
|
|
name: name
|
|
|
|
description: Name filter. Filtering is performed as a case-insensitive partial match.
|
|
|
|
in: query
|
2020-10-09 15:25:09 +02:00
|
|
|
schema:
|
2017-09-23 01:03:27 +02:00
|
|
|
type: string
|
2020-12-08 21:30:47 +01:00
|
|
|
required: false
|
|
|
|
Order:
|
|
|
|
name: order
|
|
|
|
description: Order type.
|
|
|
|
in: query
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
default: id
|
|
|
|
enum:
|
|
|
|
- name
|
|
|
|
- id
|
|
|
|
required: false
|
|
|
|
Direction:
|
|
|
|
name: dir
|
|
|
|
description: Order direction.
|
|
|
|
in: query
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
default: desc
|
|
|
|
enum:
|
|
|
|
- asc
|
|
|
|
- desc
|
2020-09-23 15:44:39 +02:00
|
|
|
required: false
|
|
|
|
Metadata:
|
|
|
|
name: metadata
|
|
|
|
description: Metadata filter. Filtering is performed matching the parameter with metadata on top level. Parameter is json.
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
schema:
|
2019-10-31 16:36:19 +01:00
|
|
|
type: object
|
2020-09-23 15:44:39 +02:00
|
|
|
additionalProperties: {}
|
|
|
|
|
|
|
|
requestBodies:
|
2020-10-09 15:25:09 +02:00
|
|
|
ThingCreateReq:
|
2020-09-23 15:44:39 +02:00
|
|
|
description: JSON-formatted document describing the new thing.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/ThingReqSchema"
|
2020-10-09 15:25:09 +02:00
|
|
|
ThingsCreateReq:
|
2020-09-23 15:44:39 +02:00
|
|
|
description: JSON-formatted document describing the new things.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
key:
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/schemas/Key"
|
2020-09-23 15:44:39 +02:00
|
|
|
things:
|
|
|
|
type: array
|
2020-10-09 15:25:09 +02:00
|
|
|
items:
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/schemas/ThingReqSchema"
|
2020-10-09 15:25:09 +02:00
|
|
|
ThingUpdateReq:
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Arbitrary, object-encoded thing's data.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
description: Free-form thing name.
|
|
|
|
metadata:
|
|
|
|
type: object
|
2020-10-09 15:25:09 +02:00
|
|
|
KeyUpdateReq:
|
2020-09-23 15:44:39 +02:00
|
|
|
required: true
|
|
|
|
description: JSON containing thing.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
key:
|
|
|
|
type: string
|
2021-01-27 11:42:55 +01:00
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Thing key that is used for thing auth.
|
2020-10-09 15:25:09 +02:00
|
|
|
ChannelCreateReq:
|
2020-09-23 15:44:39 +02:00
|
|
|
description: JSON-formatted document describing the updated channel.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/ChannelReqSchema"
|
2020-10-09 15:25:09 +02:00
|
|
|
ChannelsCreateReq:
|
2020-09-23 15:44:39 +02:00
|
|
|
description: JSON-formatted document describing the new channels.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
2020-10-09 15:25:09 +02:00
|
|
|
properties:
|
2020-09-23 15:44:39 +02:00
|
|
|
key:
|
|
|
|
$ref: "#/components/schemas/Key"
|
|
|
|
things:
|
|
|
|
type: array
|
2020-10-09 15:25:09 +02:00
|
|
|
items:
|
2020-09-23 15:44:39 +02:00
|
|
|
$ref: "#/components/schemas/ChannelReqSchema"
|
2020-10-09 15:25:09 +02:00
|
|
|
ConnCreateReq:
|
2020-09-23 15:44:39 +02:00
|
|
|
description: JSON-formatted document describing the new connection.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/ConnectionReqSchema"
|
|
|
|
IdentityReq:
|
|
|
|
description: JSON-formatted document that contains thing key.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
token:
|
|
|
|
type: string
|
2021-01-27 11:42:55 +01:00
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Thing key that is used for thing auth.
|
|
|
|
required:
|
|
|
|
- token
|
|
|
|
AccessByIDReq:
|
|
|
|
description: JSON-formatted document that contains thing key.
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
2020-10-09 15:25:09 +02:00
|
|
|
schema:
|
2020-09-23 15:44:39 +02:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
thing_id:
|
|
|
|
type: string
|
2021-01-27 11:42:55 +01:00
|
|
|
format: uuid
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Thing ID by which thing is uniquely identified.
|
|
|
|
|
|
|
|
responses:
|
2020-10-09 15:25:09 +02:00
|
|
|
CreateThingRes:
|
|
|
|
description: Thing registered.
|
|
|
|
headers:
|
|
|
|
Location:
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
description: Created thing's relative URL.
|
|
|
|
example: /things/{thingId}
|
|
|
|
ThingRes:
|
|
|
|
description: Data retrieved.
|
2020-09-23 15:44:39 +02:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/schemas/ThingResSchema"
|
|
|
|
ThingsPageRes:
|
2020-09-23 15:44:39 +02:00
|
|
|
description: Data retrieved.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-10-09 15:25:09 +02:00
|
|
|
$ref: "#/components/schemas/ThingsPage"
|
|
|
|
ChannelCreateRes:
|
|
|
|
description: Channel created.
|
|
|
|
headers:
|
|
|
|
Location:
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
description: Created channel's relative URL (i.e. /channels/{chanId}).
|
2020-09-23 15:44:39 +02:00
|
|
|
ChannelRes:
|
|
|
|
description: Data retrieved.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/ChannelResSchema"
|
2020-10-09 15:25:09 +02:00
|
|
|
ChannelsPageRes:
|
|
|
|
description: Data retrieved.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/ChannelsPage"
|
|
|
|
ConnCreateRes:
|
|
|
|
description: Thing registered.
|
|
|
|
headers:
|
|
|
|
Location:
|
|
|
|
content:
|
|
|
|
text/plain:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
description: Created thing's relative URL.
|
|
|
|
example: /things/{thingId}
|
|
|
|
AccessGrantedRes:
|
|
|
|
description: |
|
|
|
|
Thing has access to the specified channel and the thing ID is returned.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/Identity"
|
|
|
|
IdentityRes:
|
|
|
|
description: Thing ID returned.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: "#/components/schemas/Identity"
|
|
|
|
ServiceError:
|
|
|
|
description: Unexpected server-side error occurred.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: byte
|