{"swagger":"2.0","info":{"title":"Rainbow authent portal","version":"1.78.2","description":"# Rainbow authentication portal API guide\n\n## Preamble\n\n### Introduction\n\nThis guide describes list of API services that are provided by OT Rainbow authentication portal system. Services are used to manage OT Rainbow authentication.\n\n### Protocol\n\nREST interface is used for sending/receiving OT rainbow API messages.  \nHTTP request GET is used. Standard HTTP responses are used to provide requested information or error status. There is no session notion in OT Rainbow system, so requests could be issued according stateless model, without transport conservation between them.  \nJSON is used as a main format for data encoding in message body part. Each request is started with the following pattern /{module}/{version}/ where {module} is a portal module name to address and {version} is a version of used API, par example, “v1.0”.\n\n### Security considerations\n\nEach request should contain some credential information to authenticate itself. Standard HTTP authentication with basic/bearer modes is used. JSON Web Token mechanism is used to provide authentication information. JWT has a expire timeout that is controlled by OT Rainbow portal to prevent very long token usage. Also authentication with application token is used. The token must be provided in the request HTTP header, using a custom header: APIKey. At server side, token is verified, and if it doesn’t match, 403 Not Allowed response is sent. TLS is used as a transport protocol to support message exchanges between OT Rainbow portal and an application.\n\n","x-logo":{"url":"https://hub.openrainbow.com/img/logohub.svg","backgroundColor":"#ff4900"}},"securityDefinitions":{"Bearer":{"name":"Authorization","in":"header","type":"apiKey","description":"For accessing the API a valid JWT token must be passed in all the queries in the 'Authorization' header.   \n  \nA valid JWT token is generated by the API and returned as answer of a call   \nto the route/login giving a valid user & password.   \n  \nThe following syntax must be used in the 'Authorization' header:   \n  \nBearer xxxxxxyyyyyyyzzzzzz"}},"paths":{"/api/rainbow/authentication/v1.0/validator":{"get":{"tags":["Authentication"],"summary":"Validate user JWT","description":"This API allows to get a validation status on a token.","operationId":"GetApiRainbowAuthenticationV10Validator","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/GetApiRainbowAuthenticationV10ValidatorSuccess"},"examples":{"application/json":{"status":"OK"}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/authentication/v1.0/login":{"get":{"tags":["Authentication"],"summary":"Login user","description":"This API allows Rainbow users to login.   \n  \nApplication is also authenticated during the user login.   \n  \nIf login is successful, the API returns a **JSON Web Token** (JWT) which has to be provided by clients for all Rainbow APIs requiring user authentication: \n\n* The JWT is valid only for a given time period.\n* The JWT can be renewed a few times using API [GET /api/rainbow/authentication/v1.0/renew][0].\n* The maximum number of renew is given in the JWT payload, as well as the current number of time the token has been renewed (see below).\n* Once the JWT expired, or if the maximum of token renew has been reached, user must login again using this API.\n\nThe JWT returned contains the following data in payload: \n\n    \n```json\n{\n      \"countRenewed\": 0,  // Number of times the token has been renewed\n      \"maxTokenRenew\": 5,  // Number of times the token can be renewed\n      \"user\": {\n          \"id\": \"572756967bfbca0d0e09a6b4\",  // Logged in user id\n          \"loginEmail\": \"user@company.com\"  // Logged in user loginEmail\n      },\n      \"app\": {\n          \"id\": \"598983029db9b5b14693a6f0\",  // Application id used for the authentication\n          \"name\": \"My App\"  // Application name\n      },\n      \"iat\": 1463588327,  // (Issued At) Time at which the JWT was issued\n      \"exp\": 2183588327  // (Expiration Time) Expiration time after which the JWT won't be accepted\n}\n```\n  \n  \nIf login / password combination is wrong, an error 401 is return.   \nIf appId / appSecret combination is wrong, an error 401 is return.   \nThe following login protection is implemented: \n\n* After a given number of login failure (5 by default), the user account is **locked** for a given time period (60 min by default).\n* As long as the maximum number of login failure has not been reached, a 401 error with errorDetailsCode `401500` is returned.\n* Once the maximum number of login attempts has been reached, a 401 error with errorDetailsCode `401501` is returned: the user account is locked for the given time period.\n* While the user account is locked, the same response with errorDetailsCode `401501` will be returned for each new login attempt for this user account (even if a good login / password combination is provided). If the login / password combination is wrong, the locked time period restarts from this new wrong attempt.\n* Once the locked time period is over, a login with the good credentials will be allowed.\n* While the account is locked, the user can reset his password. In that case, his account will be unlocked and he will be able to login with his new password.\n* While the account is locked, a superadmin / support / admin (organisation or company level) user can set a new password for this account. In that case, this account will be unlocked and the user will be able to login with this new password.\n\n- Warning\nlogin url is case sensitive (lowercase). For example, /Login or /LOGIN won't work.login will be forbidden for a certain delay if too much consecutive wrong password errors occurs, after this user has to request a password change or just wait (see implementation details above).\n\n\n[0]: #api-authentication-GetRenew","operationId":"GetBasicLogin","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"authorization","in":"header","required":true,"type":"string","description":"Basic <base64encode(userLogin:userPassword)>"},{"name":"x-rainbow-app-auth","in":"header","required":true,"type":"string","description":"Basic <base64encode(appId:sha256(appSecretuserPassword))> (concatenation of appSecret and userPassword, hashed with sha256)"},{"name":"x-rainbow-client","in":"header","required":false,"type":"string","description":"the app used","enum":["web_win","desk_win","desk_osx","desk_s4b","android","ios","sdk_android","sdk_ios","sdk_node","sdk_web"]},{"name":"x-rainbow-client-version","in":"header","required":false,"type":"string","description":"1.10.7"},{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/GetBasicLoginSuccess"},"examples":{"application/json":{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VyIjp7ImlkIjoiNTZjNWMxOWY5NDE0MTc2NTExOWY4OTZjIiwibG9naW5FbWFpbCI6InVzZXIxQGNvbXBhbnkuY29tIn0sImlhdCI6MTQ1NjE1MTYzOCwiZXhwIjoxNDU2MTU4ODM4fQ.FlPLNcWY9pTr0QvMj3RpLZJxtqbbydNnWIEr-B2lc4Y6ea41bqJJ-e10Sk_S-1blnG71E7yT625qrkO-UCc0ywR6lWCylcAUkH7-fvjKQbET2mU-4yuNwTd-sNHGzGabgr4n5xtUSMaDunjDgF1kQDZ-dEFPF5NtbN1rdqZP9tzTXrpZ6rmrW2a1o13-hHl7sxN_FqHr_4u_8AhN4dMKUgG0qRjrc1GMJ88M8idH9zTsejU5YQyJqdYQS9T_fSoFzJtS0rmwNCJMdeF2tXj8YQeTjKAiPXoBwklm5xblHxWeCTz9tqfkw1XeNxSO0pOUmpwdpF8kbwDCCa2rgz1z3A","loggedInUser":{"id":"56c5c19f94141765119f896c","loginEmail":"user1@company.com","firstName":"Firstname","lastName":"Lastname","displayName":"Firstname Lastname","nickName":"Nickname","title":"Mr.","jobTitle":"Research and Development","emails":[{"email":"user1@company.com","type":"work"},{"email":"user1@home.com","type":"home"}],"phoneNumbers":[{"shortNumber":"1002","pbxId":"PBX712e-bd96-0c27-4350-a3ff-dc0c-83e7-c246","systemId":"57dc0644f44a97c9155cd462","country":"FRA","number":"0390676767","numberE164":"+33390676767","phoneNumberId":"58876dad81e063e01187dd24","isMonitored":true,"isFromSystem":true,"deviceType":"landline","type":"work"},{"number":"0390909090","country":"FRA","numberE164":"+33390909090","phoneNumberId":"577e2e9b86c953de7838d635","systemId":null,"isFromSystem":false,"deviceType":"landline","type":"home"},{"number":"0690909090","country":"FRA","numberE164":"+33690909090","phoneNumberId":"577e2e9b86c953de7838d636","systemId":null,"isFromSystem":false,"deviceType":"mobile","type":"home"}],"country":"FRA","language":"fr-FR","timezone":"Europe/Paris","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","jid_tel":"tel_2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","jid_password":"3b3f6e2c927940b2875f1ec604c0363b","roles":["user","superadmin"],"adminType":"undefined","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","isInDefaultCompany":false,"organisationId":null,"siteId":null,"isActive":true,"isInitialized":true,"initializationDate":"2016-01-18T13:30:44.498Z","activationDate":"2016-01-18T13:29:44.498Z","creationDate":"2016-01-18T12:45:44.498Z","lastUpdateDate":"2016-01-19T16:33:22.548Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","createdBySelfRegister":true,"createdByAdmin":{"userId":"56d69d020c92b35b3041d433","loginEmail":"superadmin@localhost.fr"},"invitedBy":{"invitationId":"574ffe07170a86f3297bc35b","invitationDate":"2016-01-15T13:29:44.498Z","userId":"56d69d020c92b35b3041d533","loginEmail":"user0@company.com"},"firstLoginDate":"2016-01-18T13:29:44.498Z","lastLoginDate":"2016-02-23T09:17:42.523Z","loggedSince":"2016-02-23T09:17:42.523Z","isTerminated":false,"guestMode":false},"loggedInApplication":{"id":"08ad88a0028011e8bd1a8788ab975478","name":"My application","type":"web","activity":"J","ownerId":"573f189f774e0a428ee813a3","ownerEmail":"developer@company.com","dateOfCreation":"2018-05-04T14:12:41.413Z","env":"deployed","state":"active","platform":"official"}}}},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":" Company of user user1@company.com is not active (companyId=56d6f05241255dd54b5b61b2, status=hold)","errorDetailsCode":401521}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/authentication/v1.0/logout":{"get":{"tags":["Authentication"],"summary":"Logout user","description":"","operationId":"GetLogout","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/GetLogoutSuccess"},"examples":{"application/json":{"status":"User user1@company.com successfully logged out","data":[]}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}},"/api/rainbow/authentication/v1.0/renew":{"get":{"tags":["Authentication"],"summary":"Renew user JWT","description":"This API allows Rainbow users to renew their JSON Web Token (JWT), thus extending the expiration date of their current JWT.   \n  \nThis API requires user to be authenticated with a valid non expired JWT.   \nIf so, a new JWT is returned, with the expiration date starting from now.   \n  \n**Warning:** The JWT can only be renewed a given number of times, after this user has to login again to get a new token using API [GET /api/rainbow/authentication/v1.0/login][0].   \nThe maximum number of renew is given in the JWT, as well as the current number of time the token has been renewed.\n\n[0]: #api-authentication-GetLogin","operationId":"GetRenew","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accept","in":"header","required":true,"type":"string","description":"application/json"}],"security":[{"Bearer":[]}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/GetRenewSuccess"},"examples":{"application/json":{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1c2VyIjp7ImlkIjoiNTZjNWMxOWY5NDE0MTc2NTExOWY4OTZjIiwibG9naW5FbWFpbCI6InVzZXIxQGNvbXBhbnkuY29tIn0sImlhdCI6MTQ1NjE1MTYzOCwiZXhwIjoxNDU2MTU4ODM4fQ.FlPLNcWY9pTr0QvMj3RpLZJxtqbbydNnWIEr-B2lc4Y6ea41bqJJ-e10Sk_S-1blnG71E7yT625qrkO-UCc0ywR6lWCylcAUkH7-fvjKQbET2mU-4yuNwTd-sNHGzGabgr4n5xtUSMaDunjDgF1kQDZ-dEFPF5NtbN1rdqZP9tzTXrpZ6rmrW2a1o13-hHl7sxN_FqHr_4u_8AhN4dMKUgG0qRjrc1GMJ88M8idH9zTsejU5YQyJqdYQS9T_fSoFzJtS0rmwNCJMdeF2tXj8YQeTjKAiPXoBwklm5xblHxWeCTz9tqfkw1XeNxSO0pOUmpwdpF8kbwDCCa2rgz1z3A","loggedInUser":{"id":"56c5c19f94141765119f896c","loginEmail":"user1@company.com","firstName":"Firstname","lastName":"Lastname","displayName":"Firstname Lastname","nickName":"Nickname","title":"Mr.","jobTitle":"Research and Development","emails":[{"email":"user1@company.com","type":"work"},{"email":"user1@home.com","type":"home"}],"phoneNumbers":[{"shortNumber":"1002","pbxId":"PBX712e-bd96-0c27-4350-a3ff-dc0c-83e7-c246","systemId":"57dc0644f44a97c9155cd462","country":"FRA","number":"0390676767","numberE164":"+33390676767","phoneNumberId":"58876dad81e063e01187dd24","isMonitored":true,"isFromSystem":true,"deviceType":"landline","type":"work"},{"number":"0390909090","country":"FRA","numberE164":"+33390909090","phoneNumberId":"577e2e9b86c953de7838d635","systemId":null,"isFromSystem":false,"deviceType":"landline","type":"home"},{"number":"0690909090","country":"FRA","numberE164":"+33690909090","phoneNumberId":"577e2e9b86c953de7838d636","systemId":null,"isFromSystem":false,"deviceType":"mobile","type":"home"}],"country":"FRA","language":"fr-FR","timezone":"Europe/Paris","jid_im":"2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","jid_tel":"tel_2d2f1aaf5ce54a2dbae9d70490366562@openrainbow.com","jid_password":"3b3f6e2c927940b2875f1ec604c0363b","roles":["user","superadmin"],"adminType":"undefined","companyId":"569ce8c8f9336c471b98eda1","companyName":"My company","isInDefaultCompany":false,"organisationId":null,"siteId":null,"isActive":true,"isInitialized":true,"initializationDate":"2016-01-18T13:30:44.498Z","activationDate":"2016-01-18T13:29:44.498Z","creationDate":"2016-01-18T12:45:44.498Z","lastUpdateDate":"2016-01-19T16:33:22.548Z","lastAvatarUpdateDate":"2016-01-19T11:29:11.567Z","createdBySelfRegister":true,"createdByAdmin":{"userId":"56d69d020c92b35b3041d433","loginEmail":"superadmin@localhost.fr"},"invitedBy":{"invitationId":"574ffe07170a86f3297bc35b","invitationDate":"2016-01-15T13:29:44.498Z","userId":"56d69d020c92b35b3041d533","loginEmail":"user0@company.com"},"firstLoginDate":"2016-01-18T13:29:44.498Z","lastLoginDate":"2016-02-23T09:17:42.523Z","loggedSince":"2016-02-23T09:17:42.523Z","isTerminated":false,"guestMode":false},"loggedInApplication":{"id":"08ad88a0028011e8bd1a8788ab975478","name":"My application","type":"web","activity":"J","ownerId":"573f189f774e0a428ee813a3","ownerEmail":"developer@company.com","dateOfCreation":"2018-05-04T14:12:41.413Z","env":"deployed","state":"active","platform":"official"}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized","examples":{"application/json":{"errorCode":401,"errorMsg":"Unauthorized","errorDetails":{"errorMsg":"User user1@company.com has expired (timeToLive)","timeToLive":3600,"creationDate":"2017-09-05T13:12:51.302Z","expirationDate":"2017-09-05T14:12:51.302Z","currentDate":"2017-09-05T14:48:23.694Z"},"errorDetailsCode":401523}}},"500":{"description":"Server error","examples":{"application/json":{"errorCode":500,"errorMsg":"Internal Server Error","errorDetails":""}}}}}}},"definitions":{"GetApiRainbowAuthenticationV10ValidatorSuccess":{"type":"object","properties":{"status":{"type":"string","description":"OK if validation successful"}},"required":["status"]},"GetBasicLoginSuccess":{"type":"object","properties":{"token":{"type":"string","description":"JsonWebToken to use for all API requests"},"loggedInUser":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier"},"loginEmail":{"type":"string","description":"User email address (used for login)"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"displayName":{"type":"string","description":"User display name (firstName + lastName concatenated on server side)"},"nickName":{"type":"string","description":"User nickName"},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)"},"jobTitle":{"type":"string","description":"User job title"},"emails":{"type":"array","description":"Array of user emails addresses objects","items":{"$ref":"#/definitions/GetBasicLoginSuccess_emails"}},"phoneNumbers":{"type":"array","description":"Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n","items":{"$ref":"#/definitions/GetBasicLoginSuccess_phoneNumbers"}},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)"},"language":{"type":"string","description":"User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)"},"timezone":{"type":"string","description":"User timezone name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"},"jid_password":{"type":"string","description":"User Jabber TEL identifier"},"roles":{"type":"array","description":"List of user roles (Array of String)","items":{"type":"string"}},"adminType":{"type":"string","description":"In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)"},"companyId":{"type":"string","description":"User company unique identifier"},"organisationId":{"type":"string","description":"In addition to User companyId, optional identifier to indicate the user belongs also to an organization"},"siteId":{"type":"string","description":"In addition to User companyId, optional identifier to indicate the user belongs also to a site"},"companyName":{"type":"string","description":"User company name"},"isInDefaultCompany":{"type":"boolean","description":"Is user in default company   \nOnly returned if retrieved user data corresponds to logged in user or if logged in user is admin of the retreived user"},"isActive":{"type":"boolean","description":"Is user active"},"isInitialized":{"type":"boolean","description":"Is user initialized"},"initializationDate":{"type":"string","description":"User initialization date","format":"date-time"},"activationDate":{"type":"string","description":"User activation date","format":"date-time"},"creationDate":{"type":"string","description":"User creation date","format":"date-time"},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"createdBySelfRegister":{"type":"boolean","description":"true if user has been created using self register"},"createdByAdmin":{"type":"object","properties":{"userId":{"type":"string","description":""},"loginEmail":{"type":"string","description":""}},"required":["userId","loginEmail"]},"invitedBy":{"type":"object","properties":{"userId":{"type":"string","description":""},"loginEmail":{"type":"string","description":""}},"required":["userId","loginEmail"]},"firstLoginDate":{"type":"string","description":"Date of first user login (only set the first time user logs in, null if user never logged in)","format":"date-time"},"lastLoginDate":{"type":"string","description":"Date of last user login (defined even if user is logged out)","format":"date-time"},"loggedSince":{"type":"string","description":"Date of last user login (null if user is logged out)","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."}},"required":["id","loginEmail","firstName","lastName","displayName","nickName","title","jobTitle","emails","phoneNumbers","country","language","timezone","jid_im","jid_tel","jid_password","roles","adminType","companyId","organisationId","siteId","companyName","isInDefaultCompany","isActive","isInitialized","initializationDate","activationDate","creationDate","lastUpdateDate","lastAvatarUpdateDate","createdBySelfRegister","createdByAdmin","invitedBy","firstLoginDate","lastLoginDate","loggedSince","isTerminated","guestMode"]},"loggedInApplication":{"type":"object","properties":{"id":{"type":"string","description":"Application unique identifier"},"name":{"type":"string","description":"Application name"},"type":{"type":"string","description":"Application type","enum":["web","mobile","desktop","server","bot","iot","admin"]},"activity":{"type":"string","description":"Application activity \n\n* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n","enum":["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U"]},"ownerId":{"type":"string","description":"Unique identifier of the application owner"},"ownerEmail":{"type":"string","description":"Login of the application owner"},"dateOfCreation":{"type":"string","description":"Application creation date","format":"date-time"},"env":{"type":"string","description":"Environment where the application is deploy","enum":["not_deployed","in_deployment","deployed"]},"state":{"type":"string","description":"State of the application","enum":["new","active","blocked","deleted","stopped"]},"platform":{"type":"string","description":"Platform where the application is running","enum":["official","sandbox"]}},"required":["id","name","type","activity","ownerId","ownerEmail","dateOfCreation","env","state","platform"]}},"required":["token","loggedInUser","loggedInApplication"]},"GetBasicLoginSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"type":{"type":"string","description":"Email type, one of `home`, `work`, `other`"}},"required":["email","type"]},"GetBasicLoginSuccess_phoneNumbers":{"type":"object","properties":{"phoneNumberId":{"type":"string","description":"Phone number unique id in directory collection."},"number":{"type":"string","description":"User phone number (as entered by user)"},"numberE164":{"type":"string","description":"User E.164 phone number, computed by server from number and country fields"},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field."},"isFromSystem":{"type":"boolean","description":"Boolean indicating if phone is linked to a system (pbx)."},"shortNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field."},"internalNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field."},"systemId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database."},"pbxId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx."},"type":{"type":"string","description":"Phone number type, one of `home`, `work`, `other`."},"deviceType":{"type":"string","description":"Phone number device type, one of `landline`, `mobile`, `fax`, `other`."}},"required":["phoneNumberId","number","numberE164","country","isFromSystem","shortNumber","internalNumber","systemId","pbxId","type","deviceType"]},"GetLogoutSuccess":{"type":"object","properties":{"token":{"type":"string","description":"Renewed JsonWebToken to use for all API requests"}},"required":["token"]},"GetRenewSuccess":{"type":"object","properties":{"token":{"type":"string","description":"JsonWebToken to use for all API requests"},"loggedInUser":{"type":"object","properties":{"id":{"type":"string","description":"User unique identifier"},"loginEmail":{"type":"string","description":"User email address (used for login)"},"firstName":{"type":"string","description":"User first name"},"lastName":{"type":"string","description":"User last name"},"displayName":{"type":"string","description":"User display name (firstName + lastName concatenated on server side)"},"nickName":{"type":"string","description":"User nickName"},"title":{"type":"string","description":"User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...)"},"jobTitle":{"type":"string","description":"User job title"},"emails":{"type":"array","description":"Array of user emails addresses objects","items":{"$ref":"#/definitions/GetRenewSuccess_emails"}},"phoneNumbers":{"type":"array","description":"Array of user phone numbers objects.   \nPhone number objects can: \n\n* be created by user (information filled by user),\n* come from association with a system (pbx) device (association is done by admin).\n\n","items":{"$ref":"#/definitions/GetRenewSuccess_phoneNumbers"}},"country":{"type":"string","description":"User country (ISO 3166-1 alpha3 format)"},"language":{"type":"string","description":"User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported)"},"timezone":{"type":"string","description":"User timezone name"},"jid_im":{"type":"string","description":"User Jabber IM identifier"},"jid_tel":{"type":"string","description":"User Jabber TEL identifier"},"jid_password":{"type":"string","description":"User Jabber TEL identifier"},"roles":{"type":"array","description":"List of user roles (Array of String)","items":{"type":"string"}},"adminType":{"type":"string","description":"In case of user's is 'admin', define the subtype (organisation_admin, company_admin, site_admin (default undefined)"},"companyId":{"type":"string","description":"User company unique identifier"},"organisationId":{"type":"string","description":"In addition to User companyId, optional identifier to indicate the user belongs also to an organization"},"siteId":{"type":"string","description":"In addition to User companyId, optional identifier to indicate the user belongs also to a site"},"companyName":{"type":"string","description":"User company name"},"isInDefaultCompany":{"type":"boolean","description":"Is user in default company   \nOnly returned if retrieved user data corresponds to logged in user or if logged in user is admin of the retreived user"},"isActive":{"type":"boolean","description":"Is user active"},"isInitialized":{"type":"boolean","description":"Is user initialized"},"initializationDate":{"type":"string","description":"User initialization date","format":"date-time"},"activationDate":{"type":"string","description":"User activation date","format":"date-time"},"creationDate":{"type":"string","description":"User creation date","format":"date-time"},"lastUpdateDate":{"type":"string","description":"Date of last user update (whatever the field updated)","format":"date-time"},"lastAvatarUpdateDate":{"type":"string","description":"Date of last user avatar create/update, null if no avatar","format":"date-time"},"createdBySelfRegister":{"type":"boolean","description":"true if user has been created using self register"},"createdByAdmin":{"type":"object","properties":{"userId":{"type":"string","description":""},"loginEmail":{"type":"string","description":""}},"required":["userId","loginEmail"]},"invitedBy":{"type":"object","properties":{"userId":{"type":"string","description":""},"loginEmail":{"type":"string","description":""}},"required":["userId","loginEmail"]},"firstLoginDate":{"type":"string","description":"Date of first user login (only set the first time user logs in, null if user never logged in)","format":"date-time"},"lastLoginDate":{"type":"string","description":"Date of last user login (defined even if user is logged out)","format":"date-time"},"loggedSince":{"type":"string","description":"Date of last user login (null if user is logged out)","format":"date-time"},"isTerminated":{"type":"boolean","description":"Indicates if the Rainbow account of this user has been deleted"},"guestMode":{"type":"boolean","description":"Indicated a user embedded in a chat or conference room, as guest, with limited rights until he finalizes his registration."}},"required":["id","loginEmail","firstName","lastName","displayName","nickName","title","jobTitle","emails","phoneNumbers","country","language","timezone","jid_im","jid_tel","jid_password","roles","adminType","companyId","organisationId","siteId","companyName","isInDefaultCompany","isActive","isInitialized","initializationDate","activationDate","creationDate","lastUpdateDate","lastAvatarUpdateDate","createdBySelfRegister","createdByAdmin","invitedBy","firstLoginDate","lastLoginDate","loggedSince","isTerminated","guestMode"]},"loggedInApplication":{"type":"object","properties":{"id":{"type":"string","description":"Application unique identifier"},"name":{"type":"string","description":"Application name"},"type":{"type":"string","description":"Application type","enum":["web","mobile","desktop","server","bot","iot","admin"]},"activity":{"type":"string","description":"Application activity \n\n* `A`: AGRICULTURE, FORESTRY AND FISHING\n* `B`: MINING AND QUARRYING\n* `C`: MANUFACTURING\n* `D`: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY\n* `E`: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES\n* `F`: CONSTRUCTION\n* `G`: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES\n* `H`: TRANSPORTATION AND STORAGE\n* `I`: ACCOMMODATION AND FOOD SERVICE ACTIVITIES\n* `J`: INFORMATION AND COMMUNICATION\n* `K`: FINANCIAL AND INSURANCE ACTIVITIES\n* `L`: REAL ESTATE ACTIVITIES\n* `M`: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES\n* `N`: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES\n* `O`: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY\n* `P`: EDUCATION\n* `Q`: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES\n* `R`: ARTS, ENTERTAINMENT AND RECREATION\n* `S`: OTHER SERVICE ACTIVITIES\n* `T`: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE\n* `U`: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES\n","enum":["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U"]},"ownerId":{"type":"string","description":"Unique identifier of the application owner"},"ownerEmail":{"type":"string","description":"Login of the application owner"},"dateOfCreation":{"type":"string","description":"Application creation date","format":"date-time"},"env":{"type":"string","description":"Environment where the application is deploy","enum":["not_deployed","in_deployment","deployed"]},"state":{"type":"string","description":"State of the application","enum":["new","active","blocked","deleted","stopped"]},"platform":{"type":"string","description":"Platform where the application is running","enum":["official","sandbox"]}},"required":["id","name","type","activity","ownerId","ownerEmail","dateOfCreation","env","state","platform"]}},"required":["token","loggedInUser","loggedInApplication"]},"GetRenewSuccess_emails":{"type":"object","properties":{"email":{"type":"string","description":"User email address"},"type":{"type":"string","description":"Email type, one of `home`, `work`, `other`"}},"required":["email","type"]},"GetRenewSuccess_phoneNumbers":{"type":"object","properties":{"phoneNumberId":{"type":"string","description":"Phone number unique id in directory collection."},"number":{"type":"string","description":"User phone number (as entered by user)"},"numberE164":{"type":"string","description":"User E.164 phone number, computed by server from number and country fields"},"country":{"type":"string","description":"Phone number country (ISO 3166-1 alpha3 format). Used to compute numberE164 field from number field."},"isFromSystem":{"type":"boolean","description":"Boolean indicating if phone is linked to a system (pbx)."},"shortNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), short phone number (corresponds to the number monitored by PCG).   \nOnly usable within the same PBX.   \nOnly PCG can set this field."},"internalNumber":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), internal phone number.   \nUsable within a PBX group.   \nAdmins and users can modify this internalNumber field."},"systemId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that system in Rainbow database."},"pbxId":{"type":"string","description":"**[Only for phone numbers linked to a system (pbx)]**  \nIf phone is linked to a system (pbx), unique identifier of that pbx."},"type":{"type":"string","description":"Phone number type, one of `home`, `work`, `other`."},"deviceType":{"type":"string","description":"Phone number device type, one of `landline`, `mobile`, `fax`, `other`."}},"required":["phoneNumberId","number","numberE164","country","isFromSystem","shortNumber","internalNumber","systemId","pbxId","type","deviceType"]}},"tags":[{"name":"Authentication"}],"x-servers":[{"url":"https://openrainbow.com","description":"Production server"},{"url":"https://sandbox.openrainbow.com","description":"Development server"}],"x-tagGroups":[{"name":"Authentication","tags":["Authentication"]}]}