diff --git a/api/openapi/auth.yml b/api/openapi/auth.yml index d68ba0ed61b..fd5ff9a12a9 100644 --- a/api/openapi/auth.yml +++ b/api/openapi/auth.yml @@ -286,37 +286,7 @@ 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 @@ -462,7 +432,7 @@ paths: dataset is consumed either by making subsequent requests, or by increasing the subset size of the initial request. parameters: - - $ref: "users.yml#/components/parameters/MemberID" + - $ref: "#/components/parameters/MemberID" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Metadata" @@ -650,7 +620,7 @@ components: ] relation: type: string - enum: ["administrator", "editor", "viewer", "member"] + enum: ["administrator", "editor","viewer","member"] example: "administrator" description: Policy relations. required: @@ -797,6 +767,15 @@ components: schema: type: string required: false + MemberID: + name: memberID + description: Unique member identifier. + in: path + schema: + type: string + format: uuid + required: true + example: bb7edb32-2eac-4aad-aebe-ed96fe073879 requestBodies: DomainCreateReq: diff --git a/api/openapi/users.yml b/api/openapi/users.yml index 776d3f86e14..8fb170ac45a 100644 --- a/api/openapi/users.yml +++ b/api/openapi/users.yml @@ -812,54 +812,33 @@ paths: description: Group does not exist. "500": $ref: "#/components/responses/ServiceError" - - /users/{memberID}/channels: + /domains/{domainID}/users: get: - summary: List of channels connected to specified user + summary: List users assigned to domain description: | - Retrieves list of channels connected to specified user with pagination - metadata. + List users assigned to domain that is identified by the domain ID. tags: - - Channels + - Domains parameters: - - $ref: "#/components/parameters/MemberID" - - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/DomainID" - $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/Limit" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/Status" + security: + - bearerAuth: [] responses: "200": - $ref: "#/components/responses/ChannelPageRes" + $ref: "#/components/responses/UserPageRes" + description: List of users assigned to domain. "400": - description: Failed due to malformed query parameters. + 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: Thing does not exist. + description: A non-existent entity request. "422": description: Database can't process request. "500": @@ -1463,6 +1442,16 @@ components: required: true example: bb7edb32-2eac-4aad-aebe-ed96fe073879 + DomainID: + name: domainID + description: Unique domain identifier. + in: path + schema: + type: string + format: uuid + required: true + example: bb7edb32-2eac-4aad-aebe-ed96fe073879 + MemberID: name: memberID description: Unique member identifier.