user

operations about users

Creates a user

Request
Request Body schema: application/json
firstName
string
lastName
string
email
string
phone
string
fax
string
companyName
string

Company name to whcih user is associated to

companyLocationName
string

The Company location for which the user is associated to

licenceType
string
Default: "LicencedUser"

Pass LicencedUser to create a licenced user and TransactionBasedUser for a transactional user. User will be active only when your appzone has sufficient licences in the given category, else user will be inactive. You can change the status of the user at any time from the Admin Console.

Enum: "LicencedUser" "TransactionBasedUser"
object

additional information which you want to assign for the user

applicationRoles
Array of strings

List of role names which you want to assign for the user

groups
Array of strings

List of group names which you want to assign for the user

dashboardGroups
Array of strings

List of dashboard group names which you want to assign to the user

Responses
200

User was created

400

Invalid emailId, Company, CompanyLocation, or Email

401

Insufficient user licences

402

email already exists

post/user/create
Request samples
application/json
{
  • "firstName": "Caleb",
  • "lastName": "Carr",
  • "email": "ccarr@smartapp.com",
  • "phone": "555-123-4567",
  • "fax": "1-555-9876543",
  • "companyName": "smartapp.com",
  • "companyLocationName": "headquarters",
  • "licenceType": "LicencedUser",
  • "metadata": {
    },
  • "applicationRoles": [
    ],
  • "groups": [
    ],
  • "dashboardGroups": [
    ]
}
Response samples
application/json
{
  • "email": "jdoe@gmail.com",
  • "userID": "00000000-0000-0000-0000-000000000000",
  • "globalUserID": "00000000-0000-0000-0000-000000000000"
}

Returns a user from the user's unique ID

Retrieves the deatils of an existing user. You only need to supply the unique identifier that was returned upon user creation

Request
path Parameters
uniqueid
required
string <uuid>

The unique identifier of the user to be retrieved

Example: 00000000-0000-0000-0000-000000000000
Responses
200

company location was updated

get/user/get/{uniqueid}
Request samples
Response samples
application/json
{
  • "uniqueID": "00000000-0000-0000-0000-000000000000",
  • "globalUserID": "00000000-0000-0000-0000-000000000000",
  • "firstName": "Caleb",
  • "lastName": "Carr",
  • "displayName": "ccarr1",
  • "email": "ccarr@smartapp.com",
  • "status": "Active",
  • "company": {
    },
  • "licenceType": "Licenced User",
  • "metadata": { },
  • "applicationRoles": [
    ],
  • "groups": [
    ],
  • "dashboardGroups": [
    ],
  • "fax": "string",
  • "mobile": "982-482-5927",
  • "phone": "123-456-7890",
  • "userName": "ccarr1",
}

Retrieves the details of existing users

Request
query Parameters
skip
integer
Default: 0

Total number of records to skip from the result set. If not passed then will default to 0

Example: skip=10
take
integer
Default: 25

Total number of records to return. If not passed then will default to 25

Example: take=20
object (userFieldData)

Array of field data. If not passed in the it returns all the metadata and system fields along with the values.

object (metadataFilterParams)

If passed in then filters for the metadata values else returns all the records based on the parameters

Responses
200

returned an array of user objects

post/user/getbymetadata
Request samples
Response samples
application/json
{
  • "totalCount": 0,
  • "users": {
    }
}

Activates an existing user

Activates an existing user. You only need to supply the unique identifier that was returned upon user creation

Request
query Parameters
uniqueID
required
string <uuid>

The unique identifier of the user to be activated

Example: uniqueID=00000000-0000-0000-0000-000000000000
Responses
200

A user was activated

400

invalid user Id

401

Insufficient licences to activate the user

post/user/activate/uniqueid
Request samples

Deactivates an existing user

Deactivates an existing user. You only need to supply the unique identifier that was returned upon user creation. On deactivation of a user, all the licences that are assigned to the user will be freed and could be assigned to other users from the admin console

Request
query Parameters
uniqueID
required
string <uuid>

The unique identifier of the user to be retrieved

Example: uniqueID=00000000-0000-0000-0000-000000000000
Responses
200

A user was deactivated

400

Invalid User Id

post/user/deactivate/uniqueid
Request samples

updates a user

Updates the specified user by setting the values of the parameters passes. Any parameters not provided will be left unchanged

Request
query Parameters
uniqueID
required
string <uuid>
Example: uniqueID=00000000-0000-0000-0000-000000000000
firstName
string
Example: firstName=Caleb
lastName
string
Example: lastName=Carr
email
string

Allows you to update when user is in local authentication mode, else gets updated on sax profile update

