Department Read Method
The Department API provides access to Department.
Department Read allows the user to acquire the list of Department that meet the specified conditions.
|
GET |
https://{Request Host}/v1/department?partition=[value]&count=[value]&start=[value]&field=[value] |
|---|
Scope
The access right required for Department 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:
| 必須 | 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. |
| ー | 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 Department - Field List This Parameter is available with HRBC Connect API 8.2.1 and later. |
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 Department API.
| Tag | Definition |
|---|---|
| Department |
Route element including Department that meets the conditions. |
| Total |
The attribute of the Department. Indicates the total number of records that can be acquired under the specified search conditions. |
| Count |
The attribute of the Department. Indicates the number of records of the data acquired this time. |
| Start |
The attribute of the Department. 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 Department information. |
| Field |
Stores the value of a specified item. |
Department 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 sample is an example of retrieving a department ID and department name.
|
Input Parameter https://{Request Host}/v1/department?partition=999999 &field=Department.P_Id,Department.P_Name |
|
Output XML <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Department Total="2" Count="2" Start="0"> <Code>0</Code> <Item> <Department.P_Id>1</Department.P_Id> <Department.P_Name>Division1</Department.P_Name> </Item> <Item> <Department.P_Id>2</Department.P_Id> <Department.P_Name>Division2</Department.P_Name> </Item> </Department> |