Authorization service REST API methods

You can read more about working with REST API in this section. The authorization service REST API methods are accessed via HTTPS protocol. Methods are closed by authorization and are marked with the lock icon.

GET ​/status

Getting the authorization service status.

Method answer

{
 "status": "string",
 "version": "string",
 "commit": "string"
}

POST ​/v1​/user

Registering a new user.

Method request

{
  "username": "string",
  "password": "string",
  "locale": "string",
  "source": "string"
 }

If the registration was successful, the response code is 201. Otherwise, the registration have failed.

GET ​/v1​/user​/profile

../_images/lock.png

Getting user data.

Method answer

{
 "id": "string",
 "name": "string",
 "locale": "en",
 "addresses": [
 "string"
 ],
 "roles": [
 "string"
 ]
 }

POST ​/v1​/user​/address

../_images/lock.png

Getting an user address.

Method request

{
  "address": "string",
  "type": "string"
 }

Method answer

{
  "addressId": "string"
 }

GET /v1​/user​/address​/exists

Checking the user’s email address. The method accepts the user’s email address as an input parameter.

Method answer

{
   "exist": true
 }

POST ​/v1​/user​/password​/restore

Restoring an user account password.

Method request

{
  "email": "string",
  "source": "string"
 }

Method answer

{
  "email": "string"
 }

POST ​/v1​/user​/password​/reset

Reseting an user password.

Method request

{
  "token": "string",
  "password": "string"
 }

Method answer

{
  "userId": "string"
 }

GET ​/v1​/user​/confirm​/{code}

Entering a confirmation code to reset an user account password. The value of the confirmation code is passed to the method as input.

POST ​/v1​/user​/resendEmail

Resending a password recovery code to the specified email address.

Method request

{
   "email": "string",
   "source": "string"
}

Method answer

{
   "email": "string"
}

POST ​/v1​/auth​/login

Registering a new user in the authorization service.

Method request

{
  "username": "string",
  "password": "string",
  "locale": "string",
  "source": "string"
 }

Method answer

{
  "access_token": "string",
  "refresh_token": "string",
  "token_type": "string"
 }

POST ​/v1​/auth​/token

../_images/lock.png

Registering external services and applications in the authorization service. This method does not require any request parameters.

Method answer

{
  "access_token": "string",
  "refresh_token": "string",
  "token_type": "string"
 }

POST ​/v1​/auth​/refresh

Getting a new refresh token.

Method request

{
  "token": "string"
 }

Method answer

{
  "access_token": "string",
  "refresh_token": "string",
  "token_type": "string"
 }

GET​ /v1​/auth​/publicKey

Getting the authorization service public key.

Method answer

-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7d9Oj/ZQTkkjf4UuMfUu
QIFDTYxYf6QBKMVJnq/wXyPYYkV8HVFYFizCaEciv3CXmBH77sXnuTlrEtvK7zHB
KvV870HmZuazjIgZVSkOnOY7F8UUVNXnlzVD1dPsOGJ6orM41DnC1W65mCrP3bjn
fV4RbmykN/lk7McA6EsMcLEGbKkFhmeq2Nk4hn2CQvoTkupJUnOCP1dhO4bq1lQ7
Ffj9K/FJq73wSXDoH+qqdRG9sfrtgrhtJHerruhv3456e0zyAcDO8+sJUQFKY80B
SZMEndVzFS2ub9Q8e7BfcNxTmQPM4PhHO5wuTqL32qt3uJBx2OI4lu3OND44ZrDJ
BbVog73oPjRYXj+kTbwUZI66SP4aLcQ8sypQyLwqKk5DtLRozSN0OIrupJJ/pwZs
9zPEggL91T0rirbEhGlf5U8/6XN8GVXX4iMk2fD8FHLFJuXCD7Oj4JC2iWfFDC6a
uUkwUfqfjJB8BzIHkncoqOZbpidEE2lTWl+svuEu/wyP5rNlyMiE/e/fZQqM2+o0
cH5Qow6HH35BrloCSZciutUcd1U7YPqESJ5tryy1xn9bsMb+On1ocZTtvec/ow4M
RmnJwm0j1nd+cc19OKLG5/boeA+2zqWu0jCbWR9c0oCmgbhuqZCHaHTBEAKDWcsC
VRz5qD6FPpePpTQDb6ss3bkCAwEAAQ==
-----END PUBLIC KEY-----