scroll

Field - Read

Field Read Method

The Field API provides access to the item information of a Resource.

Field Read allows the user to acquire the list of Fields that meet the specified conditions.

GET

https://{Request URI Host}/v1/field?partition=[value]&resource=[value]&active=[value]&count=[Value]&start=[value]

 

Scope

The access right required for Field Read is as follows:

field_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.
resource Specify the type of Resource.
For information on the values that can be specified, see Resource List.
active Specify the type of use/nonuse of the item.
The following values can be specified. If nothing is specified, -1 is assumed to be specified.
 -1: Acquire all the items.
  0: Acquire only the items not used.
  1: Acquire only the items in use.
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.

 

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 handled by the Field API.

Tag Definition
Field Route element including the Field 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 Field Indicates the total number of records that can be acquired under the specified search conditions.
 Count The attribute of the Field Indicates the number of records of the data acquired this time.
 Start The attribute of the Field 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 Field information.
 Field.P_Id The Id of the item
 Field.P_Name The name of the item
 Field.P_Alias The Alias of the item
 Field.P_Type The type of the item
For details, see Field Type & Data Type List.
 Field.P_Required Indicates the required setting status of the item.
 0: Normal item
 1: Required item
 Field.P_Max For the Text Type, indicates the maximum number of characters.
For the Number Type, indicates the maximum value.
 Field.P_Min For the Text Type, indicates the minimum number of characters.
For the Number Type, indicates the minimum value.
 Field.P_DecimalFraction For the Number Type, indicates the number of decimal places.
 Field.P_ReferTo For the Option Type, indicates the Alias of the option associated with the item.
For the Reference Type, indicates the Alias of the item in the upper-level Resource that is referred to.
 Field.P_ResourceType The value of the Resource. For details, see Resource List.

 

Field 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 shows the sample when acquiring two records of data from all the Fields of the Job.

Input Parameter

https://{Request URI Host}/v1/field?partition=999999&resource=3&active=-1&count=2

 

Output XML

<?xml version=”1.0” encoding=”UTF-8” standalone=”yes”?>
<Field Total=”N” Count=”2” Start=”0”>
 <Code>0</Code>
 <Item>
  <Field.P_Id>100</Field.P_Id>
  <Field.P_Name>Position</Field.P_Name>
  <Field.P_Alias>Job.P_Position</Field.P_Alias>
  <Field.P_Type>1</Field.P_Type>
  <Field.P_Required>1</Field.P_Required>
  <Field.P_Max>100</Field.P_Max>
  <Field.P_Min>1</Field.P_Min>
  <Field.P_DecimalFraction>0</Field.P_DecimalFraction>
  <Field.P_ReferTo/>
  <Field.P_ResourceType>3</Field.P_ResourceType>
 </Item>
 <Item>
  <Field.P_Id>101</Field.P_Id>
  <Field.P_Name>Work Location</Field.P_Name>
  <Field.P_Alias>Job.P_Area</Field.P_Alias>
  <Field.P_Type>5</Field.P_Type>
  <Field.P_Required>0</Field.P_Required>
  <Field.P_Max/>
  <Field.P_Min/>
  <Field.P_DecimalFraction>0</Field.P_DecimalFraction>
  <Field.P_ReferTo><Option.P_Area/></Field.P_ReferTo>
  <Field.P_ResourceType>3</Field.P_ResourceType>
 </Item>
</Field>

 

Was this article helpful?
0 out of 0 found this helpful