openapi: 3.2.0 info: title: Avnet Auth API version: '1.0' description: 'Operations tagged Auth across 2 of this provider''s published API definitions: avnet-iotconnect-auth-aws-prod-swagger.json, avnet-iotconnect-auth-azure-prod-swagger.json. Each path carries the servers of the definition it was published in.' security: - Bearer: [] tags: - name: Auth description: Auth Api List paths: /api/v2.1/Auth/basic-token: get: tags: - Auth summary: Generate basic token description: We are using the OAuth 2.0 protocol for authentication and authorization. Login API endpoint needs basic authentication to validate your request. This API endpoint will generate that basic authentication token, which you need for the Login API endpoint. This token informs the API that the bearer of the token has been authorized to access the Login API. responses: '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/ConflictErrorModel' '200': description: Indicates that basic token is created successfully and returns generated basic token content: application/json: schema: $ref: '#/components/schemas/BasicTokenCreateResponse' operationId: getApiV21AuthBasicToken x-operation-id-source: derived /api/v2.1/Auth/login: post: tags: - Auth summary: Login description: 'Before you can access private data using IoTConnect API, you must obtain an access token that grants access to that API. A single access token can grant varying degrees of access to multiple IoTConnect APIs. Once you get an access token, send it to IoTConnect API in an HTTP authorization header. Access tokens are valid only for the set of operations and resources described in the scope of the token. Along with an access token, you will also receive a refresh token. This refresh token allows you to get new access tokens. We are using the OAuth 2.0 protocol for authentication and authorization. To begin, obtain a basic token from the basic token API endpoint. Then, request an access token from the IoTConnect Authorization Server, extract a token from the response, and send the token to the IoTConnect API that you want to access. During the access token request, you need to pass your IoTConnect account username and password in body. While in Request Header, you need to submit basic token and solution key.' parameters: - name: solution-key in: header required: true schema: type: string responses: '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/ConflictErrorModel' '200': description: Indicates that access token is created successfully and returns generated access token along with refresh token content: application/json: schema: $ref: '#/components/schemas/LoginResponse' '401': description: Indicates that authentication is failed because of the wrong username/password or the user is not authorized to access given solution. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' requestBody: content: application/json: schema: $ref: '#/components/schemas/LoginRequest' operationId: postApiV21AuthLogin x-operation-id-source: derived /api/v2.1/Auth/refresh-token: post: tags: - Auth summary: Refresh access token description: 'Access tokens have a limited lifespan. If you need access to the IoTConnect API beyond the lifespan of a single access token, get a refresh token. A refresh token allows you to obtain new access tokens. During the refresh token request, you need to send refresh_token, which you received in the login API endpoint response.' responses: '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/ConflictErrorModel' '200': description: Indicates that refresh token is created successfully and returns generated access token along with new refresh token content: application/json: schema: $ref: '#/components/schemas/LoginResponse' '409': description: Indicates that supplied refresh token is not valid. requestBody: content: application/json: schema: $ref: '#/components/schemas/RefreshTokenRequest' operationId: postApiV21AuthRefreshToken x-operation-id-source: derived /api/v2.1/Auth/verify-token: get: tags: - Auth summary: Verify access token description: This API endpoint verifies the validity of your access token. responses: '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/ConflictErrorModel' '200': description: Indicates that access token is verified successfully content: application/json: schema: $ref: '#/components/schemas/ArrayBaseResponse' '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. operationId: getApiV21AuthVerifyToken x-operation-id-source: derived /api/v2.1/Auth/m-login: post: tags: - Auth summary: Login from Mobile description: 'This Api endpoint will be used for mobile application login. Before your mobile device can access private data using IoTConnect API, you must obtain an access token that grants access to that API. A single access token can grant varying degrees of access to multiple IoTConnect APIs. Once you get an access token, send it to IoTConnect API in an HTTP authorization header. Access tokens are valid only for the set of operations and resources described in the scope of the token. Along with an access token, you will also receive a refresh token. This refresh token allows you to get new access tokens. We are using the OAuth 2.0 protocol for authentication and authorization. To begin, obtain a basic token from the basic token API endpoint. Then, request an access token from the IoTConnect Authorization Server, extract a token from the response, and send the token to the IoTConnect API that you want to access. During the access token request, you need to send username and password along with deviceType, osName, osVersion, uuid and deviceToken in the request body. While in Request Header, you need to submit a basic token and solution key.' parameters: - name: solution-key in: header required: true schema: type: string responses: '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/ConflictErrorModel' '200': description: Indicates that access token is created successfully and returns generated access token along with refresh token content: application/json: schema: $ref: '#/components/schemas/MobileLoginResponse' '401': description: Indicates that authentication is failed because of the wrong username/password or the user is not authorized to access given solution. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' requestBody: content: application/json: schema: $ref: '#/components/schemas/MobileLoginRequest' operationId: postApiV21AuthMLogin x-operation-id-source: derived /api/v2.1/Auth/cognito/login: post: tags: - Auth summary: Cognito Login parameters: - name: solution-key in: header required: true schema: type: string responses: '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/ConflictErrorModel' '200': description: Indicates that the CognitoLogin request completed successfully. content: application/json: schema: $ref: '#/components/schemas/CognitoLoginResponse' '401': description: Authentication failed due to invalid, expired, or missing token. requestBody: content: application/json: schema: $ref: '#/components/schemas/CognitoLoginRequest' description: The request object operationId: postApiV21AuthCognitoLogin x-operation-id-source: derived /api/v2.1/Auth/cognito/validate-otp: post: tags: - Auth summary: Cognito Validate OTP parameters: - name: solution-key in: header required: true schema: type: string responses: '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/ConflictErrorModel' '200': description: Indicates that the CognitoValidateOTP request completed successfully. content: application/json: schema: $ref: '#/components/schemas/CognitoValidateOTPResponse' '401': description: Authentication failed due to invalid, expired, or missing token. requestBody: content: application/json: schema: $ref: '#/components/schemas/CognitoValidateOTPRequest' description: The request object operationId: postApiV21AuthCognitoValidateOtp x-operation-id-source: derived /api/v2.1/Auth/cognito/change-password: post: tags: - Auth summary: Cognito Change Password responses: '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/ConflictErrorModel' '200': description: Indicates that the CognitoChangePassword request completed successfully. content: application/json: schema: $ref: '#/components/schemas/CognitoChangePasswordResponse' '401': description: Authentication failed due to invalid, expired, or missing token. requestBody: content: application/json: schema: $ref: '#/components/schemas/CognitoForceChangePasswordRequest' description: The request object operationId: postApiV21AuthCognitoChangePassword x-operation-id-source: derived /api/v2.1/Auth/cognito/change-password/force: post: tags: - Auth summary: Cognito Change Password responses: '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/ConflictErrorModel' '200': description: Indicates that the CognitoChangePassword request completed successfully. content: application/json: schema: $ref: '#/components/schemas/CognitoChangePasswordResponse' '401': description: Authentication failed due to invalid, expired, or missing token. requestBody: content: application/json: schema: $ref: '#/components/schemas/CognitoChangePasswordRequest' description: The request object operationId: postApiV21AuthCognitoChangePasswordForce x-operation-id-source: derived /api/v2/Auth/basic-token: get: tags: - Auth summary: Generate basic token description: We are using the OAuth 2.0 protocol for authentication and authorization. Login API endpoint needs basic authentication to validate your request. This API endpoint will generate that basic authentication token, which you need for the Login API endpoint. This token informs the API that the bearer of the token has been authorized to access the Login API. responses: '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/ConflictErrorModel' '200': description: Indicates that basic token is created successfully and returns generated basic token content: application/json: schema: $ref: '#/components/schemas/BasicTokenCreateResponse' operationId: getApiV2AuthBasicToken x-operation-id-source: derived /api/v2/Auth/login: post: tags: - Auth summary: Login description: 'Before you can access private data using IoTConnect API, you must obtain an access token that grants access to that API. A single access token can grant varying degrees of access to multiple IoTConnect APIs. Once you get an access token, send it to IoTConnect API in an HTTP authorization header. Access tokens are valid only for the set of operations and resources described in the scope of the token. Along with an access token, you will also receive a refresh token. This refresh token allows you to get new access tokens. We are using the OAuth 2.0 protocol for authentication and authorization. To begin, obtain a basic token from the basic token API endpoint. Then, request an access token from the IoTConnect Authorization Server, extract a token from the response, and send the token to the IoTConnect API that you want to access. During the access token request, you need to pass your IoTConnect account username and password in body. While in Request Header, you need to submit basic token and solution key.' parameters: - name: solution-key in: header required: true schema: type: string responses: '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/ConflictErrorModel' '200': description: Indicates that access token is created successfully and returns generated access token along with refresh token content: application/json: schema: $ref: '#/components/schemas/LoginResponse' '401': description: Indicates that authentication is failed because of the wrong username/password or the user is not authorized to access given solution. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse_2' requestBody: content: application/json: schema: $ref: '#/components/schemas/LoginRequest' operationId: postApiV2AuthLogin x-operation-id-source: derived /api/v2/Auth/refresh-token: post: tags: - Auth summary: Refresh access token description: 'Access tokens have a limited lifespan. If you need access to the IoTConnect API beyond the lifespan of a single access token, get a refresh token. A refresh token allows you to obtain new access tokens. During the refresh token request, you need to send refresh_token, which you received in the login API endpoint response.' responses: '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/ConflictErrorModel' '200': description: Indicates that refresh token is created successfully and returns generated access token along with new refresh token content: application/json: schema: $ref: '#/components/schemas/LoginResponse' '409': description: Indicates that supplied refresh token is not valid. requestBody: content: application/json: schema: $ref: '#/components/schemas/RefreshTokenRequest' operationId: postApiV2AuthRefreshToken x-operation-id-source: derived /api/v2/Auth/verify-token: get: tags: - Auth summary: Verify access token description: This API endpoint verifies the validity of your access token. responses: '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/ConflictErrorModel' '200': description: Indicates that access token is verified successfully content: application/json: schema: $ref: '#/components/schemas/ArrayBaseResponse' '401': description: Indicates that authentication is failed because of the token is invalid or expired or missing. operationId: getApiV2AuthVerifyToken x-operation-id-source: derived /api/v2/Auth/m-login: post: tags: - Auth summary: Login from Mobile description: 'This Api endpoint will be used for mobile application login. Before your mobile device can access private data using IoTConnect API, you must obtain an access token that grants access to that API. A single access token can grant varying degrees of access to multiple IoTConnect APIs. Once you get an access token, send it to IoTConnect API in an HTTP authorization header. Access tokens are valid only for the set of operations and resources described in the scope of the token. Along with an access token, you will also receive a refresh token. This refresh token allows you to get new access tokens. We are using the OAuth 2.0 protocol for authentication and authorization. To begin, obtain a basic token from the basic token API endpoint. Then, request an access token from the IoTConnect Authorization Server, extract a token from the response, and send the token to the IoTConnect API that you want to access. During the access token request, you need to send username and password along with deviceType, osName, osVersion, uuid and deviceToken in the request body. While in Request Header, you need to submit a basic token and solution key.' parameters: - name: solution-key in: header required: true schema: type: string responses: '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/ConflictErrorModel' '200': description: Indicates that access token is created successfully and returns generated access token along with refresh token content: application/json: schema: $ref: '#/components/schemas/MobileLoginResponse' '401': description: Indicates that authentication is failed because of the wrong username/password or the user is not authorized to access given solution. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse_2' requestBody: content: application/json: schema: $ref: '#/components/schemas/MobileLoginRequest' operationId: postApiV2AuthMLogin x-operation-id-source: derived components: schemas: BasicTokenCreateResponse: type: object properties: data: type: - string - 'null' 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 CognitoChangePasswordResponse: type: object properties: token_type: type: - string - 'null' description: Token type eg. "Bearer" access_token: type: - string - 'null' description: Access token, used to communicate with IOTConnect APIs expires_in: type: integer description: Access token expiry duration in seconds, eg. 1000 format: int64 scope: type: - string - 'null' description: Scope session: type: - string - 'null' description: Session session_expired: type: boolean description: Session_Expired key: type: - string - 'null' description: Key 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 description: Status code of request, eg.200 format: int32 readOnly: true additionalProperties: false CognitoValidateOTPRequest: required: - code - session - username type: object properties: username: minLength: 1 type: string description: Email id of company user, eg. demouser@gmail.com session: minLength: 1 type: string description: User's login session code: minLength: 1 type: string description: MFA code additionalProperties: false CognitoValidateOTPResponse: type: object properties: token_type: type: - string - 'null' description: Token type eg. "Bearer" access_token: type: - string - 'null' description: Access token, used to communicate with IOTConnect APIs expires_in: type: integer description: Access token expiry duration in seconds, eg. 1000 format: int64 refresh_token: type: - string - 'null' description: Refresh token, used to get new access token against current session without login request 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 description: Status code of request, eg.200 format: int32 readOnly: true token: type: - string - 'null' password_expired: type: - boolean - 'null' additionalProperties: false CognitoForceChangePasswordRequest: required: - name - password - username type: object properties: username: minLength: 1 type: string description: Email id of company user, eg. demouser@gmail.com password: minLength: 1 type: string description: User's login password name: minLength: 1 type: string description: User's name accessToken: type: - string - 'null' description: User's accessToken newPassword: type: - string - 'null' description: New login password. additionalProperties: false ErrorModel: type: object properties: param: type: - string - 'null' message: type: - string - 'null' additionalProperties: false MobileLoginResponse: type: object properties: token_type: type: - string - 'null' description: Token type eg. "Bearer" access_token: type: - string - 'null' description: Access token, used to communicate with IOTConnect APIs expires_in: type: integer description: Access token expiry duration in seconds, eg. 1000 format: int64 refresh_token: type: - string - 'null' description: Refresh token, used to get new access token against current session without login request 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 description: Status code of request, eg.200 format: int32 readOnly: true additionalProperties: false ConflictErrorModel: type: object properties: status: type: integer format: int32 message: type: - string - 'null' error: type: - array - 'null' items: $ref: '#/components/schemas/ErrorModel' additionalProperties: false CognitoLoginRequest: required: - password - username type: object properties: username: minLength: 1 type: string description: Email id of company user, eg. demouser@gmail.com password: minLength: 1 type: string description: User's login password additionalProperties: false CognitoChangePasswordRequest: required: - name - password - session - username type: object properties: username: minLength: 1 type: string description: Email id of company user, eg. demouser@gmail.com password: minLength: 1 type: string description: User's login password name: minLength: 1 type: string description: User's name session: minLength: 1 type: string description: User's login session additionalProperties: false RefreshTokenRequest: required: - refreshtoken type: object properties: refreshtoken: minLength: 1 type: string description: Refresh token additionalProperties: false CognitoLoginResponse: type: object properties: token_type: type: - string - 'null' description: Token type eg. "Bearer" access_token: type: - string - 'null' description: Access token, used to communicate with IOTConnect APIs expires_in: type: integer description: Access token expiry duration in seconds, eg. 1000 format: int64 session: type: - string - 'null' description: Session key: type: - string - 'null' description: Key session_expired: type: boolean description: Session_Expired refresh_token: type: - string - 'null' description: Refresh token, used to get new access token against current session without login request 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 description: Status code of request, eg.200 format: int32 readOnly: true token: type: - string - 'null' password_expired: type: - boolean - 'null' additionalProperties: false ArrayBaseResponse: type: object properties: data: type: - array - 'null' items: type: - object - 'null' 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 LoginRequest: required: - password - username type: object properties: username: minLength: 1 type: string description: Email id of company user, eg. demouser@gmail.com password: minLength: 1 type: string description: User's login password additionalProperties: false LoginResponse: type: object properties: token_type: type: - string - 'null' description: Token type eg. "Bearer" access_token: type: - string - 'null' description: Access token, used to communicate with IOTConnect APIs expires_in: type: integer description: Access token expiry duration in seconds, eg. 1000 format: int64 refresh_token: type: - string - 'null' description: Refresh token, used to get new access token against current session without login request 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 description: Status code of request, eg.200 format: int32 readOnly: true additionalProperties: false ErrorResponse: type: object properties: status: type: integer format: int32 message: type: - string - 'null' error: type: - object - 'null' data: type: - object - 'null' additionalProperties: false MobileLoginRequest: required: - deviceToken - deviceType - osName - osVersion - password - username - uuid type: object properties: username: minLength: 1 type: string description: User's login email id password: minLength: 1 type: string description: User's login password deviceType: minLength: 1 type: string description: Type of the device used for login osName: minLength: 1 type: string description: Device os name osVersion: minLength: 1 type: string description: Device os version deviceToken: minLength: 1 type: string description: Device token uuid: minLength: 1 type: string additionalProperties: false ErrorResponse_2: type: object properties: status: type: integer format: int32 message: type: - string - 'null' error: type: - object - 'null' data: type: - object - 'null' ie: type: - object - 'null' additionalProperties: false securitySchemes: Bearer: type: apiKey description: Please enter JWT with Bearer into field name: Authorization in: header x-refined-from: - avnet-iotconnect-auth-aws-prod-swagger.json - avnet-iotconnect-auth-azure-prod-swagger.json