Wiki-Quellcode von inventory/get_latest_history.php
Version 2.1 von Dominic Lippmann am 2025/03/04 16:31
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | (% class="box" %) | ||
2 | ((( | ||
3 | Inhaltsverzeichnis | ||
4 | ))) | ||
5 | |||
6 | {{toc/}} | ||
7 | |||
8 | Gibt den jeweils aktuellsten Status samt Position zu einem oder mehreren Objekten zurück. | ||
9 | |||
10 | = Beschreibung = | ||
11 | |||
12 | //**GET /inventory/get_latest_history.php?company**=RTI_COMPANYKEY**&import**=IMPORTKEY// | ||
13 | |||
14 | = Parameter = | ||
15 | |||
16 | |=Parameter|=Beschreibung|=Typ|=Hinweis|=Pflicht | ||
17 | |company|RTI Firmenschlüssel|string| |ja | ||
18 | |import|RTI Importschlüssel|string| |ja | ||
19 | |offset| |int|Pro Abfrage werden bis zu 1000 Einträge zurück geliefert. Um weitere Einträge zu erhalten, können Sie ein Offset angeben.|nein | ||
20 | |profiles[]|Profiles UUID|[] string|optionale Einschränkung auf eine Liste an Objektprofilen|nein | ||
21 | |objects[]|Objects UUID|[] string|optionale Einschränkung auf eine Liste an Objekten|nein | ||
22 | |groups[]|Gruppenname UUID|[] string|optionale Einschränkung auf eine Liste an Objektgruppen|nein | ||
23 | |with_beacon|Beacon Positionsmeldungen|bool|((( | ||
24 | * false: der letzte Status wird nur anhand der gebuchten Aktivitäten zurückgegeben | ||
25 | * true: Als Zeitpunkt des letzten Status werden auch Beacon-Positionsmeldungen beachtet. | ||
26 | )))|nein | ||
27 | |||
28 | = Rückgabe = | ||
29 | |||
30 | Bei Erfolg erhalten Sie die Rückgabe im JSON Format. Bei fehlenden Pflichtparametern oder Fehlern wird ein "(% class="error" %)**ERROR:Beschreibung**(%%)" zurückgegeben. | ||
31 | |||
32 | == Mögliche Fehlerwerte == | ||
33 | |||
34 | |=Fehler|=Beschreibung | ||
35 | |MISSING_COMPANY|Firmenschlüssel fehlt | ||
36 | |INVALID_COMPANY|Firma nicht gefunden. Dies kann an einem fehlerhaften Firmen- oder Import-Schlüssel liegen. | ||
37 | |ERROR_MAINTENANCE|Ihre Firma wird gerade gewartet, währenddessen sind keine RTI Abfragen möglich. | ||
38 | |MISSING_IMPORT|Import-Schlüssel fehlt. | ||
39 | |INVENTORY_NOT_ACTIVATED|Objektverwaltung ist für ihre Firma nicht aktiviert. | ||
40 | |INVALID_FORMAT_OFFSET|Offset ist falsch. | ||
41 | |||
42 | == JSON == | ||
43 | |||
44 | Die genaue Spezifikation finden Sie anhand einer JSON Schema Datei [[hier>>https://vitaliirodin.developers.yellowfox.net/rti/schema/get_latest_history_schema.json]]. | ||
45 | |||
46 | **Beispiel Ausgabe** | ||
47 | |||
48 | {{code language="js"}} | ||
49 | { | ||
50 | "_date": "2025-02-26T10:17:58+01:00", | ||
51 | "_links": { | ||
52 | "next": { | ||
53 | "href": null | ||
54 | } | ||
55 | }, | ||
56 | "events": [ | ||
57 | { | ||
58 | "uuid": "7a2f9959-7ee1-83ec-8599-59901fcbfd93", | ||
59 | "description": "TestBeacon", | ||
60 | "gpsdate": "2025-02-26T11:11:06+01", | ||
61 | "last_status": { | ||
62 | "value": "aktiv", | ||
63 | "description": "Status" | ||
64 | }, | ||
65 | "vehicle_sign": null, | ||
66 | "driver_key": null, | ||
67 | "driver_name": null, | ||
68 | "lat": 51.036697, | ||
69 | "lon": 13.599357, | ||
70 | "satellites": 9, | ||
71 | "text_position": null, | ||
72 | "customer_text": "Würth", | ||
73 | "orderdescr": null, | ||
74 | "data_source": "position", | ||
75 | "activities": [] | ||
76 | }, | ||
77 | { | ||
78 | "uuid": "a5ddb6a3-20ad-a418-5236-bc7e6a229b55", | ||
79 | "description": "046C8", | ||
80 | "gpsdate": "2025-02-26T11:11:06+01", | ||
81 | "last_status": { | ||
82 | "value": "AAAA", | ||
83 | "description": "dsfdsfsd" | ||
84 | }, | ||
85 | "vehicle_sign": null, | ||
86 | "driver_key": null, | ||
87 | "driver_name": null, | ||
88 | "lat": 51.036682, | ||
89 | "lon": 13.5993805, | ||
90 | "satellites": 9, | ||
91 | "text_position": null, | ||
92 | "customer_text": "Würth", | ||
93 | "orderdescr": null, | ||
94 | "data_source": "position", | ||
95 | "activities": [] | ||
96 | } | ||
97 | ] | ||
98 | } | ||
99 | {{/code}} | ||
100 | |||
101 | = Beispielaufrufe = | ||
102 | |||
103 | {{code language="java"}}https://map.yellowfox.de/rti/inventory/get_latest_history.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY{{/code}} |