User API

Create User

Creates a user

Request
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Request Body schema: application/json

To create a user the login, First Name, Last Name, Email, Password, Question, Answer field is required.

login
required
string [ 1 .. 60 ] characters

login

firstName
required
string [ 1 .. 60 ] characters

firstName

lastName
required
string [ 1 .. 60 ] characters

lastName

email
required
string^(.+)@(.+)$

email

password
required
string(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=\S+$).{8,...

password

question
required
string [ 3 .. 300 ] characters

question

answer
required
string [ 3 .. 2147483647 ] characters

answer

Responses
201

Created

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/users
Request samples
application/json
{
  • "login": "admin",
  • "firstName": "John",
  • "lastName": "Miller",
  • "email": "john@yahoomail.com",
  • "password": "Password123",
  • "question": "What is your best friend name?",
  • "answer": "Jim"
}

Search Users

Search User By id or login

Request
query Parameters
id
integer <int32>
Example: id=1
login
string
Example: login=admin
email
string
Example: email=admin@gmail.com
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/users/search

activate User

Activate a User

Request
path Parameters
loginId
required
string

loginId

Example: E.g. admin
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT Token
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

put/users/{loginId}/activate

deactivate User

Deactivate a User

Request
path Parameters
loginId
required
string

loginId

Example: E.g. admin
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT Token
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

put/users/{loginId}/deactivate

manage Permission

Manage User Permission for the existing user in the system. This will remove the permission mapped earlier and the current request permissions will be considered always.

Request
path Parameters
loginId
required
string

loginId

Example: E.g. admin
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Request Body schema: application/json

list of permission is a required field. Allowable permission are system_admin, edit_policy, create_project

permissions
required
Array of strings

permissions

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

put/users/{loginId}/permission
Request samples
application/json
{
  • "permissions": [
    ]
}