User Read Method
The User API provides access to User.
User Read allows the user to acquire the list of Users that meet the specified conditions.
GET |
https://{Request URI Host}/v1/user?partition=[value]&request_type=[value]&user_type=[value]&count=[value]&start=[value]&field=[value] |
---|
Scope
The access right required for User Read is as follow:
user_r
Input Variables
When using the GET or POST Method, a value must be specified for the parameter of the HTTP Header. For details, see HTTP Header.
The following shows the Parameters that can be specified:
Required | Parameter | Definition |
---|---|---|
● | partition | Specify a numerical value for the Partition Id. To check the Partition Id that can be accessed, acquire the information using Partition Read. |
● | request_type | Specify the type of user to acquire. The following values can be specified. 0: Acquire the information on the currently logged-in User. 1: Acquire the list including all the Users. |
ー | user_type | The types of [User Type] set under [Settings] > [User] of HRBC include “System administrator” and “Standard user.” The following values can be specified. If nothing is specified, -1 is assumed to be specified. -1: Acquire the user of all types. 0: Acquire the “system administrators.” 1: Acquire the “standard users.” |
ー | count | Specify the number of records of data to acquire. The range of the values that can be specified is between 1 and 200. If nothing is specified, 10 is assumed to be specified. |
ー | start | The start index of the data to acquire. Specify a numerical value of 0 or larger. If nothing is specified, 0 is assumed to be specified. |
ー | field | Specify items to output. For information on the Fields that can be specified, see User - Field List / Timezone List. If nothing is specified, the following four items are assumed to be specified. 1. User.P_Id 2. User.P_Type 3. User.P_Name 4. User.P_Mail This Parameter is available with HRBC Connect API 3.12.31 and later. For the release information, see Enhancement of User Read API. |
Result Values
When the processing is successfully completed, “200” is returned to the Response Header as the HTTP status, and the value that is described in Output Values can be acquired.
If an error occurs, a value other than 200 is returned.
Output Values
The output value can be acquired in the XML format. No optional Field can be acquired by the User API.
Tag | Definition |
---|---|
User | Route element including User that meets the conditions. The number of acquired data is set for Count, and the index of the acquired data is set for Start. Start is the index beginning with 0. |
Total | The attribute of the User. Indicates the total number of records that can be acquired under the specified search conditions. |
Count | The attribute of the User. Indicates the number of records of the data acquired this time. |
Start | The attribute of the User. Indicates the start index of the data acquired this time. |
Code | This is the code that represents the processing result. For details, see Result Code List. |
Item | Indicates one piece of User information. |
Field | Stores the value of a specified item. For the names of the elements, see User - Field List / Timezone List. |
User Read Sample
This sample code shown below is not encoded. In the case of an actual Request, encoding/decoding may be necessary depending on the content.
The following show the samples when acquiring all the user information.
Input Parameter https://{Request URI Host}/v1/user?partition=999999&request_type=1&user_type=-1 |
Output XML <?xml version=”1.0” encoding=”UTF-8” standalone=”yes”?> |