Result XML Format - EcoSys - Customization & Programming - Hexagon PPM

EcoSys Web Service API Usage Documentation

Language
English
Product
EcoSys
Search by Category
Customization & Programming
EcoSys Version
9.0

The following tables show Request/Response XML formats for Read, Write, and Event Triggers, assuming the API name is "SampleProject".

The actual names of the highlighted tags will depend on the base object type for the specific API called.

Read

  • XML Response Format

<SampleProjectResult

successFlag="true">

← Enclosing result tag

<Meta>

. . .

</Meta>

← Meta data, if requested

<SampleProject>

<Attribute1>value</Attribute1>

<Attribute2>value</Attribute2>

. . .

</SampleProject>

<SampleProject>

<Attribute1>value</Attribute1>

<Attribute2>value</Attribute2>

. . .

</SampleProject>

← List of resulting objects for read requests (if any)

<Performance>

. . .

</Performance>

← Performance data, if requested

</SampleProjectResult>

← Closing result tag

Write

  • XML Request Format

<SampleProjectRequest

← Enclosing request tag

<SampleProject>

<Attribute1>value</Attribute1>

<Attribute2>value</Attribute2>

. . .

</SampleProject>

<SampleProject>

<Attribute1>value</Attribute1>

<Attribute2>value</Attribute2>

. . .

</SampleProject>

List of requesting objects for write requests

</SampleProjectRequest>

← Closing request tag

  • XML Response Format

<SampleProjectResult

← Enclosing result tag

<ObjectResult index="0" successFlag="true" internalId="123" externalId="ABC" />

<ObjectResult index="1" successFlag="false" internalId="456" externalId="DEF" >

<ResultMessage Level="FAILURE" ReasonCode="ESRC_OBJECT_NOT_FOUND_BY_KEY">

<KeyName>Project Id "ABC"</KeyName>

<Message>Record update disallowed because

object not found by key.</Message>

</ResultMessage>

</ObjectResult>

. . .

← List of object results for write requests (if any), examples for success and non-success

</SampleProjectResult>

← Closing result tag

Each <ObjectResult> node in the output has the following attributes:

  • index (numeric) — index into sequence of original input object list, starting with zero

  • internalId (numeric) — the internal database id for the row, if available

  • externalId (string) — the external key value for the row, if any

  • successFlag (true/false) — indicates whether the write operation was successful for this object

In addition to the attributes above, each <ObjectResult> node can have zero or more optional <ResultMessage> sub nodes:

  • When the ‘successFlag’ is "False", there will be at least one <ResultMessage> node attached

  • When the ‘succesFlag’ is "True", there can be messages included such as warnings.

The <ResultMessage> node has the following attributes:

  • Level — one of SUCCESS, WARN, FAILURE

  • ReasonCode — a string indicating the reason for the message. For more information, see Result Reason Codes.

The <ResultMessage> node has the following sub nodes:

  • <KeyName> — contains a human-readable identifier for the row, typically the short name/id field's value, suitable for display to an end user

  • <Message> — a description of the cause of the message or error, suitable for display to an end user

  • <Exception> (optional) — string representation of the root cause exception, if any

  • <StackTrace> (optional) — the Java stack trace of the original exception, if available

Event Trigger

XML Response Format

<SampleProjectResult

successFlag="true">

← Enclosing result tag, success flag for event triggers