openapi: 3.2.0 info: title: Avnet Role API version: '1.0' description: 'Operations tagged Role across 2 of this provider''s published API definitions: avnet-iotconnect-user-aws-prod-swagger.json, avnet-iotconnect-user-azure-prod-swagger.json. Each path carries the servers of the definition it was published in.' security: - Bearer: [] tags: - name: Role description: Role Api List paths: /api/v2.1/Role: post: tags: - Role summary: Add new role description: 'When you create a company, the admin role gets created automatically and the company admin user associates with this role. This API endpoint allows you to create new roles for your company users. A role defines the permissions for users.' responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role is created successfully and returns created role guid. content: application/json: schema: $ref: '#/components/schemas/RoleCreateResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleCreateRequest' description: Json object operationId: postApiV21Role x-operation-id-source: derived /api/v2.1/Role/{roleGuid}: put: tags: - Role summary: Update a role description: This API endpoint is used to update a role. For that, you need to send roleGuid in request url and updated role details in the request body. parameters: - name: roleGuid in: path description: Guid of Role which needs to be updated required: true schema: type: string format: uuid responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role is updated successfully. content: application/json: schema: $ref: '#/components/schemas/SuccessResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleUpdateRequest' description: Json object operationId: putApiV21RoleByRoleGuid x-operation-id-source: derived delete: tags: - Role summary: Delete a role description: This API endpoint allows you to delete a role. For that, you need to send roleGuid in request url. This will not allow you to remove if the role is associated with any user. parameters: - name: roleGuid in: path description: Guid of Role which needs to be deleted required: true schema: type: string format: uuid responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role is deleted successfully. content: application/json: schema: $ref: '#/components/schemas/SuccessResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' operationId: deleteApiV21RoleByRoleGuid x-operation-id-source: derived get: tags: - Role summary: Get single role details description: This API endpoint provides you a detailed description of a role. For that, you need to send roleGuid in request url. parameters: - name: roleGuid in: path description: Role Guid required: true schema: type: string format: uuid responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role details are loaded successfully. content: application/json: schema: $ref: '#/components/schemas/RoleDetailResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' operationId: getApiV21RoleByRoleGuid x-operation-id-source: derived /api/v2.1/Role/{roleGuid}/status: put: tags: - Role summary: Update role status description: This API endpoint allows you to update the active status of a role. For that, you need to send roleGuid in request url. This will not allow you to change active status if the role is associated with any user. parameters: - name: roleGuid in: path description: Guid of Role for which active status needs to be updated required: true schema: type: string format: uuid responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role active status is updated successfully. content: application/json: schema: $ref: '#/components/schemas/SuccessResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleStatusUpdateV2Request' description: Active status. send active/inactive operationId: putApiV21RoleByRoleGuidStatus x-operation-id-source: derived /api/v2.1/Role/lookup: get: tags: - Role summary: Get role list description: This API endpoint gives you the lookup list of available roles in your company. responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role lookup list is loaded successfully. content: application/json: schema: $ref: '#/components/schemas/RoleListResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' operationId: getApiV21RoleLookup x-operation-id-source: derived /api/v2.1/Role/role-user: get: tags: - Role summary: Get role list with user count description: 'Using this API endpoint, you can get the list of available roles in your company along with associated users count. You can also add the filters as given in the parameters. Though the filters are optional, to apply them, you need to send these filter parameters in a query string.' parameters: - name: pageNumber in: query description: 'To fetch specific page data. eg: 2' schema: type: integer format: int32 - name: pageSize in: query description: 'To define number of records in single page. eg: 25' schema: type: integer format: int32 - name: sortBy in: query description: 'To sort the list. To do that, Specify Field name to sort with and sorting order. eg: name asc' schema: type: string - name: Name in: query description: Role Name schema: type: string - name: Status in: query description: status like active,inactive or both schema: type: string - name: Usercount in: query schema: type: string responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role list is loaded successfully. content: application/json: schema: $ref: '#/components/schemas/RoleListWithUserCountResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' operationId: getApiV21RoleRoleUser x-operation-id-source: derived /api/v2/Role: post: tags: - Role summary: Add new role description: 'When you create a company, the admin role gets created automatically and the company admin user associates with this role. This API endpoint allows you to create new roles for your company users. A role defines the permissions for users.' responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role is created successfully and returns created role guid. content: application/json: schema: $ref: '#/components/schemas/RoleCreateResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleCreateRequest' description: Json object operationId: postApiV2Role x-operation-id-source: derived /api/v2/Role/{roleGuid}: put: tags: - Role summary: Update a role description: This API endpoint is used to update a role. For that, you need to send roleGuid in request url and updated role details in the request body. parameters: - name: roleGuid in: path description: Guid of Role which needs to be updated required: true schema: type: string format: uuid responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role is updated successfully. content: application/json: schema: $ref: '#/components/schemas/SuccessResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleUpdateRequest' description: Json object operationId: putApiV2RoleByRoleGuid x-operation-id-source: derived delete: tags: - Role summary: Delete a role description: This API endpoint allows you to delete a role. For that, you need to send roleGuid in request url. This will not allow you to remove if the role is associated with any user. parameters: - name: roleGuid in: path description: Guid of Role which needs to be deleted required: true schema: type: string format: uuid responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role is deleted successfully. content: application/json: schema: $ref: '#/components/schemas/SuccessResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' operationId: deleteApiV2RoleByRoleGuid x-operation-id-source: derived get: tags: - Role summary: Get single role details description: This API endpoint provides you a detailed description of a role. For that, you need to send roleGuid in request url. parameters: - name: roleGuid in: path description: Role Guid required: true schema: type: string format: uuid responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role details are loaded successfully. content: application/json: schema: $ref: '#/components/schemas/RoleDetailResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' operationId: getApiV2RoleByRoleGuid x-operation-id-source: derived /api/v2/Role/{roleGuid}/status: put: tags: - Role summary: Update role status description: This API endpoint allows you to update the active status of a role. For that, you need to send roleGuid in request url. This will not allow you to change active status if the role is associated with any user. parameters: - name: roleGuid in: path description: Guid of Role for which active status needs to be updated required: true schema: type: string format: uuid responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role active status is updated successfully. content: application/json: schema: $ref: '#/components/schemas/SuccessResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleStatusUpdateV2Request' description: Active status. send active/inactive operationId: putApiV2RoleByRoleGuidStatus x-operation-id-source: derived /api/v2/Role/lookup: get: tags: - Role summary: Get role list description: This API endpoint gives you the lookup list of available roles in your company. responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role lookup list is loaded successfully. content: application/json: schema: $ref: '#/components/schemas/RoleListResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' operationId: getApiV2RoleLookup x-operation-id-source: derived /api/v2/Role/role-user: get: tags: - Role summary: Get role list with user count description: 'Using this API endpoint, you can get the list of available roles in your company along with associated users count. You can also add the filters as given in the parameters. Though the filters are optional, to apply them, you need to send these filter parameters in a query string.' parameters: - name: pageNumber in: query description: 'To fetch specific page data. eg: 2' schema: type: integer format: int32 - name: pageSize in: query description: 'To define number of records in single page. eg: 25' schema: type: integer format: int32 - name: sortBy in: query description: 'To sort the list. To do that, Specify Field name to sort with and sorting order. eg: name asc' schema: type: string - name: Name in: query description: Role Name schema: type: string - name: Status in: query description: status like active,inactive or both schema: type: string - name: Usercount in: query schema: type: string responses: '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. '403': description: Indicates that the user is not authorized to access this section. '412': description: Indicates that a condition set for this request is failed, and the request cannot be carried out. '500': description: Indicates that the request could not be carried out because of some technical error on the server. content: application/json: schema: $ref: '#/components/schemas/ErrorsResponse' '200': description: Indicates that role list is loaded successfully. content: application/json: schema: $ref: '#/components/schemas/RoleListWithUserCountResponse' '409': description: 'Indicates that the request could not be carried out because of one of the below or other conflicts on the server Company doesn''t exist, Logged in user is not valid etc.' operationId: getApiV2RoleRoleUser x-operation-id-source: derived components: schemas: RoleDetailResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/RoleDetail' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false RoleListWithUserCountResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/RoleListWithUserCount' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false RoleStatusUpdateV2Request: required: - isActive type: object properties: isActive: minLength: 1 type: string description: 'Updated active status. true: Active, false: Inactive' additionalProperties: false RoleList: type: object properties: guid: type: - string - 'null' readOnly: true name: type: - string - 'null' description: type: - object - 'null' isActive: type: boolean row_num: type: integer format: int32 additionalProperties: false RoleCreateRequest: required: - name type: object properties: name: maxLength: 100 minLength: 1 type: string description: Role Name description: maxLength: 500 type: - string - 'null' description: Role Description solutions: type: - array - 'null' items: type: string description: Solution guid list additionalProperties: false RoleCreateResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/RoleCreate' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false RoleDetail: type: object properties: guid: type: - string - 'null' readOnly: true name: type: - string - 'null' description: type: - string - 'null' solutions: type: - object - 'null' readOnly: true additionalProperties: false RoleCreate: type: object properties: newId: type: - string - 'null' readOnly: true additionalProperties: false ErrorModel: type: object properties: param: type: - string - 'null' message: type: - string - 'null' additionalProperties: false RoleListResponse: type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/RoleList' status: enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 226 - 300 - 301 - 302 - 303 - 304 - 305 - 306 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 421 - 422 - 423 - 424 - 426 - 428 - 429 - 431 - 451 - 500 - 501 - 502 - 503 - 504 - 505 - 506 - 507 - 508 - 510 - 511 type: integer format: int32 message: type: - string - 'null' count: type: - integer - 'null' format: int64 additionalProperties: false RoleListWithUserCount: type: object properties: guid: type: - string - 'null' readOnly: true name: type: - string - 'null' description: type: - string - 'null' createdDate: type: string format: date-time updatedDate: type: string format: date-time createdBy: type: - string - 'null' readOnly: true updatedBy: type: - string - 'null' readOnly: true updatedByName: type: - string - 'null' isactive: type: boolean userCount: type: integer format: int32 additionalProperties: false ErrorsResponse: type: object properties: status: type: integer format: int32 message: type: - string - 'null' error: type: - array - 'null' items: $ref: '#/components/schemas/ErrorModel' additionalProperties: false SuccessResponse: type: object properties: message: type: - string - 'null' status: type: integer format: int32 data: type: - array - 'null' items: type: - object - 'null' additionalProperties: false RoleUpdateRequest: required: - name type: object properties: name: maxLength: 100 minLength: 1 type: string description: Role Name description: maxLength: 500 type: - string - 'null' description: Role Description solutions: type: - array - 'null' items: type: string description: Solution guid list additionalProperties: false securitySchemes: Bearer: type: apiKey description: Please enter JWT with Bearer into field name: Authorization in: header x-refined-from: - avnet-iotconnect-user-aws-prod-swagger.json - avnet-iotconnect-user-azure-prod-swagger.json