Changes for page API V2.0
Last modified by Treyfane Dingo on 2024/03/10 02:07
From version 11.1
edited by Treyfane Dingo
on 2024/03/10 02:07
on 2024/03/10 02:07
Change comment:
There is no comment for this version
To version 6.1
edited by Treyfane Dingo
on 2023/09/25 22:53
on 2023/09/25 22:53
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,6 +1,6 @@ 1 1 The L.A.S.S.I.E. API V 2.0 can be reached via 2 2 3 -{{{https://api.lassie.online/v2.0}}} 3 +{{{https://api.lassie.online/api/lassie/v2.0}}} 4 4 5 5 === Required POST Parameters === 6 6 ... ... @@ -10,7 +10,7 @@ 10 10 * request 11 11 * command (optional) 12 12 13 -The API-Key has to be set in "System Settings" → "API Keys". Preferrably a longer and unique key (like a MD5SUM). An specific API key can only be used for a corresponding request type.13 +The API-Key has to be set in "System Settings". Preferrably a longer and unique key (like a MD5SUM). An specific API key can only be used for a corresponding request type. 14 14 15 15 (% style="width:50%" %) 16 16 |=(% colspan="3" %)Requests and Commands ... ... @@ -20,20 +20,16 @@ 20 20 |found|Returns all active (not returned) found items from the Lost & Found Database 21 21 |returned|Returns all inactive / returned items from the Lost & Found Database 22 22 |briefings| |Returns all briefings (i.e. Security News) classified as PUBLIC 23 -|(% colspan="1" rowspan="2" %)assets|checkout|Checks out an item described by data array 24 -|checkin|Checks in an item described by data array 25 -|(% colspan="1" rowspan="2" %)attendee|lockerservice|Returns Attendee Information described by data for the LockerService 26 -|onfl|Returns Attendee Information described by data for the OverNight Fursuit Locker 27 27 28 28 The request "lostandfounddb" without a command will return the active Lost & Found Database entries for the respective Convention as a JSON. This includes Links to the uploaded images. Thus, the information can be processed on an external Website, e.g. the convention's homepage. 29 29 30 30 === Example (CURL) === 31 31 32 -{{{curl -X POST -d "apikey=ae629a834729fd3aac6d1f827b1793b0" -d "request=lostandfounddb" https://api.lassie.online/v2.0}}} 28 +{{{curl -X POST -d "apikey=ae629a834729fd3aac6d1f827b1793b0" -d "request=lostandfounddb" https://api.lassie.online/api/lassie/v2.0}}} 33 33 34 34 This example will display the entire Lost & Found Database of FTC. 35 35 36 -{{{curl -X POST -d "apikey=ae629a834729fd3aac6d1f827b1793b0" -d "request=lostandfounddb" -d "command=lost" https://api.lassie.online/v2.0}}} 32 +{{{curl -X POST -d "apikey=ae629a834729fd3aac6d1f827b1793b0" -d "request=lostandfounddb" -d "command=lost" https://api.lassie.online/api/lassie/v2.0}}} 37 37 38 38 This example will display only the lost items of the Lost & Found Database of FTC. 39 39 ... ... @@ -44,8 +44,7 @@ 44 44 {{{ae629a834729fd3aac6d1f827b1793b2 Attendee Database 45 45 ae629a834729fd3aac6d1f827b1793b1 Operatives Database 46 46 ae629a834729fd3aac6d1f827b1793b0 Lost & Found Database 47 -ae629a834729fd3aac6d1f827b1793b3 Briefings Database 48 -ae629a834729fd3aac6d1f827b1793b4 Personal Assets Database}}} 43 +ae629a834729fd3aac6d1f827b1793b3 Briefings Database}}} 49 49 50 50 === Output === 51 51 ... ... @@ -54,43 +54,7 @@ 54 54 ==== Lost & Found Database ==== 55 55 56 56 {{box}} 57 -{ 58 - "data": [ 59 - { 60 - "id": 1925, 61 - "image": null, 62 - "thumb": null, 63 - "title": "Image", 64 - "description": "invisible, watercolour, found in Schroedinger's box", 65 - "status": "F", 66 - "lost_timestamp": null, 67 - "found_timestamp": "2023-11-24 00:27:24", 68 - "return_timestamp": null 69 - }, 70 - { 71 - "id": 1921, 72 - "image": "https:~/~/api.lassie.furcom.org/images/lostandfound_db/fe3c6670a33d8f4199ffa95a5c23b622.png", 73 - "thumb": "https:~/~/api.lassie.furcom.org/images/lostandfound_db/thumbnail/fe3c6670a33d8f4199ffa95a5c23b622.png", 74 - "title": "Sense of Taste", 75 - "description": "lost in Hotel Restaurant", 76 - "status": "L", 77 - "lost_timestamp": "2023-11-01 16:13:02", 78 - "found_timestamp": null, 79 - "return_timestamp": null 80 - }, 81 - { 82 - "id": 1920, 83 - "image": "https:~/~/api.lassie.furcom.org/images/lostandfound_db/bc7c343fb3807d4d41b7e04fa909aad5.png", 84 - "thumb": "https:~/~/api.lassie.furcom.org/images/lostandfound_db/thumbnail/bc7c343fb3807d4d41b7e04fa909aad5.png", 85 - "title": "Vape", 86 - "description": "black / rainbow, \"GEEKVAPE\", found at Open Stage", 87 - "status": "F", 88 - "lost_timestamp": null, 89 - "found_timestamp": "2023-09-30 23:52:38", 90 - "return_timestamp": null 91 - } 92 - ] 93 -} 52 +{"data":[{"id":"1","image":"https:\/\/api.lassie.online\/lassie\/images\/lostandfound_db\/9a7a1039bcbe887ed2f57a5b64c56c51.png","title":"A Piece of Cake","description":"Just another piece of cake","status":"F","lost_timestamp":"","found_timestamp":"2021-06-22 19:08:16","return_timestamp":""}]} 94 94 {{/box}} 95 95 96 96 (% style="width:50%" %) ... ... @@ -109,20 +109,7 @@ 109 109 ==== Briefings Database ==== 110 110 111 111 {{box}} 112 -{ 113 - "data": [ 114 - { 115 - "id": "17", 116 - "class": "P", 117 - "topic": "UPDATE - Security News 21.12.2021", 118 - "content": "<div id=\"briefing_content_content\"><div><b>Germany cancelled New Years Eve</b></div><div>Although it might calendar wise be unwise, Germany just cancelled New Years Eve. Further information can be obtained elsewhere.</div><div><br></div><div><b>Some things found</b></div><div>Security\r\n wants to remind all attendees that information about lost or found \r\nitems can be obtained via the APP or the Website of the convention. Lost\r\n & Found is maintained by security and located in the security \r\noffice.</div><div><br></div><div><b>Quote of the day</b></div><div>\"Where is your neighbour?\"</div><div>\"He's in the garden ...\"</div><div>\"I can't see him ...\"</div><div>\"Oh, you'd have to dig quite a bit ...\"<br></div><div><br></div></div>", 119 - "ops_id": "112", 120 - "datetime_creation": "2021-12-21 22:19:45", 121 - "datetime_lastchange": "", 122 - "datetime": "2021-12-21 22:19:45" 123 - } 124 - ] 125 -} 71 +{"data":[{"id":"17","class":"P","topic":"UPDATE - Security News 21.12.2021","content":"<div id=\"briefing_content_content\"><div><b>Germany cancelled New Years Eve<\/b><\/div><div>Although it might calendar wise be unwise, Germany just cancelled New Years Eve. Further information can be obtained elsewhere.<\/div><div><br><\/div><div><b>Some things found<\/b><\/div><div>Security\r\n wants to remind all attendees that information about lost or found \r\nitems can be obtained via the APP or the Website of the convention. Lost\r\n & Found is maintained by security and located in the security \r\noffice.<\/div><div><br><\/div><div><b>Quote of the day<\/b><\/div><div>\"Where is your neighbor?\"<\/div><div>\"He's in the garden ...\"<\/div><div>\"I can't see him ...\"<\/div><div>\"Oh, you'd have to dig quite a bit ...\"<br><\/div><div><br><\/div><\/div>","ops_id":"112","datetime_creation":"2021-12-21 22:19:45","datetime_lastchange":"","datetime":"2021-12-21 22:19:45"}]} 126 126 {{/box}} 127 127 128 128 (% style="width:50%" %) ... ... @@ -137,81 +137,10 @@ 137 137 |datetime_lastchange|ISO date|null 138 138 |datetime|ISO date which should be displayed. Is creation or lastchange whatever is bigger.|- 139 139 140 -==== (% id="cke_bm_27662S" style="display:none" %) (%%)Personal Assets Database ==== 141 - 142 -When giving a command to the Personal Assets Database, a data array has to be POSTed along with the request and command. 143 - 144 -(% style="width:955px" %) 145 -|(% colspan="3" style="width:182px" %)**Data Array** 146 -|(% style="width:182px" %)**Key**|(% colspan="2" rowspan="1" style="width:652px" %)**Field Content** 147 -|(% style="width:182px" %)ops_id|(% colspan="2" rowspan="1" style="width:652px" %)Numeric Value, Collar ID of the Operative 148 -|(% style="width:182px" %)attendee|(% colspan="2" rowspan="1" style="width:652px" %)Numeric Value, Attendee Badge ID 149 -|(% style="width:182px" %)type|(% colspan="2" rowspan="1" style="width:652px" %)Numeric Value, the id of the Personal Asset type 150 -|(% style="width:182px" %)serial|(% colspan="2" rowspan="1" style="width:652px" %)Text, the Serial Number of the Personal Asset 151 - 152 -{{box}} 153 -{ 154 - "data":{ 155 - "command":"checkin", 156 - "id":1715, 157 - "attendee":12, 158 - "type":"Donation Bag", 159 - "serial":"123456789", 160 - "out":"10.03.2024 02:51", 161 - "out_by":112, 162 - "in":"10.03.2024 02:51", 163 - "in_by":112 164 - } 165 -} 166 -{{/box}} 167 - 168 -(% style="width:50%" %) 169 -|=(% colspan="3" %)Personal Assets fieldset 170 -|=(% scope="col" %)Key|=Field|=NULL 171 -|command|Text, the originally issued command|- 172 -|id|Numeric Value, PRIMARY KEY|- 173 -|attendee|Numeric Value|- 174 -|type|Text|- 175 -|serial|Text|- 176 -|out|DE date|- 177 -|out_by|Numeric Value|- 178 -|in|DE date|NULL 179 -|in_by|Numeric Value|NULL 180 - 181 -==== (% id="cke_bm_301917S" style="display:none" %) (%%)Attendee Database ==== 182 - 183 -When giving a command to the Personal Assets Database, a data payload has to be POSTed along with the request and command. 184 - 185 -(% style="width:955px" %) 186 -|(% style="width:182px" %)**Key**|(% colspan="2" rowspan="1" style="width:652px" %)**Field Content** 187 -|(% style="width:182px" %)data|(% colspan="2" rowspan="1" style="width:652px" %)Numeric Value, Attendee Badge ID 188 - 189 -{{box}} 190 -{ 191 - "data": { 192 - "id": 1, 193 - "nick": "GLaDOS", 194 - "firstname": "Genetic Lifeform", 195 - "lastname": "and Disk Operating System", 196 - "checkletter": "A" 197 - } 198 -} 199 -{{/box}} 200 - 201 -(% style="width:50%" %) 202 -|=(% colspan="3" %)Attendee fieldset 203 -|=(% scope="col" %)Key|=Field|=NULL 204 -|id|Numeric Value, PRIMARY KEY|- 205 -|firstname|Text|- 206 -|lastname|Text|- 207 -|checkletter|Text|NULL 208 - 209 209 ==== Empty Object ==== 210 210 211 211 {{box}} 212 -{ 213 - "data": [] 214 -} 89 +{"data":[]} 215 215 {{/box}} 216 216 217 217 === Error Codes === ... ... @@ -219,12 +219,7 @@ 219 219 The API will send a JSON-Object upon errors 220 220 221 221 {{box}} 222 -{ 223 - "error": { 224 - "code": "503", 225 - "message": "Maintenance Mode enabled - please try again later" 226 - } 227 -} 97 +{"error":{"code":"503","message":"Maintenance Mode enabled - please try again later"}} 228 228 {{/box}} 229 229 230 230 The following error codes are implemented: ... ... @@ -233,7 +233,6 @@ 233 233 |=(% colspan="3" %)Error Codes 234 234 |=(% scope="col" %)Code|=Message|=Description 235 235 |401|Unauthorized|API-Key is not correct or no API-Key provided. 236 -|422|Unprocessable Data|The data payload can not be processed due to an error 237 237 |500|Internal server error|Most likely the mySQL-Connection failed. A certain Dingo might be rather busy at this time. 238 238 |501|Bad or no request|Whatever you send, it wasn't a valid request. 239 239 |503|Maintenance Mode enabled - please try again later|Might follow an error 500 and the Dingo is still busy ...