mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:20:19 +00:00
MG-2441 - Add domain ID to API (#2442)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
This commit is contained in:
@@ -27,7 +27,7 @@ tags:
|
||||
url: https://docs.magistrala.abstractmachines.fr/
|
||||
|
||||
paths:
|
||||
/things/configs:
|
||||
/{domainID}/things/configs:
|
||||
post:
|
||||
operationId: createConfig
|
||||
summary: Adds new config
|
||||
@@ -36,6 +36,8 @@ paths:
|
||||
the provided access token.
|
||||
tags:
|
||||
- configs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ConfigCreateReq"
|
||||
responses:
|
||||
@@ -70,6 +72,7 @@ paths:
|
||||
tags:
|
||||
- configs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/State"
|
||||
@@ -85,13 +88,14 @@ paths:
|
||||
description: Database can't process request.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
/things/configs/{configId}:
|
||||
/{domainID}/things/configs/{configId}:
|
||||
get:
|
||||
operationId: getConfig
|
||||
summary: Retrieves config info (with channels).
|
||||
tags:
|
||||
- configs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ConfigId"
|
||||
responses:
|
||||
"200":
|
||||
@@ -118,6 +122,7 @@ paths:
|
||||
tags:
|
||||
- configs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ConfigId"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ConfigUpdateReq"
|
||||
@@ -147,6 +152,7 @@ paths:
|
||||
tags:
|
||||
- configs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ConfigId"
|
||||
responses:
|
||||
"204":
|
||||
@@ -161,7 +167,7 @@ paths:
|
||||
description: Database can't process request.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
/things/configs/certs/{configId}:
|
||||
/{domainID}/things/configs/certs/{configId}:
|
||||
patch:
|
||||
operationId: updateConfigCerts
|
||||
summary: Updates certs
|
||||
@@ -171,6 +177,7 @@ paths:
|
||||
tags:
|
||||
- configs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ConfigId"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ConfigCertUpdateReq"
|
||||
@@ -192,7 +199,7 @@ paths:
|
||||
description: Database can't process request.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
/things/configs/connections/{configId}:
|
||||
/{domainID}/things/configs/connections/{configId}:
|
||||
put:
|
||||
operationId: updateConfigConnections
|
||||
summary: Updates channels the thing is connected to
|
||||
@@ -202,6 +209,7 @@ paths:
|
||||
tags:
|
||||
- configs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ConfigId"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ConfigConnUpdateReq"
|
||||
@@ -273,7 +281,7 @@ paths:
|
||||
description: Database can't process request.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
/things/state/{configId}:
|
||||
/{domainID}/things/state/{configId}:
|
||||
put:
|
||||
operationId: updateConfigState
|
||||
summary: Updates Config state.
|
||||
@@ -283,6 +291,7 @@ paths:
|
||||
tags:
|
||||
- configs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ConfigId"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ConfigStateUpdateReq"
|
||||
|
||||
+10
-3
@@ -27,13 +27,15 @@ tags:
|
||||
url: https://docs.magistrala.abstractmachines.fr/
|
||||
|
||||
paths:
|
||||
/certs:
|
||||
/{domainID}/certs:
|
||||
post:
|
||||
operationId: createCert
|
||||
summary: Creates a certificate for thing
|
||||
description: Creates a certificate for thing
|
||||
tags:
|
||||
- certs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/CertReq"
|
||||
responses:
|
||||
@@ -51,7 +53,7 @@ paths:
|
||||
description: Database can't process request.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
/certs/{certID}:
|
||||
/{domainID}/certs/{certID}:
|
||||
get:
|
||||
operationId: getCert
|
||||
summary: Retrieves a certificate
|
||||
@@ -60,6 +62,7 @@ paths:
|
||||
tags:
|
||||
- certs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/CertID"
|
||||
responses:
|
||||
"200":
|
||||
@@ -85,10 +88,13 @@ paths:
|
||||
tags:
|
||||
- certs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/CertID"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/components/responses/RevokeRes"
|
||||
"400":
|
||||
description: Failed due to malformed query parameters.
|
||||
"401":
|
||||
description: Missing or invalid access token provided.
|
||||
"403":
|
||||
@@ -100,7 +106,7 @@ paths:
|
||||
description: Database can't process request.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
/serials/{thingID}:
|
||||
/{domainID}/serials/{thingID}:
|
||||
get:
|
||||
operationId: getSerials
|
||||
summary: Retrieves certificates' serial IDs
|
||||
@@ -109,6 +115,7 @@ paths:
|
||||
tags:
|
||||
- certs
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
responses:
|
||||
"200":
|
||||
|
||||
+21
-54
@@ -27,7 +27,7 @@ tags:
|
||||
url: https://docs.magistrala.abstractmachines.fr/
|
||||
|
||||
paths:
|
||||
/invitations:
|
||||
/{domainID}/invitations:
|
||||
post:
|
||||
operationId: sendInvitation
|
||||
tags:
|
||||
@@ -35,6 +35,8 @@ paths:
|
||||
summary: Send invitation
|
||||
description: |
|
||||
Send invitation to user to join domain.
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/SendInvitationReq"
|
||||
security:
|
||||
@@ -70,7 +72,7 @@ paths:
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/UserID"
|
||||
- $ref: "#/components/parameters/InvitedBy"
|
||||
- $ref: "#/components/parameters/DomainID"
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/Relation"
|
||||
- $ref: "#/components/parameters/State"
|
||||
security:
|
||||
@@ -91,7 +93,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/invitations/accept:
|
||||
/{domainID}/invitations/accept:
|
||||
post:
|
||||
operationId: acceptInvitation
|
||||
summary: Accept invitation
|
||||
@@ -101,8 +103,8 @@ paths:
|
||||
- Invitations
|
||||
security:
|
||||
- bearerAuth: []
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/AcceptInvitationReq"
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
responses:
|
||||
"204":
|
||||
description: Invitation accepted.
|
||||
@@ -112,10 +114,12 @@ paths:
|
||||
description: Missing or invalid access token provided.
|
||||
"404":
|
||||
description: A non-existent entity request.
|
||||
"415":
|
||||
description: Missing or invalid content type.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/invitations/reject:
|
||||
/{domainID}/invitations/reject:
|
||||
post:
|
||||
operationId: rejectInvitation
|
||||
summary: Reject invitation
|
||||
@@ -125,8 +129,8 @@ paths:
|
||||
- Invitations
|
||||
security:
|
||||
- bearerAuth: []
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/AcceptInvitationReq"
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
responses:
|
||||
"204":
|
||||
description: Invitation rejected.
|
||||
@@ -136,10 +140,12 @@ paths:
|
||||
description: Missing or invalid access token provided.
|
||||
"404":
|
||||
description: A non-existent entity request.
|
||||
"415":
|
||||
description: Missing or invalid content type.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/invitations/{user_id}/{domain_id}:
|
||||
/{domainID}/invitations/users/{user_id}:
|
||||
get:
|
||||
operationId: getInvitation
|
||||
summary: Retrieves a specific invitation
|
||||
@@ -149,7 +155,7 @@ paths:
|
||||
- Invitations
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/user_id"
|
||||
- $ref: "#/components/parameters/domain_id"
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
@@ -161,6 +167,8 @@ paths:
|
||||
description: Missing or invalid access token provided.
|
||||
"404":
|
||||
description: A non-existent entity request.
|
||||
"415":
|
||||
description: Missing or invalid content type.
|
||||
"422":
|
||||
description: Database can't process request.
|
||||
"500":
|
||||
@@ -175,7 +183,7 @@ paths:
|
||||
- Invitations
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/user_id"
|
||||
- $ref: "#/components/parameters/domain_id"
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
@@ -187,6 +195,8 @@ paths:
|
||||
description: Failed due to non existing user.
|
||||
"401":
|
||||
description: Missing or invalid access token provided.
|
||||
"415":
|
||||
description: Missing or invalid content type.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
@@ -212,11 +222,6 @@ components:
|
||||
format: uuid
|
||||
example: bb7edb32-2eac-4aad-aebe-ed96fe073879
|
||||
description: User unique identifier.
|
||||
domain_id:
|
||||
type: string
|
||||
format: uuid
|
||||
example: bb7edb32-2eac-4aad-aebe-ed96fe073879
|
||||
description: Domain unique identifier.
|
||||
relation:
|
||||
type: string
|
||||
enum:
|
||||
@@ -238,7 +243,6 @@ components:
|
||||
description: Resend invitation.
|
||||
required:
|
||||
- user_id
|
||||
- domain_id
|
||||
- relation
|
||||
|
||||
Invitation:
|
||||
@@ -394,26 +398,6 @@ components:
|
||||
required: true
|
||||
example: bb7edb32-2eac-4aad-aebe-ed96fe073879
|
||||
|
||||
DomainID:
|
||||
name: domain_id
|
||||
description: Unique identifier for a domain.
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
required: false
|
||||
example: bb7edb32-2eac-4aad-aebe-ed96fe073879
|
||||
|
||||
domain_id:
|
||||
name: domain_id
|
||||
description: Unique identifier for a domain.
|
||||
in: path
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
required: true
|
||||
example: bb7edb32-2eac-4aad-aebe-ed96fe073879
|
||||
|
||||
InvitedBy:
|
||||
name: invited_by
|
||||
description: Unique identifier for a user that invited the user.
|
||||
@@ -466,22 +450,6 @@ components:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SendInvitationReqObj"
|
||||
|
||||
AcceptInvitationReq:
|
||||
description: JSON-formatted document describing request for accepting invitation
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
domain_id:
|
||||
type: string
|
||||
format: uuid
|
||||
example: bb7edb32-2eac-4aad-aebe-ed96fe073879
|
||||
description: Domain unique identifier.
|
||||
required:
|
||||
- domain_id
|
||||
|
||||
responses:
|
||||
InvitationRes:
|
||||
description: Data retrieved.
|
||||
@@ -494,7 +462,6 @@ components:
|
||||
operationId: deleteInvitation
|
||||
parameters:
|
||||
user_id: $response.body#/user_id
|
||||
domain_id: $response.body#/domain_id
|
||||
|
||||
InvitationPageRes:
|
||||
description: Data retrieved.
|
||||
|
||||
@@ -27,12 +27,14 @@ tags:
|
||||
url: https://docs.magistrala.abstractmachines.fr/
|
||||
|
||||
paths:
|
||||
/mapping:
|
||||
/{domainID}/mapping:
|
||||
post:
|
||||
summary: Adds new device to proxy
|
||||
description: Adds new device to proxy
|
||||
tags:
|
||||
- provision
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ProvisionReq"
|
||||
responses:
|
||||
@@ -55,6 +57,8 @@ paths:
|
||||
configuration created with provision service.
|
||||
tags:
|
||||
- provision
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/components/responses/ProvisionRes"
|
||||
|
||||
+69
-26
@@ -37,7 +37,7 @@ tags:
|
||||
url: https://docs.magistrala.abstractmachines.fr/
|
||||
|
||||
paths:
|
||||
/things:
|
||||
/{domainID}/things:
|
||||
post:
|
||||
operationId: createThing
|
||||
tags:
|
||||
@@ -46,6 +46,8 @@ paths:
|
||||
description: |
|
||||
Adds new thing to the list of things owned by user identified using
|
||||
the provided access token.
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ThingCreateReq"
|
||||
responses:
|
||||
@@ -79,6 +81,7 @@ paths:
|
||||
dataset is consumed either by making subsequent requests, or by
|
||||
increasing the subset size of the initial request.
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/Metadata"
|
||||
@@ -104,13 +107,15 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/things/bulk:
|
||||
/{domainID}/things/bulk:
|
||||
post:
|
||||
operationId: bulkCreateThings
|
||||
summary: Bulk provisions new things
|
||||
description: |
|
||||
Adds new things to the list of things owned by user identified using
|
||||
the provided access token.
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
tags:
|
||||
- Things
|
||||
requestBody:
|
||||
@@ -133,7 +138,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/things/{thingID}:
|
||||
/{domainID}/things/{thingID}:
|
||||
get:
|
||||
operationId: getThing
|
||||
summary: Retrieves thing info
|
||||
@@ -142,12 +147,15 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/components/responses/ThingRes"
|
||||
"400":
|
||||
description: Failed due to malformed domain ID.
|
||||
"401":
|
||||
description: Missing or invalid access token provided.
|
||||
"403":
|
||||
@@ -169,6 +177,7 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ThingUpdateReq"
|
||||
@@ -201,12 +210,15 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
"204":
|
||||
description: Thing deleted.
|
||||
"400":
|
||||
description: Failed due to malformed domain ID.
|
||||
"401":
|
||||
description: Missing or invalid access token provided.
|
||||
"403":
|
||||
@@ -215,7 +227,8 @@ paths:
|
||||
description: Missing thing.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
/things/{thingID}/tags:
|
||||
|
||||
/{domainID}/things/{thingID}/tags:
|
||||
patch:
|
||||
operationId: updateThingTags
|
||||
summary: Updates tags the thing.
|
||||
@@ -225,6 +238,7 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ThingUpdateTagsReq"
|
||||
@@ -246,7 +260,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/things/{thingID}/secret:
|
||||
/{domainID}/things/{thingID}/secret:
|
||||
patch:
|
||||
operationId: updateThingSecret
|
||||
summary: Updates Secret of the identified thing.
|
||||
@@ -256,6 +270,7 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ThingUpdateSecretReq"
|
||||
@@ -281,7 +296,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/things/{thingID}/disable:
|
||||
/{domainID}/things/{thingID}/disable:
|
||||
post:
|
||||
operationId: disableThing
|
||||
summary: Disables a thing
|
||||
@@ -290,6 +305,7 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -311,7 +327,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/things/{thingID}/enable:
|
||||
/{domainID}/things/{thingID}/enable:
|
||||
post:
|
||||
operationId: enableThing
|
||||
summary: Enables a thing
|
||||
@@ -320,6 +336,7 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -341,7 +358,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/things/{thingID}/share:
|
||||
/{domainID}/things/{thingID}/share:
|
||||
post:
|
||||
operationId: shareThing
|
||||
summary: Shares a thing
|
||||
@@ -350,6 +367,7 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ShareThingReq"
|
||||
@@ -371,7 +389,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/things/{thingID}/unshare:
|
||||
/{domainID}/things/{thingID}/unshare:
|
||||
post:
|
||||
operationId: unshareThing
|
||||
summary: Unshares a thing
|
||||
@@ -380,6 +398,7 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/ShareThingReq"
|
||||
@@ -401,7 +420,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/things:
|
||||
/{domainID}/channels/{chanID}/things:
|
||||
get:
|
||||
operationId: listThingsInaChannel
|
||||
summary: List of things connected to specified channel
|
||||
@@ -411,6 +430,7 @@ paths:
|
||||
tags:
|
||||
- Things
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
@@ -431,7 +451,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels:
|
||||
/{domainID}/channels:
|
||||
post:
|
||||
operationId: createChannel
|
||||
tags:
|
||||
@@ -443,6 +463,8 @@ paths:
|
||||
$ref: "#/components/requestBodies/ChannelCreateReq"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
responses:
|
||||
"201":
|
||||
$ref: "#/components/responses/ChannelCreateRes"
|
||||
@@ -476,6 +498,7 @@ paths:
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/Metadata"
|
||||
@@ -496,7 +519,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}:
|
||||
/{domainID}/channels/{chanID}:
|
||||
get:
|
||||
operationId: getChannel
|
||||
summary: Retrieves channel info.
|
||||
@@ -505,6 +528,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -512,7 +536,7 @@ paths:
|
||||
"200":
|
||||
$ref: "#/components/responses/ChannelRes"
|
||||
"400":
|
||||
description: Failed due to malformed channel's ID.
|
||||
description: Failed due to malformed channel's or domain ID.
|
||||
"401":
|
||||
description: Missing or invalid access token provided.
|
||||
"403":
|
||||
@@ -534,6 +558,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -566,12 +591,15 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
"204":
|
||||
description: Channel deleted.
|
||||
"400":
|
||||
description: Failed due to malformed domain ID.
|
||||
"401":
|
||||
description: Missing or invalid access token provided.
|
||||
"403":
|
||||
@@ -581,7 +609,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/enable:
|
||||
/{domainID}/channels/{chanID}/enable:
|
||||
post:
|
||||
operationId: enableChannel
|
||||
summary: Enables a channel
|
||||
@@ -590,6 +618,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -611,7 +640,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/disable:
|
||||
/{domainID}/channels/{chanID}/disable:
|
||||
post:
|
||||
operationId: disableChannel
|
||||
summary: Disables a channel
|
||||
@@ -620,6 +649,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -641,7 +671,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/users/assign:
|
||||
/{domainID}/channels/{chanID}/users/assign:
|
||||
post:
|
||||
operationId: assignUsersToChannel
|
||||
summary: Assigns a member to a channel
|
||||
@@ -650,6 +680,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/AssignUserReq"
|
||||
@@ -671,7 +702,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/users/unassign:
|
||||
/{domainID}/channels/{chanID}/users/unassign:
|
||||
post:
|
||||
operationId: unassignUsersFromChannel
|
||||
summary: Unassigns a member from a channel
|
||||
@@ -680,6 +711,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/AssignUserReq"
|
||||
@@ -701,7 +733,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/groups/assign:
|
||||
/{domainID}/channels/{chanID}/groups/assign:
|
||||
post:
|
||||
operationId: assignGroupsToChannel
|
||||
summary: Assigns a member to a channel
|
||||
@@ -710,6 +742,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/AssignUsersReq"
|
||||
@@ -731,7 +764,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/groups/unassign:
|
||||
/{domainID}/channels/{chanID}/groups/unassign:
|
||||
post:
|
||||
operationId: unassignGroupsFromChannel
|
||||
summary: Unassigns a member from a channel
|
||||
@@ -740,6 +773,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/AssignUsersReq"
|
||||
@@ -761,7 +795,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/things/{thingID}/channels:
|
||||
/{domainID}/things/{thingID}/channels:
|
||||
get:
|
||||
operationId: listChannelsConnectedToThing
|
||||
summary: List of channels connected to specified thing
|
||||
@@ -771,6 +805,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
@@ -790,7 +825,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/users/{memberID}/channels:
|
||||
/{domainID}/users/{memberID}/channels:
|
||||
get:
|
||||
operationId: listChannelsConnectedToUser
|
||||
summary: List of channels connected to specified user
|
||||
@@ -800,6 +835,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/MemberID"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
@@ -819,7 +855,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups/{memberID}/channels:
|
||||
/{domainID}/groups/{memberID}/channels:
|
||||
get:
|
||||
operationId: listChannelsConnectedToGroup
|
||||
summary: List of channels connected to specified group
|
||||
@@ -829,6 +865,7 @@ paths:
|
||||
tags:
|
||||
- Channels
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/MemberID"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
@@ -848,13 +885,15 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/connect:
|
||||
/{domainID}/connect:
|
||||
post:
|
||||
operationId: connectThingsAndChannels
|
||||
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.
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
tags:
|
||||
- Policies
|
||||
requestBody:
|
||||
@@ -879,13 +918,15 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/disconnect:
|
||||
/{domainID}/disconnect:
|
||||
post:
|
||||
operationId: disconnectThingsAndChannels
|
||||
summary: Disconnect things and channels using lists of IDs.
|
||||
description: |
|
||||
Disconnect things from channels specified by lists of IDs.
|
||||
Channels and things are owned by user identified using the provided access token.
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
tags:
|
||||
- Policies
|
||||
requestBody:
|
||||
@@ -908,7 +949,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/things/{thingID}/connect:
|
||||
/{domainID}/channels/{chanID}/things/{thingID}/connect:
|
||||
post:
|
||||
operationId: connectThingToChannel
|
||||
summary: Connects a thing to a channel
|
||||
@@ -917,6 +958,7 @@ paths:
|
||||
tags:
|
||||
- Policies
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
responses:
|
||||
@@ -935,7 +977,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{chanID}/things/{thingID}/disconnect:
|
||||
/{domainID}/channels/{chanID}/things/{thingID}/disconnect:
|
||||
post:
|
||||
operationId: disconnectThingFromChannel
|
||||
summary: Disconnects a thing to a channel
|
||||
@@ -944,6 +986,7 @@ paths:
|
||||
tags:
|
||||
- Policies
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/chanID"
|
||||
- $ref: "#/components/parameters/ThingID"
|
||||
responses:
|
||||
|
||||
+27
-11
@@ -606,7 +606,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups:
|
||||
/{domainID}/groups:
|
||||
post:
|
||||
operationId: createGroup
|
||||
tags:
|
||||
@@ -615,6 +615,8 @@ paths:
|
||||
description: |
|
||||
Creates new group that can be used for grouping entities. New account will
|
||||
be uniquely identified by its identity.
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/GroupCreateReq"
|
||||
security:
|
||||
@@ -652,6 +654,7 @@ paths:
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
- $ref: "#/components/parameters/Level"
|
||||
@@ -675,7 +678,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups/{groupID}:
|
||||
/{domainID}/groups/{groupID}:
|
||||
get:
|
||||
operationId: getGroup
|
||||
summary: Gets group info.
|
||||
@@ -684,6 +687,7 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -711,6 +715,7 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -743,12 +748,15 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
"204":
|
||||
description: Group deleted.
|
||||
"400":
|
||||
description: Failed due to malformed query parameters.
|
||||
"401":
|
||||
description: Missing or invalid access token provided.
|
||||
"403":
|
||||
@@ -758,7 +766,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups/{groupID}/children:
|
||||
/{domainID}/groups/{groupID}/children:
|
||||
get:
|
||||
operationId: listChildren
|
||||
summary: List children of a certain group
|
||||
@@ -772,6 +780,7 @@ paths:
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
@@ -796,7 +805,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups/{groupID}/parents:
|
||||
/{domainID}/groups/{groupID}/parents:
|
||||
get:
|
||||
operationId: listParents
|
||||
summary: List parents of a certain group
|
||||
@@ -810,6 +819,7 @@ paths:
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
@@ -834,7 +844,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups/{groupID}/enable:
|
||||
/{domainID}/groups/{groupID}/enable:
|
||||
post:
|
||||
operationId: enableGroup
|
||||
summary: Enables a group
|
||||
@@ -843,6 +853,7 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -866,7 +877,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups/{groupID}/disable:
|
||||
/{domainID}/groups/{groupID}/disable:
|
||||
post:
|
||||
operationId: disableGroup
|
||||
summary: Disables a group
|
||||
@@ -875,6 +886,7 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -898,7 +910,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups/{groupID}/users/assign:
|
||||
/{domainID}/groups/{groupID}/users/assign:
|
||||
post:
|
||||
operationId: assignUser
|
||||
summary: Assigns a user to a group
|
||||
@@ -907,6 +919,7 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/AssignUserReq"
|
||||
@@ -930,7 +943,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/groups/{groupID}/users/unassign:
|
||||
/{domainID}/groups/{groupID}/users/unassign:
|
||||
post:
|
||||
operationId: unassignUser
|
||||
summary: Unassigns a user to a group
|
||||
@@ -939,6 +952,7 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/GroupID"
|
||||
requestBody:
|
||||
$ref: "#/components/requestBodies/AssignUserReq"
|
||||
@@ -962,7 +976,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/channels/{memberID}/groups:
|
||||
/{domainID}/channels/{memberID}/groups:
|
||||
get:
|
||||
operationId: listGroupsInChannel
|
||||
summary: Get group associated with the member
|
||||
@@ -971,6 +985,7 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/MemberID"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
@@ -995,7 +1010,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
|
||||
/users/{memberID}/groups:
|
||||
/{domainID}/users/{memberID}/groups:
|
||||
get:
|
||||
operationId: listGroupsByUser
|
||||
summary: Get group associated with the member
|
||||
@@ -1004,6 +1019,7 @@ paths:
|
||||
tags:
|
||||
- Groups
|
||||
parameters:
|
||||
- $ref: "auth.yml#/components/parameters/DomainID"
|
||||
- $ref: "#/components/parameters/MemberID"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- $ref: "#/components/parameters/Offset"
|
||||
@@ -1027,7 +1043,7 @@ paths:
|
||||
description: Database can't process request.
|
||||
"500":
|
||||
$ref: "#/components/responses/ServiceError"
|
||||
/domains/{domainID}/users:
|
||||
/{domainID}/users:
|
||||
get:
|
||||
summary: List users assigned to domain
|
||||
description: |
|
||||
|
||||
Reference in New Issue
Block a user