diff --git a/api/openapi/auth.yml b/api/openapi/auth.yml index 5d798276fd1..a8c2d203636 100644 --- a/api/openapi/auth.yml +++ b/api/openapi/auth.yml @@ -286,7 +286,37 @@ paths: description: Database can't process request. "500": $ref: "#/components/responses/ServiceError" - + /domains/{domainID}/users: + get: + summary: List users assigned to domain + description: | + List users assigned to domain that is identified by the domain ID. + tags: + - Domains + parameters: + - $ref: "auth.yml#/components/parameters/DomainID" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/Status" + security: + - bearerAuth: [] + responses: + "200": + $ref: "#/components/responses/UserPageRes" + description: List of users assigned to domain. + "400": + description: Failed due to malformed domain's ID. + "401": + description: Missing or invalid access token provided. + "403": + description: Unauthorized access the domain ID. + "404": + description: A non-existent entity request. + "422": + description: Database can't process request. + "500": + $ref: "#/components/responses/ServiceError" /domains/{domainID}/users/unassign: post: summary: Unassign users from domain diff --git a/api/openapi/things.yml b/api/openapi/things.yml index 4ed91b8cdfc..12b1650325f 100644 --- a/api/openapi/things.yml +++ b/api/openapi/things.yml @@ -661,68 +661,44 @@ paths: "500": $ref: "#/components/responses/ServiceError" - /things/{thingID}/channels: - get: - summary: List of channels connected to specified thing - description: | - Retrieves list of channels connected to specified thing with pagination - metadata. - tags: - - Channels - parameters: - - $ref: "#/components/parameters/ThingID" - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" - responses: - "200": - $ref: "#/components/responses/ChannelPageRes" - "400": - description: Failed due to malformed query parameters. - "401": - description: Missing or invalid access token provided. - "404": - description: Thing does not exist. - "422": - description: Database can't process request. - "500": - $ref: "#/components/responses/ServiceError" - - /users/{memberID}/channels: + /channels/{memberID}/groups: get: - summary: List of channels connected to specified user + summary: Get group associated with the member description: | - Retrieves list of channels connected to specified user with pagination - metadata. + Gets groups associated with the channel member specified by id. tags: - - Channels + - Groups parameters: - $ref: "#/components/parameters/MemberID" - - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/Status" + - $ref: "#/components/parameters/Tags" + security: + - bearerAuth: [] responses: "200": - $ref: "#/components/responses/ChannelPageRes" + $ref: "#/components/responses/GroupPageRes" "400": description: Failed due to malformed query parameters. "401": description: Missing or invalid access token provided. "404": - description: Thing does not exist. - "422": - description: Database can't process request. + description: Group does not exist. "500": $ref: "#/components/responses/ServiceError" - /groups/{memberID}/channels: + /things/{thingID}/channels: get: - summary: List of channels connected to specified group + summary: List of channels connected to specified thing description: | - Retrieves list of channels connected to specified group with pagination + Retrieves list of channels connected to specified thing with pagination metadata. tags: - Channels parameters: - - $ref: "#/components/parameters/MemberID" + - $ref: "#/components/parameters/ThingID" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Limit" responses: diff --git a/api/openapi/users.yml b/api/openapi/users.yml index e4dd97b3b61..6fad2f26512 100644 --- a/api/openapi/users.yml +++ b/api/openapi/users.yml @@ -812,33 +812,54 @@ paths: description: Group does not exist. "500": $ref: "#/components/responses/ServiceError" - /domains/{domainID}/users: + + /users/{memberID}/channels: get: - summary: List users assigned to domain + summary: List of channels connected to specified user description: | - List users assigned to domain that is identified by the domain ID. + Retrieves list of channels connected to specified user with pagination + metadata. tags: - - Domains + - Channels parameters: - - $ref: "auth.yml#/components/parameters/DomainID" + - $ref: "#/components/parameters/MemberID" + - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Limit" + responses: + "200": + $ref: "#/components/responses/ChannelPageRes" + "400": + description: Failed due to malformed query parameters. + "401": + description: Missing or invalid access token provided. + "404": + description: Thing does not exist. + "422": + description: Database can't process request. + "500": + $ref: "#/components/responses/ServiceError" + + /groups/{memberID}/channels: + get: + summary: List of channels connected to specified group + description: | + Retrieves list of channels connected to specified group with pagination + metadata. + tags: + - Channels + parameters: + - $ref: "#/components/parameters/MemberID" - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/Status" - security: - - bearerAuth: [] + - $ref: "#/components/parameters/Limit" responses: "200": - $ref: "#/components/responses/UserPageRes" - description: List of users assigned to domain. + $ref: "#/components/responses/ChannelPageRes" "400": - description: Failed due to malformed domain's ID. + description: Failed due to malformed query parameters. "401": description: Missing or invalid access token provided. - "403": - description: Unauthorized access the domain ID. "404": - description: A non-existent entity request. + description: Thing does not exist. "422": description: Database can't process request. "500":