Compatibility
This function is intended to be used with timerecording V3
Returns all currently available time recording activities.
Description
GET timerecording/get_activities.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&format=FORMAT_TYPE
Parameters
Parameter | Description | Type | Note | Mandatory |
---|---|---|---|---|
company | RTI company key | string | yes | |
import | RTI import key | string | yes | |
format | output format | string | allowed output formats
Default is csv. | no |
Return values
This function returns a string. On error the return will be "Error:Description".
JSON Format
Returns a JSON formatted text with the properties of each activity.
Example output
json output
[ { ident: 'A100', name: 'Arbeiten', color: 'CC0000', is_worktime: 1, is_standbytime: 0 }, { ident: 'A200', name: 'Fahren', color: '00CC00', is_worktime: 1, is_standbytime: 0 }, { ident: 'P100', name: 'Pause', color: '0000CC', is_worktime: 0, is_standbytime: 0 }, { ident: 'B100', name: 'Bereitschaft', color: '0000CC', is_worktime: 0, is_standbytime: 1 } ]
XML Format
Returns an XML formatted text with the properties of each activity.
Example output
xml output
<?xml version="1.0" encoding="UTF-8"?> <activities> <activity> <color>CC0000</color> <ident>A100</ident> <is_standbytime>0</is_standbytime> <is_worktime>1</is_worktime> <name>Arbeiten</name> </activity> <activity> <color>00CC00</color> <ident>A200</ident> <is_standbytime>0</is_standbytime> <is_worktime>1</is_worktime> <name>Fahren</name> </activity> <activity> <color>0000CC</color> <ident>P100</ident> <is_standbytime>0</is_standbytime> <is_worktime>0</is_worktime> <name>Pause</name> </activity> <activity> <color>0000CC</color> <ident>B100</ident> <is_standbytime>1</is_standbytime> <is_worktime>0</is_worktime> <name>Bereitschaft</name> </activity> </activities>
CSV Format
The CSV format contains one line per activity. Fields that can contain multiple data records are output as a JSON string.
Meta information
Separator | Semicolon ( ; ) |
---|---|
Delimiter | Double quote ( " ) |
Line break | 0x0D 0x0A (CarriageReturn LineFeed) |
Header | Row 1 |
Encoding | Windows-1252 |
CSV columns
Column | Description | |
---|---|---|
ident | optional self-defined identifier of the activity | Can be set under Timerecording> Settings> Activities The standard activity "End span" always has an "ident" of "0". |
name | self-defined name of the activity | |
color | self-defined color of the activity | Format: hexadecimal The standard activity "Leaving" has no color. |
is_worktime | Option whether this activity is part of a working time or not. | Possible values: 0 or 1 |
is_standbytime | Option whether this activity is part of a standby time or not. | Possible values: 0 or 1 |
Example output
output in CSV
"ident";"name";"color";"is_worktime";"is_standbytime" "A100";"Arbeiten";"CC0000";"1";"0" "A200";"Fahren";"00CC00";"1";"0" "P100";"Pause";"0000CC";"0";"0" "B100";"Bereitschaft";"0000CC";"0";"1"
Example call
Retrieval of bookings in CSV format
https://map.yellowfox.de/rti/timerecording/get_activities.php?company=COMPANY_RTIKEY&import=COMPANY_IMPORTKEY&format=csv