{"info":{"title":"/IOTCONNECT™ Authenticate API","description":"Authenticate your Web API requests by providing a bearer token, which identifies a single user, application relationship. We prefer tokens to be sent in the Authorization HTTP header of your outbound requests. However, you may also pass tokens in all Web API calls as a parameter called token.\n<br /> Also, it will contain the API method list for the Login and refresh the bearer token.. \n<br />\n<br /> Authorization &emsp;&nbsp;  &emsp;<b><i style=\"font-style: italic !important;\">Bearer + access_token (Generated From api/v1.1/auth/login API)</i></b>\n<br /> Content-Type &emsp;&nbsp;&emsp;<b><i style=\"font-style: italic !important;\">application/json</i></b></p>","version":"2.1"},"paths":{"/api/v2.1/Auth/basic-token":{"get":{"tags":["Auth"],"summary":"Generate basic token","description":"<p>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.</p>","responses":{"500":{"description":"Indicates that the request could not be carried out because of some technical error on the server.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that basic token is created successfully and returns generated basic token","schema":{"$ref":"#/definitions/BasicTokenCreateResponse"}}}}},"/api/v2.1/Auth/login":{"post":{"tags":["Auth"],"summary":"Login","description":"<p>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.</p>\n<p>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.</p>\n<p>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.</p>","parameters":[{"name":"solution-key","in":"header","required":true,"type":"string"},{"name":"request","in":"body","description":"","schema":{"$ref":"#/definitions/LoginRequest"}}],"responses":{"500":{"description":"Indicates that the request could not be carried out because of some technical error on the server.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that access token is created successfully and returns generated access token along with refresh token","schema":{"$ref":"#/definitions/LoginResponse"}},"401":{"description":"Indicates that authentication is failed because of the wrong username/password or the user is not authorized to access given solution.","schema":{"$ref":"#/definitions/ErrorResponse"}}}}},"/api/v2.1/Auth/refresh-token":{"post":{"tags":["Auth"],"summary":"Refresh access token","description":"<p>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.</p>\n<p>During the refresh token request, you need to send refresh_token, which you received in the login API endpoint response.</p>","responses":{"500":{"description":"Indicates that the request could not be carried out because of some technical error on the server.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that refresh token is created successfully and returns generated access token along with new refresh token","schema":{"$ref":"#/definitions/LoginResponse"}},"409":{"description":"Indicates that supplied refresh token is not valid."}},"parameters":[{"name":"request","in":"body","description":"","schema":{"$ref":"#/definitions/RefreshTokenRequest"}}]}},"/api/v2.1/Auth/verify-token":{"get":{"tags":["Auth"],"summary":"Verify access token","description":"<p>This API endpoint verifies the validity of your access token.</p>","responses":{"500":{"description":"Indicates that the request could not be carried out because of some technical error on the server.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that access token is verified successfully","schema":{"$ref":"#/definitions/ArrayBaseResponse"}},"401":{"description":"Indicates that authentication is failed because of the token is invalid or expired or missing."}}}},"/api/v2.1/Auth/m-login":{"post":{"tags":["Auth"],"summary":"Login from Mobile","description":"<p>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.</p>\n<p>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.</p>\n<p>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.</p>","parameters":[{"name":"solution-key","in":"header","required":true,"type":"string"},{"name":"request","in":"body","description":"","schema":{"$ref":"#/definitions/MobileLoginRequest"}}],"responses":{"500":{"description":"Indicates that the request could not be carried out because of some technical error on the server.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that access token is created successfully and returns generated access token along with refresh token","schema":{"$ref":"#/definitions/MobileLoginResponse"}},"401":{"description":"Indicates that authentication is failed because of the wrong username/password or the user is not authorized to access given solution.","schema":{"$ref":"#/definitions/ErrorResponse"}}}}},"/api/v2.1/Auth/cognito/login":{"post":{"tags":["Auth"],"summary":"Cognito Login","parameters":[{"name":"solution-key","in":"header","required":true,"type":"string"},{"name":"request","in":"body","description":"The request object","schema":{"$ref":"#/definitions/CognitoLoginRequest"}}],"responses":{"500":{"description":"Indicates that the request could not be carried out because of some technical error on the server.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that the CognitoLogin request completed successfully.","schema":{"$ref":"#/definitions/CognitoLoginResponse"}},"401":{"description":"Authentication failed due to invalid, expired, or missing token."}}}},"/api/v2.1/Auth/cognito/validate-otp":{"post":{"tags":["Auth"],"summary":"Cognito Validate OTP","parameters":[{"name":"solution-key","in":"header","required":true,"type":"string"},{"name":"request","in":"body","description":"The request object","schema":{"$ref":"#/definitions/CognitoValidateOTPRequest"}}],"responses":{"500":{"description":"Indicates that the request could not be carried out because of some technical error on the server.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that the CognitoValidateOTP request completed successfully.","schema":{"$ref":"#/definitions/CognitoValidateOTPResponse"}},"401":{"description":"Authentication failed due to invalid, expired, or missing token."}}}},"/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.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that the CognitoChangePassword request completed successfully.","schema":{"$ref":"#/definitions/CognitoChangePasswordResponse"}},"401":{"description":"Authentication failed due to invalid, expired, or missing token."}},"parameters":[{"name":"request","in":"body","description":"The request object","schema":{"$ref":"#/definitions/CognitoForceChangePasswordRequest"}}]}},"/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.","schema":{"$ref":"#/definitions/ConflictErrorModel"}},"200":{"description":"Indicates that the CognitoChangePassword request completed successfully.","schema":{"$ref":"#/definitions/CognitoChangePasswordResponse"}},"401":{"description":"Authentication failed due to invalid, expired, or missing token."}},"parameters":[{"name":"request","in":"body","description":"The request object","schema":{"$ref":"#/definitions/CognitoChangePasswordRequest"}}]}}},"security":[{"Bearer":[]}],"tags":[{"name":"Auth","description":"Auth Api List"}],"swagger":"2.0","definitions":{"ArrayBaseResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","nullable":true},"nullable":true},"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","nullable":true},"count":{"type":"integer","format":"int64","nullable":true}},"additionalProperties":false},"BasicTokenCreateResponse":{"type":"object","properties":{"data":{"type":"string","nullable":true},"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","nullable":true},"count":{"type":"integer","format":"int64","nullable":true}},"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},"CognitoChangePasswordResponse":{"type":"object","properties":{"token_type":{"type":"string","description":"Token type eg. \"Bearer\"","nullable":true},"access_token":{"type":"string","description":"Access token, used to communicate with IOTConnect APIs","nullable":true},"expires_in":{"type":"integer","description":"Access token expiry duration in seconds, eg. 1000","format":"int64"},"scope":{"type":"string","description":"Scope","nullable":true},"session":{"type":"string","description":"Session","nullable":true},"session_expired":{"type":"boolean","description":"Session_Expired"},"key":{"type":"string","description":"Key","nullable":true},"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},"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","description":"User's accessToken","nullable":true},"newPassword":{"type":"string","description":"New login password.","nullable":true}},"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},"CognitoLoginResponse":{"type":"object","properties":{"token_type":{"type":"string","description":"Token type eg. \"Bearer\"","nullable":true},"access_token":{"type":"string","description":"Access token, used to communicate with IOTConnect APIs","nullable":true},"expires_in":{"type":"integer","description":"Access token expiry duration in seconds, eg. 1000","format":"int64"},"session":{"type":"string","description":"Session","nullable":true},"key":{"type":"string","description":"Key","nullable":true},"session_expired":{"type":"boolean","description":"Session_Expired"},"refresh_token":{"type":"string","description":"Refresh token, used to get new access token against current session without login request","nullable":true},"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","nullable":true},"password_expired":{"type":"boolean","nullable":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","description":"Token type eg. \"Bearer\"","nullable":true},"access_token":{"type":"string","description":"Access token, used to communicate with IOTConnect APIs","nullable":true},"expires_in":{"type":"integer","description":"Access token expiry duration in seconds, eg. 1000","format":"int64"},"refresh_token":{"type":"string","description":"Refresh token, used to get new access token against current session without login request","nullable":true},"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","nullable":true},"password_expired":{"type":"boolean","nullable":true}},"additionalProperties":false},"ConflictErrorModel":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string","nullable":true},"error":{"type":"array","items":{"$ref":"#/definitions/ErrorModel"},"nullable":true}},"additionalProperties":false},"ErrorModel":{"type":"object","properties":{"param":{"type":"string","nullable":true},"message":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string","nullable":true},"error":{"type":"object","nullable":true},"data":{"type":"object","nullable":true}},"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","description":"Token type eg. \"Bearer\"","nullable":true},"access_token":{"type":"string","description":"Access token, used to communicate with IOTConnect APIs","nullable":true},"expires_in":{"type":"integer","description":"Access token expiry duration in seconds, eg. 1000","format":"int64"},"refresh_token":{"type":"string","description":"Refresh token, used to get new access token against current session without login request","nullable":true},"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},"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},"MobileLoginResponse":{"type":"object","properties":{"token_type":{"type":"string","description":"Token type eg. \"Bearer\"","nullable":true},"access_token":{"type":"string","description":"Access token, used to communicate with IOTConnect APIs","nullable":true},"expires_in":{"type":"integer","description":"Access token expiry duration in seconds, eg. 1000","format":"int64"},"refresh_token":{"type":"string","description":"Refresh token, used to get new access token against current session without login request","nullable":true},"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},"RefreshTokenRequest":{"required":["refreshtoken"],"type":"object","properties":{"refreshtoken":{"minLength":1,"type":"string","description":"Refresh token"}},"additionalProperties":false}},"securityDefinitions":{"Bearer":{"type":"apiKey","description":"Please enter JWT with Bearer into field","name":"Authorization","in":"header"}}}