Skip to end of metadata
Go to start of metadata

Downloading the list of users

Path to servlet: api/users/query

Method: GET

Parameters:

  • query - a phrase on the basis of which the results will be filtered. Filtering applies to the login, first and last name of users.
      Except that the given phrase matches the first name and last name values from the beginning. On the other hand, it looks for the phrase anywhere in the login field, which also contains the domain value.
  • start - the offset in the result set
  • limit - the maximum number of returned results

Answer:

  • The answer contains an object storing the total number of results in the total field, and a list of users in the data field.

 

Example answer
{
   "total":3,
   "data":[
      {
         "userName":"admin",
         "objectId":1000036,
         "firstName":"Default User",
         "lastName":"",
         "email":"",
         "active":true,
 		 "number":"122",
         "positions":null,
         "groups":null,
         "fullName":"Default User "
      },
      {
         "userName":"afd",
         "objectId":1001001,
         "firstName":"fdsfasd",
         "lastName":"sdfs",
         "email":"",
         "active":true,
         "positions":null,
		 "number":"124",
         "groups":null,
         "fullName":"fdsfasd sdfs"
      }
   ]
}

Downloading the list of users by roles

Path to servletapi/users/by/roles

Method: POST

Request Content-Typeapplication/json

Query Content:

 JSON object list containing role search parameters. The object definition should contain the following field:

    • packageId - Id of the package in which roles will be searched.
    • processDefId - Id of the process in which the roles will be searched for
    • roleIds - List id of roles(text id).

 All parameters are optional. If you specify processDefId then the global roles used in this process will also be searched. Conditions within a single element are connected by the AND operator(e.g. if we specify packegeId and processDefId). On the other hand, the conditions of individual elements in the list of conditions are connected by the OR operator, e.g:

Example query
[  //Query finds users with the role participant_1 from the suncode_api package from the form entry process
   //and users with the role participant_3 from the suncode_api package from the invoice process
   {  
      "processDefId":"zapisformularza",
      "packageId":"suncode_api",
      "roleIds":[  
         "uczestnik_1"
      ]
   },
   {  
      "processDefId":"faktury",
      "packageId":"suncode_api",
      "roleIds":[  
         "uczestnik_3"
      ]
   }
]


Answer:

  • The answer contains a list of users

 

Example answer
[
      {
         "userName":"admin",
         "objectId":1000036,
         "firstName":"Default User",
         "lastName":"",
         "email":"",
         "active":true,
         "positions":null,
         "groups":null,
		 "number":"123",
         "fullName":"Default User "
      },
      {
         "userName":"afd",
         "objectId":1001001,
         "firstName":"fdsfasd",
         "lastName":"sdfs",
         "email":"",
         "active":true,
		 "number":"124",
         "positions":null,
         "groups":null,
         "fullName":"fdsfasd sdfs"
      }
]

Getting user information by login

Path to servlet: api/users/by/login

Method: GET

Parameters

  • username - login of the requested user

Answer:

  • The response returns a UserInfo object with information about the user
Example answer
{
  "userName": "admin",
  "firstName": "Administrator",
  "lastName": "PlusWorkflow",
  "fullName": "Administrator PlusWorkflow",
  "email": "",
  "number": "",
  "groups": null,
  "positions": null
}

Getting information about the currently logged in user

Path to servlet: api/users/current

Method: GET

Answer:

    • The response returns a UserInfo object with information about the logged in user
Example answer
{
  "userName": "admin",
  "firstName": "Administrator",
  "lastName": "PlusWorkflow",
  "fullName": "Administrator PlusWorkflow",
  "email": "",
  "number": "",
  "groups": [
    {
      "name": "Administrators"
    }
  ],
  "positions": []
}



  • No labels