Config API Version 2 Users
Introduction
Every person that logs into the Infinity Platform has a User record that holds their details and roles.
Each User is created under a primary Organisation. Admins of that primary Organisation may manage the User’s details (e.g. login, name, password, etc). Note that passwords are stored as one-way encrypted hashes and may be changed but not viewed.
- Each User is assigned a numeric ID that can be used to reference it in the APIs.
Search Users
Returns a list of Users that the authenticated user can access and which match a provided search term.
Request:
GET /config/v2/users/search/{search term}
Segment Parameters
- searchTerm (string) - Search term to match users against.
GET Params
- filter (array) OPTIONAL - One or more filters.
- sort (array) OPTIONAL - One or more sorting params.
- limit (integer) OPTIONAL - limit on the result set.
- offset (integer) OPTIONAL - offset of the result set.
Filter Types
The Users list may be filtered by any of the returned fields.
Sort Types
The Users list may be sorted by any of the returned fields.
Response:
Returns a list of Users.
- userId (int) - User ID.
- username (string) - Login email address of the User.
- firstName (string) - User’s first name / forename.
- lastName (string) - User’s last name / surname.
- primaryOrgId (int) - User’s primary Organisation ID.
- primaryOrgName (string) - User’s primary Organisation name.
- updateDatetime (datetime) - Last update date time.
- userStatus (int) - Infinity Status code indicating status of the User (E.g. 200).
{"userId":"42","username":"some.person@example.com","firstName":"Some","lastName":"Person","primaryOrgId":"1","updateDatetime":"2014-03-14 09:30:42","userStatus":"200","primaryOrgName":"Some Organisation"}
{"userId":"59","username":"other.person@example.com","firstName":"Other","lastName":"Person","primaryOrgId":"1","updateDatetime":"2014-02-27 14:06:39","userStatus":"200","primaryOrgName":"Some Organisation"}
List Users
Returns a list of Users that the authenticated user can access.
Request:
GET /config/v2/users
GET Params
- filter (array) OPTIONAL - One or more filters.
- sort (array) OPTIONAL - One or more sorting params.
- limit (integer) OPTIONAL - limit on the result set.
- offset (integer) OPTIONAL - offset of the result set.
Filter Types
The Users list may be filtered by any of the returned fields.
Sort Types
The Users list may be sorted by any of the returned fields.
Response:
Returns a list of Users.
- userId (int) - User ID.
- username (string) - Login email address of the User.
- firstName (string) - User’s first name / forename.
- lastName (string) - User’s last name / surname.
- primaryOrgId (int) - User’s primary Organisation ID.
- updateDatetime (datetime) - Last update date time.
- userStatus (int) - Infinity Status code indicating status of the User (E.g. 200).
{"userId":"42","username":"some.person@example.com","firstName":"Some","lastName":"Person","primaryOrgId":"1","updateDatetime":"2014-03-14 09:30:42","userStatus":"200"}
{"userId":"59","username":"other.person@example.com","firstName":"Other","lastName":"Person","primaryOrgId":"1","updateDatetime":"2014-02-27 14:06:39","userStatus":"200"}
Read User Config
Returns the properties of a particular User.
Request:
GET /config/v2/users/{USER SPECIFIER}
URL Path Params
- USER SPECIFIER (mixed) - User ID (int) or email address (string).
Response:
Returns the properties of a particular User.
- userId (int) - User ID.
- username (string) - Login email address of the User.
- firstName (string) - User’s first name / forename.
- lastName (string) - User’s last name / surname.
- primaryOrgId (int) - User’s primary Organisation ID.
- updateDatetime (datetime) - Last update date time.
- userStatus (int) - Infinity Status code indicating status of the User (E.g. 200).
{"userId":"42","username":"some.person@example.com","firstName":"Some","lastName":"Person","primaryOrgId":"1","updateDatetime":"2014-03-14 09:30:42","userStatus":"200"}
Create User
Creates a new User. Note that all new Users must be created under an existing Organisation.
Request:
POST /config/v2/users
POST Params
- username (string) - Login email address of the User.
- password (string) OPTIONAL - Login password for the User. This must be a minimum of 8 characters long, and contain at least one upper case letter, one lower case letter and one number. A random password will be generated if you do not supply one.
- firstName (string) - User’s first name / forename.
- lastName (string) - User’s last name / surname.
- primaryOrgId (int) - User’s primary Organisation ID.
Response:
Returns the HTTP 201 (Created) status code if successful.
HTTP 201 - CREATED
Returns the ID of the new user in the response body:
{"userId":"123"}
Update User Config
Updates the properties of an existing User.
Request:
POST /config/v2/users/{USER SPECIFIER}
URL Path Params
- USER SPECIFIER (mixed) - User ID (int) or email address (string).
POST Params
- username (string) OPTIONAL - Login email address of the User.
- password (string) OPTIONAL - Login password for the User. This must be a minimum of 8 characters long, and contain at least one upper case letter, one lower case letter and one number.
- firstName (string) OPTIONAL - User’s first name / forename.
- lastName (string) OPTIONAL - User’s last name / surname.
- primaryOrgId (int) OPTIONAL - User’s primary Organisation ID.
Response:
Returns the HTTP 204 (No Content) status code if update successful.
HTTP 204 - NO CONTENT
Delete User
Disables an existing user.
Request:
DELETE /config/v2/users/{USER SPECIFIER}
URL Path Params
- USER SPECIFIER (mixed) - User ID (int) or email address (string).
Response:
Returns the HTTP 204 (No Content) status code if delete successful.
HTTP 204 - NO CONTENT