Wiki source code of get_messages.php
Last modified by Dominic Lippmann on 2025/01/23 10:09
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | (% class="box" %) |
![]() |
2.1 | 2 | ((( |
![]() |
5.1 | 3 | Table of Contents |
![]() |
2.1 | 4 | ))) |
5 | |||
![]() |
1.1 | 6 | {{toc/}} |
7 | |||
![]() |
5.1 | 8 | Returns the states of the messages. |
![]() |
2.1 | 9 | |
![]() |
5.1 | 10 | = Description = |
![]() |
2.1 | 11 | |
![]() |
5.1 | 12 | (% class="green mark" %)//**GET**//(%%)//** get_messages.php?company**=RTI_COMPANYKEY**&vehicle**=RTI_VEHICLEKEY&**language=**deu**&datefrom**=YYYYMMDD**&dateto**=YYYYMMDD**&timefrom=**HHMMSS**&timeto**=HHMMSS**&filter=**1,2,3**&sessionkey=**ABABABABABABABABABABABABABABAB**&format=**xml//**&mode**=insertdate |
![]() |
2.1 | 13 | |
![]() |
1.1 | 14 | = Parameter = |
![]() |
2.1 | 15 | |
16 | |||
![]() |
5.1 | 17 | |=Params|=Description|=Type|=Note|=Mandatory |
18 | |company|RTI company key|string| |yes | ||
19 | |vehicle|RTI vehcile key|string|vehicle or import or group parameter|(yes) | ||
20 | |group|RTI group key|string|vehicle or import or group parameter|(yes) | ||
21 | |import|RTI importkey|string|vehicle or import or group parameter|(yes) | ||
22 | |start|begin of requested timerange|datestring|format: YYYYMMDDHHMMSS|yes | ||
23 | |end|end of requested timerange|datestring|format: YYYYMMDDHHMMSS | ||
24 | max. timerange is 7 days|yes | ||
25 | |filter|filter the type of messages|integer|1 = answer received | ||
26 | 2 = confirmation message sent | ||
27 | 3 = display off | ||
28 | 4 = yes/no message sent | ||
29 | 5 = message already exists | ||
30 | 6 = message received | ||
31 | 7 = message read | ||
32 | 8 = message deleted | ||
33 | 9 = message could not be sent | ||
34 | 10 = message with response templates sent | ||
35 | 11 = delivered | ||
36 | 12 = delivery attempt | ||
37 | more than one filter have to separate with a comma|no | ||
38 | |language|define output language|string|supported params: deu (standard), gbr, ndl, fra, ita|no | ||
39 | |format|result format|string|format of the result from the interface | ||
40 | supported formats: csv (standard), xml, json|no | ||
41 | |sessionkey|SessionKey from "do_message.asp|string|this field or datefrom and dateto are mandatory|yes | ||
42 | |mode|Request of historydate or insertdate|string|historydate (standard) or insertdate|no | ||
![]() |
1.1 | 43 | |
![]() |
5.1 | 44 | = Possible message status = |
![]() |
2.1 | 45 | |
![]() |
5.1 | 46 | |=State|=Description |
47 | |delivery attempt|The message left the YellowFox data center. | ||
48 | |delivered|The message has arrived successfully on the display. | ||
49 | |display off|The display can not receive the message because it is off. | ||
50 | |message already exists|The message can not be recached, because it already exists. | ||
51 | |message received|A message has arrived in the portal, which was created on a display. | ||
52 | |message read|Message was read on the display. | ||
53 | |message deleted|Message has been deleted on the display. | ||
54 | |message could not be sent|The message has not reached the display, further delivery attempts are not carried out. | ||
55 | |message with response templates sent|The message was sent with reply templates. | ||
56 | |yes/no message sent|The message was sent with a yes-no option as a response. | ||
57 | |confirmation message sent|The message was sent with a confirmation option. | ||
58 | |answer received|A response from the display has been received. | ||
![]() |
1.1 | 59 | |
![]() |
5.1 | 60 | = Return = |
![]() |
1.1 | 61 | |
![]() |
5.1 | 62 | By default, a **CSV string** is returned which contains the evaluation for each message. If the mandatory parameters are missing, an "(% class="error" %)**ERROR: Description**(%%)" is returned. |
![]() |
2.1 | 63 | |
![]() |
5.1 | 64 | == CSV format == |
![]() |
2.1 | 65 | |
![]() |
1.1 | 66 | === Metainformationen === |
![]() |
2.1 | 67 | |
![]() |
5.1 | 68 | |=Separator|Semicolon ( ; ) |
69 | |=Delimiter|Double quote ( " ) | ||
70 | |=Line break|0x0D 0x0A (CarriageReturn LineFeed) | ||
71 | |=Header|Line 1 | ||
![]() |
1.1 | 72 | |
![]() |
5.1 | 73 | === Columns === |
![]() |
2.1 | 74 | |
![]() |
5.1 | 75 | |=Column|=Description|= |
76 | |DATE|date of the executed action|format: YYYY-MM-DD HH:MM:SS | ||
77 | |STATE|description of the action| | ||
78 | |SOURCE|action trigger (person)| | ||
79 | |SOURCENAME|action trigger (system)| | ||
80 | |SESSIONKEY|sessionkey of message| | ||
81 | |REQUESTDATE|system time of request|format: YYYY-MM-DD HH:MM:SS | ||
82 | |INSERTDATE|system time of processing|format: YYYY-MM-DD HH:MM:SS | ||
83 | |TEXT|content of the message| | ||
84 | |RTI_IDENT|RTI Ident| | ||
![]() |
1.1 | 85 | |
![]() |
5.1 | 86 | **result as CSV** |
87 | \\{{code language="java"}}"DATE";"STATE";"SOURCE";"SOURCENAME";"SESSIONKEY";"REQUESTDATE";"INSERTDATE";"TEXT";"RTI_IDENT" | ||
88 | ""2016-12-02 13:09:15";"confirmation message sent";"PORTAL";"Disponent 1";"";"2016-12-05 10:17:15";"2016-12-02 13:09:20";"Message 1";"Ident1" | ||
89 | "2016-12-02 13:08:25";"yes/no message sent";"PORTAL";"Disponent 1";"";"2016-12-05 10:17:15";"2016-12-02 13:08:15";"Question 1?";"Ident1" | ||
90 | "2016-12-02 09:09:15";"answer received";"PND";"Car 1";"ABABABABABABABABABABAB";"2016-12-05 10:17:52";"2016-12-02 09:09:20";"Answer 1";"Ident1"{{/code}} | ||
![]() |
1.1 | 91 | |
![]() |
5.1 | 92 | == XML format == |
![]() |
2.1 | 93 | |
![]() |
5.1 | 94 | **result as XML** |
95 | \\{{code language="java"}}<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
![]() |
1.1 | 96 | <!DOCTYPE yf_getmessages SYSTEM "http://map.yellowfox.de/rti/dtd/yf_getmessages.dtd"> |
97 | <yf_getmessages> | ||
98 | <message> | ||
99 | <date>2016-12-02 13:09:15</date> | ||
![]() |
5.1 | 100 | <state>confirmation message sent</state> |
![]() |
1.1 | 101 | <source>PORTAL</source> |
102 | <sourcename>Disponent 1</sourcename> | ||
103 | <sessionkey/> | ||
104 | <requestdate>2016-12-05 10:17:15</requestdate> | ||
105 | <insertdate>2016-12-02 13:09:20</insertdate> | ||
![]() |
5.1 | 106 | <text>Message 1</text> |
![]() |
2.1 | 107 | <rti_ident>Ident1</rti_ident> |
![]() |
1.1 | 108 | </message> |
109 | <message> | ||
110 | <date>2016-12-02 13:08:25</date> | ||
![]() |
5.1 | 111 | <state>yes/no message sent</state> |
![]() |
1.1 | 112 | <source>PORTAL</source> |
113 | <sourcename>Disponent 1</sourcename> | ||
114 | <sessionkey/> | ||
115 | <requestdate>2016-12-05 10:17:15</requestdate> | ||
116 | <insertdate>2016-12-02 13:08:15</insertdate> | ||
![]() |
5.1 | 117 | <text>Question 1?</text> |
![]() |
2.1 | 118 | <rti_ident>Ident1</rti_ident> |
![]() |
1.1 | 119 | </message> |
120 | <message> | ||
121 | <date>2016-12-02 09:09:15</date> | ||
![]() |
5.1 | 122 | <state>answer received</state> |
![]() |
1.1 | 123 | <source>PND</source> |
124 | <sourcename>Car 1</sourcename> | ||
125 | <sessionkey>ABABABABABABABABABABAB</sessionkey> | ||
126 | <requestdate>2016-12-05 10:17:52</requestdate> | ||
127 | <insertdate>2016-12-02 09:09:20</insertdate> | ||
![]() |
5.1 | 128 | <text>Answer 1</text> |
![]() |
2.1 | 129 | <rti_ident>Ident1</rti_ident> |
![]() |
1.1 | 130 | </message> |
131 | </yf_getmessages>{{/code}} | ||
132 | |||
133 | == JSON Format (RFC 4627) == | ||
![]() |
2.1 | 134 | |
![]() |
5.1 | 135 | **result as JSON** |
136 | \\{{code language="java"}}[ | ||
137 | {"date":"2016-12-02 13:09:15","state":"confirmation message sent","source":"PORTAL","sourcename":"Disponent 1","sessionkey":"","requestdate":"2016-12-05 10:17:15","insertdate":"2016-12-02 13:09:20","text":"Message 1"}, | ||
138 | {"date":"2016-12-02 13:08:25","state":"yes/no message sent","source":"PORTAL","sourcename":"Disponent 1","sessionkey":"","requestdate":"2016-12-05 10:17:15","insertdate":"2016-12-02 13:08:15","text":"Question 1?"}, | ||
139 | {"date":"2016-12-02 09:09:15","state":"answer received","source":"PND","sourcename":"Car 1","sessionkey":"ABABABABABABABABABABAB","requestdate":"2016-12-05 10:17:52","insertdate":"2016-12-02 09:09:20","text":"Answer 1","rti_ident":"Ident1"}]{{/code}} | ||
![]() |
1.1 | 140 | |
![]() |
5.1 | 141 | = Example call = |
![]() |
1.1 | 142 | |
![]() |
5.1 | 143 | **Query by SessionKey** |
144 | \\{{code language="java"}}https://map.yellowfox.de/rti/get_messages.pgp?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&language=deu&sessionkey=SESSION_KEY | ||
![]() |
1.1 | 145 | |
146 | https://map.yellowfox.de/rti/get_messages.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&language=deu&sessionkey=SESSION_KEY{{/code}} | ||
147 | |||
![]() |
5.1 | 148 | **Query by time range based** |
149 | \\{{code language="java"}}https://map.yellowfox.de/rti/get_messages.php?company=COMPANY_RTIKEY&group=GROUP_RTIKEY&language=gbr&start=20161202083015&end=20161205161500&filter=1,2,4,11&format=xml&mode=insertdate{{/code}} | ||
![]() |
1.1 | 150 |