Inhaltsverzeichnis

Extras

GET

Get extra via ID [From X2 new format]

/rest/extras/extra/5

Example result
<?xml version="1.0" encoding="UTF-8"?>
<xml>
    <id>5</id>
    <project_id>11</project_id>
    <cost_centre_id>0</cost_centre_id>
    <work_package_id>12</work_package_id>
    <number>1.5</number>
    <type_id>6</type_id>
    <purpose>Test</purpose>
    ...
</xml>

POST/PUT

Add a new extra [From X2 new format]

/rest/extras/extra

Example request body
staff_id=4&date=2012/06/12&project_id=11&work_package_id=12&number=1.5&type_id=6&purpose=Test
Example result
<?xml version="1.0" encoding="UTF-8"?>
<xml>
    <url>.../rest/extras/extra/5</url>
</xml>

Possible values

Field Description Valid Values German Name
staff_id Staff ID required,integer Person
date Date required,us_date Datum
project_id Project ID required,integer Projekt
cost_centre_id Cost centre ID integer Kostenstelle
work_package_id Work package ID required,integer Bereich
number Number required,numeric,greater_than[-0.001] Anzahl
type_id Type ID required,integer Art
purpose Purpose Zweck
description Description Bemerkung

GET

Get extras for a member of staff for today [From X2 new format]

/rest/extras/staff/4

Example result
<?xml version="1.0" encoding="UTF-8"?>
<xml>
    <item0 id="19" purpose="foo" number="10" is_deducted="0" staff_name="Administrator" project="095 Krankenhaus Kupferberg 30" project_id="2" project_name="Krankenhaus Kupferberg 30" project_number="095" ... date="2015-10-12 00:00:00"/>
</xml>

Get extras for a member of staff for a defined date [From X2 new format]

/rest/extras/staff/4/2011/1/1

Same result as above