scroll

Read API - XML Format

The formats of XML to be output by the Read API are classified into the following types:

For details on the Field Type and Data Type, see Field Type & Data Type List.

Standard Format

The standard format of XML to be output by the Read API is as follows:

<Resource Name Total=N Count=N Start=N>
<Code>Result Code</Code>
<Item>
  <Alias>value</Alias>
 </Item>
</Resource Name>

The <Item> tag indicates one data that belongs to the Resource. Zero or more <Item> tags are output according to the condition.

In the <Item> tag, one or multiple <Alias> tags are output.

 

Data Type:Number

When multiple options are selected, multiple Aliases are output between the Option Alias (Root) tags.

The Alias to be output is the end Alias. The parent-child relationship is not expressed here.

 

Data Type:Option

When multiple options are selected, multiple Aliases are output between the Option Alias (Root) tags.

The Alias to be output is the end Alias. The parent-child relationship is not expressed here.

<Field Alias (Option Type)>
<Option Alias (Root)>
<Option Alias/>
<Option Alias/>
</Option Alias>
</Field Alias>

The following shows the output sample when “Tokyo” and “Kanagawa” are specified for the region of the JOB.

<Job>
<Item>
<Job.P_Area>
   <Option.P_Area>
    <Option.P_Tokyo>
     <Option.P_Id>87</Option.P_Id>
    </Option.P_Tokyo>
    <Option.P_Kanagawa>
     <Option.P_Id>88</Option.P_Id>
    </Option.P_Kanagawa>
</Option.P_Area>
  </Job.P_Area>
</Item>
</Job>

 

Data Type:System[Reference] & User

For the System[Reference] and User Type items, the items that belong to the Resource to be referred to will be output.

For how to set the output Field, see Parameter > Read – Field.

<Field Alias (System[Reference] Type)>
<Resource Name>
<Resource Item>
</Resource Item>
</Resource Name>
</Field Alias>

The following shows the output sample when “Ichiro Suzuki” is specified for the owner of the JOB.

<Job>
<Item>
<Job.P_Owner>
   <User>
    <User.P_Id>1</User.P_Id>
    <User.P_Name>Ichiro Suzuki</User.P_Name>
   </User>
  </Job.P_Owner>
</Item>
</Job>

*The parts in blue are the tag of the Resource to be referred to.

*The parts in green are the items that belong to the Resource to be referred to.

 

Link Type can only output Contact ID.

* Unlike System[Reference] and User Type, information such as Contact.P_Name cannot be obtained.

* Contact.P_Name and other information can be obtained separately using the Contact API.

 

Data Type:Image

The tags that can be output by Image type are only FileName, ContentType, and Content.

By default, only FileName is output. To output Content Type and Content, enclose the tags to output with ( ) after the field alias of the Image Type in the following format:

field_alias(FileName,ContentType,Content)

Delimit multiple tags, if specified, with a comma.

Note that the image type items cannot be specified for the “condition” of the Resource API. Also, the image type items in an upper-level Resource cannot be referred to nor acquired.

 

Output Values

The output value can be acquired in the XML format.

Tag Definition
Content Bease64 encoded image file.
ContentType Specifies the type of the data that are specified for Content. Usually, this type is the same as the Mime Type.
The types that can be handled for the Image Type are image/jpeg (jpg, jpeg), image/gif (gif), image/png (png), and image/bmp (bmp).
FileName The file name the image.

 

Sample

The following shows an example when specifying the image type item Resume.U_XXX at the time of Resume Read to acquire FileName,ContentType.

Input Parameter

https://{Request URI Host}/v1/resume?partition=999999&field=Resume.U_XXX(FileName,ContentType)

 

Output XML

<?xml version=”1.0” encoding=”UTF-8” standalone=”yes”?>
<Resume Total=”12” Count=”2” Start=”0”>
<Code>0</Code>
<Item>
<Resume.U_XXX>
<FileName>Image1.jpg</FileName>
<ContentType>image/jpeg</ContentType>
</Resume.U_XXX>
</Item>
<Item>
<Resume.U_XXX>
<FileName>Image3.jpg</FileName>
<ContentType>image/jpeg</ContentType>
</Resume.U_XXX>
</Item>
</Resume>

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