Page tree
Skip to end of metadata
Go to start of metadata

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

companyRTI company keystring
yes
importRTI import keystring
yes
formatoutput formatstring

allowed output formats

  • csv
  • json
  • xml

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

SeparatorSemicolon ( ; )
DelimiterDouble quote ( " )
Line break0x0D 0x0A (CarriageReturn LineFeed)
HeaderRow 1
EncodingWindows-1252

CSV columns

Column

Description


 
identoptional self-defined identifier of the activityCan be set under Timerecording> Settings> Activities
The standard activity "End span" always has an "ident" of "0".
nameself-defined name of the activity
colorself-defined color of the activityFormat: hexadecimal
The standard activity "Leaving" has no color.
is_worktimeOption whether this activity is part of a working time or not.Possible values: 0 or 1
is_standbytimeOption 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
  • No labels