Get Relations

<< Click to Display Table of Contents >>

Navigation:  API requests >

Get Relations

You can find extra information about how relations work in TimeWriter Pro here.

 

API request

Name: GetRelations

 

API request structure

<?xml version="1.0" encoding="UTF-8"?>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Header/>

<S:Body>

  <ns2:GetRelations xmlns:ns2="api.timewriter.nl">

    <securityToken></securityToken>

    <id1></id1>

    <id2></id2>

    <relationType></relationType>

    <filters>

      <filter>

        <field></field>

        <operator></operator>

        <value></value>

      </filter>

       ...

    </filters>

  </ns2:GetRelations>

</S:Body>

</S:Envelope>

 

Explanation

Tag/field name

Type

Remark

Description

securityToken

string

mandatory

securityToken obtained at log in

id1

long


aspect id

id2

long


aspect id or -1  

relationType

RelationType

mandatory

Must have a value from RelationType

or use * to get all Relations.

relatietype

filters

List<Filter>

optional

Apart from the id1/id2/relationType filter this filter can be used for filtering on the field TIMESTAMP. Changes can be fetched using this.

filter list for Relation fields (check Response structure and Explanation below)

See also Filter

For only fetching the changed data check the: Filter -> Example

 

Examples

hmtoggle_arrow1Get all relations using id1
hmtoggle_arrow1Get relaties with RelationType ending with ALL

 

 

API response

Name: GetRelationsResponse

 

API response structure

<?xml version="1.0" encoding="utf-8"?>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Header/>

<S:Body>

  <ns2:GetRelationsResponse xmlns:ns2="api.timewriter.nl">

    <result>

      <error></error>

      <errorMessage></errorMessage>

      <relationList>

        <relation>

          <id1></id1>

          <id2></id2>

          <relationType></relationType>

        </relation>

         ...

      </relationList>

    </result>

  </ns2:GetRelationsResponse>

</S:Body>

</S:Envelope>

 

Explanation

Tag/field name

Type

result

RequestResult

Tag/field name

Type

Description

error

boolean

false if there are no errors, true if there are errors

errorMessage

string

error message, only used when error = true

relationList

List<Relation>

a list of Relations