Zuletzt geändert von YellowFox_RD am 2025/03/04 16:34

Zeige letzte Bearbeiter
1 (% class="box" %)
2 (((Table of Contents)))
3 {{toc/}}
4
5 Return the current state and position for a single or multiple items.
6 = Description =
7 (% class="green mark" %)**GET**(%%) //**/inventory/get_latest_history.php?company**=RTI_COMPANYKEY**&import**=IMPORTKEY//
8 = Parameter =
9 |=Parameter|=Descriptions|=Type|=Hint|=Mandatory
10 |company|RTI company key|string||yes
11 |import|RTI import key|string||yes
12 |offset||unsigned int|Pro Abfrage werden bis zu 1000 Einträge zurück geliefert.  Um weitere Einträge zu erhalten, können Sie ein Offset angeben.|no
13 |profiles[]|profiles UUID|[] string|optional limitation to a list of given profiles|no
14 |objects[]|objects UUID|[] string|optional limitaiton to a list of given items|no
15 |groups[]|group UUID|[] string|optional limitiation to a list of given object groups|no
16 |with_beacon|Beacon position updates|bool| (((
17 * false: only return booked item or state changes
18 * true: additionally return all beacon position updates(((
19 * Keep in mind: This may result in large response data.
20 )))
21 )))|no
22
23 = Return value =
24 On success you will receive the result as json. On missing parameters or errors you will receive "(% class="error" %)**ERROR:description**(%%)".
25
26 == Possible error values ==
27 |=Fehler|=Beschreibung
28 |ERROR_MAINTENANCE|Your company is under maintenance, no RTI request are possible at the moment.
29 |INVALID_COMPANY|Company not found. Company key or import key might be faulty.
30 |INVENTORY_NOT_ACTIVATED|Inventory management is not activated for your company.
31 |MISSING_COMPANY|Company key is missing.
32 |MISSING_IMPORT|Import key is missing.
33 |INVALID_FORMAT_OFFSET|Offset value faulty
34
35 == JSON ==
36 You can access the specification as a JSON Schema file [[here>>https://vitaliirodin.developers.yellowfox.net/rti/schema/get_latest_history_schema.json]].
37
38 **Output example**
39
40 {{code language="js"}}{
41     "_date": "2025-02-26T10:17:58+01:00",
42     "_links": {
43         "next": {
44             "href": null
45         }
46     },
47     "events": [
48         {
49             "uuid": "7a2f9959-7ee1-83ec-8599-59901fcbfd93",
50             "description": "TestBeacon",
51             "gpsdate": "2025-02-26T11:11:06+01",
52             "last_status": {
53                 "value": "aktiv",
54                 "description": "Status"
55             },
56             "vehicle_sign": null,
57             "driver_key": null,
58             "driver_name": null,
59             "lat": 51.036697,
60             "lon": 13.599357,
61             "satellites": 9,
62             "text_position": null,
63             "customer_text": "Würth",
64             "orderdescr": null,
65             "data_source": "position",
66             "activities": []
67         },
68         {
69             "uuid": "a5ddb6a3-20ad-a418-5236-bc7e6a229b55",
70             "description": "046C8",
71             "gpsdate": "2025-02-26T11:11:06+01",
72             "last_status": {
73                 "value": "AAAA",
74                 "description": "dsfdsfsd"
75             },
76             "vehicle_sign": null,
77             "driver_key": null,
78             "driver_name": null,
79             "lat": 51.036682,
80             "lon": 13.5993805,
81             "satellites": 9,
82             "text_position": null,
83             "customer_text": "Würth",
84             "orderdescr": null,
85             "data_source": "position",
86             "activities": []
87         }
88     ]
89 }{{/code}}
90
91 = Example calls =
92 {{code language="java"}}https://map.yellowfox.de/rti/inventory/get_latest_history.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY{{/code}}