Example: email=ccarr@smartapp.com
phone
string
Example: phone=555-123-4567
mobile
string
Example: mobile=555-234-5678
fax
string
Example: fax=1-212-9876543
companyName
string

Company name to which user is associated to

Example: companyName=smartapp.com
companyLocationName
string

Company location for which user is associated to

Example: companyLocationName=headquarters
licenceType
string
Default: "LicencedUser"

Pass LicensedUser to create a licensed user and TransactionBasedUser for transactional user. User will be active only when your appzone has sufficient licenses in the given category else inactive. You can change status of the user at any time from Admin Console.

Enum: "LicencedUser" "TransactionBasedUser"
object

Additional information that you want to add to the user

Example: Favorite employee=true
Responses
200

user was updated

400

Invalid email id, company, user id, company location , or email

401

insufficient licences

402

email already exists

post/user/update
Request samples
Response samples
application/json
{
  • "email": "jdoe@gmail.com",
  • "userID": "00000000-0000-0000-0000-000000000000",
  • "globalUserID": "00000000-0000-0000-0000-000000000000"
}

Add roles from a user

Request
query Parameters
uniqueID
required
string <uuid>

The unique identifier of the user for whom you want to add from role(s)

Example: uniqueID=00000000-0000-0000-0000-000000000000
roles
required
Array of strings

Array of one or more roles that you want to add them to

Example: roles=general user&roles=accountant
Responses
200

success

400

Invalid role(s) or userid

post/user/addroles
Request samples

Remove roles from a user

Request
query Parameters
uniqueID
required
string <uuid>

The unique identifier of the user whom you want to remove user from role(s)

Example: uniqueID=00000000-0000-0000-0000-000000000000
roles
required
Array of strings

Array of one or more roles that you want to remove a user from

Example: roles=general user&roles=accountant
Responses
200

success

400

Invalid role(s) or userID

post/user/removeroles
Request samples

Add a user from groups

Request
query Parameters
uniqueID
required
string <uuid>

The unique identifier of the user for whom you want to add to group(s)

Example: uniqueID=00000000-0000-0000-0000-000000000000
groups
required
Array of strings

Array of one or more groups that you want to add the user to

Example: groups=General User&groups=Accountant
Responses
200

Success

400

Invalid group(s) or userId

post/user/addgroups
Request samples

Remove a user from groups

Request
query Parameters
uniqueID
required
string <uuid>

The unique identifier of the user for whom you want to remove user from group(s)

Example: uniqueID=00000000-0000-0000-0000-000000000000
groups
required
Array of strings

Array of one or more groups that you want to remove the uer from.

Example: groups=General user&groups=Accountant
Responses
200

Success

400

Invalid group(s) or userId

post/user/removegroups
Request samples

Add a user from a dashboard group

Request
query Parameters
uniqueId
required
string <uuid>

The unique identifier of the user for whom you want to add to a dashboard group

Example: uniqueId=00000000-0000-0000-0000-000000000000
dashboardGroups
required
Array of strings

Array of one or more dashboard groups that you want to add the user to

Example: dashboardGroups=General user&dashboardGroups=Accountant
Responses
200

Success

400

Invalid group(s) or userId

post/user/adddashboardgroups
Request samples

Remove a user from a dashboard group

Request
query Parameters
uniqueID
required
string <uuid>

The unique identifier of the user for which you want to remove from dashboard group(s)

Example: uniqueID=00000000-0000-0000-0000-000000000000
dashboardGroups
required
Array of strings

Array of one or more dashboard groups that you want to remove the user from

Example: dashboardGroups=general user&dashboardGroups=accountant
Responses
200

Success

400

Invalid group(s) or userId

post/user/removedashboardgroups
Request samples

Returns a user from the user's unique ID

Request
path Parameters
globalid
required
string <uuid>

The global id of the user to be retrieved

Example: 00000000-0000-0000-0000-000000000000
Responses
200

A User object

400

Invalid userID or user

get/user/getbyglobalid/{globalid}
Request samples
Response samples
application/json
{
  • "uniqueID": "00000000-0000-0000-0000-000000000000",
  • "globalUserID": "00000000-0000-0000-0000-000000000000",
  • "firstName": "Caleb",
  • "lastName": "Carr",
  • "displayName": "ccarr1",
  • "email": "ccarr@smartapp.com",
  • "status": "Active",
  • "company": {
    },
  • "licenceType": "Licenced User",
  • "metadata": { },
  • "applicationRoles": [
    ],
  • "groups": [
    ],
  • "dashboardGroups": [
    ],
  • "fax": "string",
  • "mobile": "982-482-5927",
  • "phone": "123-456-7890",
  • "userName": "ccarr1",
}