Merge commit '1392bd3a96045302b60d845a90901a4b2234c475' as 'seatmap-webapi'

This commit is contained in:
zino
2021-01-20 12:59:59 +01:00
261 changed files with 39680 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
===
GET /records/posts
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 134
{"records":[{"id":1,"user_id":1,"category_id":1,"content":"blog started"},{"id":2,"user_id":1,"category_id":2,"content":"It works!"}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?include=id,content
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 78
{"records":[{"id":1,"content":"blog started"},{"id":2,"content":"It works!"}]}

View File

@@ -0,0 +1,16 @@
===
GET /records/posts/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 58
{"id":2,"user_id":1,"category_id":2,"content":"It works!"}
===
GET /records/posts/0
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 46
{"code":1003,"message":"Record '0' not found"}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts/1,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 122
[{"id":1,"user_id":1,"category_id":1,"content":"blog started"},{"id":2,"user_id":1,"category_id":2,"content":"It works!"}]

View File

@@ -0,0 +1,8 @@
===
GET /records/posts/2?include=id,content
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 30
{"id":2,"content":"It works!"}

View File

@@ -0,0 +1,11 @@
===
POST /records/posts
Content-Type: application/json; charset=utf-8
{"user_id":1,"category_id":1,"content":"test"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
3

View File

@@ -0,0 +1,18 @@
===
PUT /records/posts/3
{"user_id":1,"category_id":1,"content":"test (edited)"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/posts/3
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 62
{"id":3,"user_id":1,"category_id":1,"content":"test (edited)"}

View File

@@ -0,0 +1,18 @@
===
PUT /records/posts/3?include=id,content
{"content":"test (edited 2)"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/posts/3
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 64
{"id":3,"user_id":1,"category_id":1,"content":"test (edited 2)"}

View File

@@ -0,0 +1,18 @@
===
PUT /records/posts/3?include=id,content
{"user_id":2,"content":"test (edited 3)"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/posts/3
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 64
{"id":3,"user_id":1,"category_id":1,"content":"test (edited 3)"}

View File

@@ -0,0 +1,18 @@
===
PUT /records/posts/2
{"content":"🤗 Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/posts/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 192
{"id":2,"user_id":1,"category_id":2,"content":"🤗 Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте"}

View File

@@ -0,0 +1,19 @@
===
PUT /records/posts/2
Content-Type: application/x-www-form-urlencoded
content=%F0%9F%A6%80%E2%82%AC%20Gr%C3%BC%C3%9Fgott%2C%20%D0%92i%D1%82%D0%B0%D1%8E%2C%20dobr%C3%BD%20de%C5%88%2C%20hyv%C3%A4%C3%A4%20p%C3%A4iv%C3%A4%C3%A4%2C%20%E1%83%92%E1%83%90%E1%83%9B%E1%83%90%E1%83%A0%E1%83%AF%E1%83%9D%E1%83%91%E1%83%90%2C%20%CE%93%CE%B5%CE%B9%CE%B1%20%CF%83%CE%B1%CF%82%2C%20g%C3%B3%C3%B0an%20dag%2C%20%D0%B7%D0%B4%D1%80%D0%B0%D0%B2%D1%81%D1%82%D0%B2%D1%83%D0%B9%D1%82%D0%B5
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/posts/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 195
{"id":2,"user_id":1,"category_id":2,"content":"🦀€ Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте"}

View File

@@ -0,0 +1,16 @@
===
DELETE /records/posts/3
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/posts/3
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 46
{"code":1003,"message":"Record '3' not found"}

View File

@@ -0,0 +1,10 @@
===
POST /records/posts
user_id=1&category_id=1&content=test
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
4

View File

@@ -0,0 +1,18 @@
===
PUT /records/posts/4
user_id=1&category_id=1&content=test+(edited)
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/posts/4
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 62
{"id":4,"user_id":1,"category_id":1,"content":"test (edited)"}

View File

@@ -0,0 +1,16 @@
===
DELETE /records/posts/4?include=id,content
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/posts/4
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 46
{"code":1003,"message":"Record '4' not found"}

View File

@@ -0,0 +1,108 @@
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#1"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
5
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#2"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
6
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#3"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
7
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#4"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
8
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#5"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
9
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#6"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 2
10
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#7"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 2
11
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#8"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 2
12
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#9"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 2
13
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#10"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 2
14
===
GET /records/posts?page=2,2&order=id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 130
{"records":[{"id":5,"user_id":1,"category_id":1,"content":"#1"},{"id":6,"user_id":1,"category_id":1,"content":"#2"}],"results":12}

View File

@@ -0,0 +1,11 @@
===
PUT /records/posts/2
Content-Type: application/json; charset=utf-8
{"id":1}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
0

View File

@@ -0,0 +1,11 @@
===
POST /records/posts
Content-Type: application/json; charset=utf-8
{"category_id":1,"content":"test"}
===
409
Content-Type: application/json; charset=utf-8
Content-Length: 50
{"code":1010,"message":"Data integrity violation"}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?page=1,2&order=category_id,asc&order=id,desc
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 133
{"records":[{"id":14,"user_id":1,"category_id":1,"content":"#10"},{"id":13,"user_id":1,"category_id":1,"content":"#9"}],"results":12}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?page=2,2&order=id,desc
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 132
{"records":[{"id":12,"user_id":1,"category_id":1,"content":"#8"},{"id":11,"user_id":1,"category_id":1,"content":"#7"}],"results":12}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?order=id&size=1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 75
{"records":[{"id":1,"user_id":1,"category_id":1,"content":"blog started"}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?order=id&page=1,0
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"records":[],"results":12}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?order=id&size=0
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 14
{"records":[]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?page=3,5&order=id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 133
{"records":[{"id":13,"user_id":1,"category_id":1,"content":"#9"},{"id":14,"user_id":1,"category_id":1,"content":"#10"}],"results":12}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 75
{"records":[{"id":1,"user_id":1,"category_id":1,"content":"blog started"}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?exclude=id&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 68
{"records":[{"user_id":1,"category_id":1,"content":"blog started"}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?join=users&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 136
{"records":[{"id":1,"user_id":{"id":1,"username":"user1","password":"pass1","location":null},"category_id":1,"content":"blog started"}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts/1?join=users
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 122
{"id":1,"user_id":{"id":1,"username":"user1","password":"pass1","location":null},"category_id":1,"content":"blog started"}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?join=comments&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 202
{"records":[{"id":1,"user_id":1,"category_id":1,"content":"blog started","comments":[{"id":1,"post_id":1,"message":"great","category_id":3},{"id":2,"post_id":1,"message":"fantastic","category_id":3}]}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?join=tags&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 177
{"records":[{"id":1,"user_id":1,"category_id":1,"content":"blog started","tags":[{"id":1,"name":"funny","is_important":false},{"id":2,"name":"important","is_important":true}]}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?join=categories&join=post_tags,tags&join=comments&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 410
{"records":[{"id":1,"user_id":1,"category_id":{"id":1,"name":"announcement","icon":null},"content":"blog started","post_tags":[{"id":1,"post_id":1,"tag_id":{"id":1,"name":"funny","is_important":false}},{"id":2,"post_id":1,"tag_id":{"id":2,"name":"important","is_important":true}}],"comments":[{"id":1,"post_id":1,"message":"great","category_id":3},{"id":2,"post_id":1,"message":"fantastic","category_id":3}]}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?join=categories&join=tags&join=comments&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 345
{"records":[{"id":1,"user_id":1,"category_id":{"id":1,"name":"announcement","icon":null},"content":"blog started","tags":[{"id":1,"name":"funny","is_important":false},{"id":2,"name":"important","is_important":true}],"comments":[{"id":1,"post_id":1,"message":"great","category_id":3},{"id":2,"post_id":1,"message":"fantastic","category_id":3}]}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?include=tags.name&join=categories&join=post_tags,tags&join=comments&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 198
{"records":[{"id":1,"category_id":{"id":1},"post_tags":[{"post_id":1,"tag_id":{"id":1,"name":"funny"}},{"post_id":1,"tag_id":{"id":2,"name":"important"}}],"comments":[{"post_id":1},{"post_id":1}]}]}

View File

@@ -0,0 +1,9 @@
===
GET /records/posts?join=categories&join=post_tags,tags&join=comments&exclude=comments.message,comments.category_id&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 338
{"records":[{"id":1,"user_id":1,"category_id":{"id":1,"name":"announcement","icon":null},"content":"blog started","post_tags":[{"id":1,"post_id":1,"tag_id":{"id":1,"name":"funny","is_important":false}},{"id":2,"post_id":1,"tag_id":{"id":2,"name":"important","is_important":true}}],"comments":[{"id":1,"post_id":1},{"id":2,"post_id":1}]}]}

View File

@@ -0,0 +1,18 @@
===
PUT /records/categories/2
{"icon":"4oKsIABhYmMACg1cYgA"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/categories/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 55
{"id":2,"name":"article","icon":"4oKsIABhYmMACg1cYgA="}

View File

@@ -0,0 +1,36 @@
===
PUT /records/categories/2
{"icon":""}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/categories/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 35
{"id":2,"name":"article","icon":""}
===
PUT /records/categories/2
{"icon":null}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/categories/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 37
{"id":2,"name":"article","icon":null}

View File

@@ -0,0 +1,19 @@
===
PUT /records/categories/2
Content-Type: application/x-www-form-urlencoded
icon=4oKsIABhYmMACg1cYgA
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/categories/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 55
{"id":2,"name":"article","icon":"4oKsIABhYmMACg1cYgA="}

View File

@@ -0,0 +1,8 @@
===
GET /records/categories?filter=id,le,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 112
{"records":[{"id":1,"name":"announcement","icon":null},{"id":2,"name":"article","icon":"4oKsIABhYmMACg1cYgA="}]}

View File

@@ -0,0 +1,19 @@
===
PUT /records/categories/2
Content-Type: application/x-www-form-urlencoded
icon__is_null
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/categories/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 37
{"id":2,"name":"article","icon":null}

View File

@@ -0,0 +1,10 @@
===
POST /records/posts
["truncat
===
422
Content-Type: application/json; charset=utf-8
Content-Length: 50
{"code":1008,"message":"Cannot read HTTP message"}

View File

@@ -0,0 +1,12 @@
===
OPTIONS /records/posts/1?include=id
Origin: http://example.com
Access-Control-Request-Method: POST
Access-Control-Request-Headers: X-XSRF-TOKEN, X-Requested-With
===
200
Access-Control-Allow-Headers: Content-Type, X-XSRF-TOKEN, X-Authorization
Access-Control-Allow-Methods: OPTIONS, GET, PUT, POST, DELETE, PATCH
Access-Control-Max-Age: 1728000
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://example.com

View File

@@ -0,0 +1,11 @@
===
GET /records/posts/1?include=id
Origin: http://example.com
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 8
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://example.com
{"id":1}

View File

@@ -0,0 +1,11 @@
===
POST /records/posts
Content-Type: application/json; charset=utf-8
{"}
===
422
Content-Type: application/json; charset=utf-8
Content-Length: 50
{"code":1008,"message":"Cannot read HTTP message"}

View File

@@ -0,0 +1,11 @@
===
POST /records/kunsthåndværk
Content-Type: application/json; charset=utf-8
{"id":"23587850-8738-437e-8c41-466627ca6094","Umlauts ä_ö_ü-COUNT":1}
===
409
Content-Type: application/json; charset=utf-8
Content-Length: 49
{"code":1009,"message":"Duplicate key exception"}

View File

@@ -0,0 +1,10 @@
===
POST /records/posts
{"user_id":3,"category_id":1,"content":"fk constraint"}
===
409
Content-Type: application/json; charset=utf-8
Content-Length: 50
{"code":1010,"message":"Data integrity violation"}

View File

@@ -0,0 +1,8 @@
===
GET /records/postzzz
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 51
{"code":1001,"message":"Table 'postzzz' not found"}

View File

@@ -0,0 +1,8 @@
===
GET /postzzz
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 53
{"code":1000,"message":"Route '\/postzzz' not found"}

View File

@@ -0,0 +1,10 @@
===
PUT /records/posts/1,2
{"id":1,"user_id":1,"category_id":1,"content":"blog started"}
===
422
Content-Type: application/json; charset=utf-8
Content-Length: 58
{"code":1002,"message":"Argument count mismatch in '1,2'"}

View File

@@ -0,0 +1,10 @@
===
PUT /records/posts/1,2
[{"id":1,"user_id":1,"category_id":1,"content":"blog started"}]
===
422
Content-Type: application/json; charset=utf-8
Content-Length: 58
{"code":1002,"message":"Argument count mismatch in '1,2'"}

View File

@@ -0,0 +1,10 @@
===
PUT /records/posts/1
[{"id":1,"user_id":1,"category_id":1,"content":"blog started"}]
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 3
[1]

View File

@@ -0,0 +1,10 @@
===
PUT /records/posts/1
[{"id":1},{"id":2}]
===
422
Content-Type: application/json; charset=utf-8
Content-Length: 56
{"code":1002,"message":"Argument count mismatch in '1'"}

View File

@@ -0,0 +1,18 @@
===
PUT /records/users/1
{"location":"POINT(30 20)"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/users/1?include=id,location
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 34
{"id":1,"location":"POINT(30 20)"}

View File

@@ -0,0 +1,8 @@
===
GET /records/users?include=id,location
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 73
{"records":[{"id":1,"location":"POINT(30 20)"},{"id":2,"location":null}]}

View File

@@ -0,0 +1,18 @@
===
PUT /records/users/1
{"id":2,"password":"testtest2"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/users/1?include=id,username,password
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 50
{"id":1,"username":"user1","password":"testtest2"}

View File

@@ -0,0 +1,16 @@
===
GET /records/categories?filter=icon,is,null&filter=id,le,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 94
{"records":[{"id":1,"name":"announcement","icon":null},{"id":2,"name":"article","icon":null}]}
===
GET /records/categories?filter=icon,is&filter=id,le,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 94
{"records":[{"id":1,"name":"announcement","icon":null},{"id":2,"name":"article","icon":null}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/categories?filter=icon,nis,null
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 14
{"records":[]}

View File

@@ -0,0 +1,24 @@
===
GET /records/posts?include=id&filter=id,ge,1&filter=id,le,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 31
{"records":[{"id":1},{"id":2}]}
===
GET /records/posts?include=id&filter[]=id,ge,1&filter[]=id,le,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 31
{"records":[{"id":1},{"id":2}]}
===
GET /records/posts?include=id&filter[0]=id,ge,1&filter[1]=id,le,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 31
{"records":[{"id":1},{"id":2}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?include=id&filter1=id,eq,1&filter2=id,eq,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 31
{"records":[{"id":1},{"id":2}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?include=id&filter1=id,eq,1&filter2=id,gt,1&filter2=id,lt,3
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 31
{"records":[{"id":1},{"id":2}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts?include=id&filter1=id,eq,1&filter2=id,eq,2&filter=user_id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 31
{"records":[{"id":1},{"id":2}]}

View File

@@ -0,0 +1,8 @@
===
GET /records/posts/1?include=content,tags.name&join=tags
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 94
{"id":1,"content":"blog started","tags":[{"id":1,"name":"funny"},{"id":2,"name":"important"}]}

View File

@@ -0,0 +1,16 @@
===
GET /records/kunsthåndværk/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 138
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d","Umlauts ä_ö_ü-COUNT":1,"user_id":1,"invisible_id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
===
GET /records/kunsthåndværk/e42c77c6-06a4-4502-816c-d112c7142e6d?join=invisibles
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 138
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d","Umlauts ä_ö_ü-COUNT":1,"user_id":1,"invisible_id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}

View File

@@ -0,0 +1,8 @@
===
GET /records/kunsthåndværk
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 152
{"records":[{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d","Umlauts ä_ö_ü-COUNT":1,"user_id":1,"invisible_id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}]}

View File

@@ -0,0 +1,10 @@
===
POST /records/kunsthåndværk
{"id":"34451583-a747-4417-bdf0-bec7a5eacffa","Umlauts ä_ö_ü-COUNT":3}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 38
"34451583-a747-4417-bdf0-bec7a5eacffa"

View File

@@ -0,0 +1,10 @@
===
PUT /records/kunsthåndværk/34451583-a747-4417-bdf0-bec7a5eacffa
{"Umlauts ä_ö_ü-COUNT":3}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1

View File

@@ -0,0 +1,8 @@
===
DELETE /records/kunsthåndværk/34451583-a747-4417-bdf0-bec7a5eacffa
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1

View File

@@ -0,0 +1,10 @@
===
PUT /records/comments/4
{"post_id":"two"}
===
422
Content-Type: application/json; charset=utf-8
Content-Length: 104
{"code":1013,"message":"Input validation failed for 'comments'","details":{"post_id":"must be numeric"}}

View File

@@ -0,0 +1,18 @@
===
POST /records/comments
{"user_id":1,"post_id":2,"message":"<h1>Title</h1> <p>Body</p>","category_id":3}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
5
===
GET /records/comments/5
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 59
{"id":5,"post_id":2,"message":"Title Body","category_id":3}

View File

@@ -0,0 +1,64 @@
===
GET /records/events/1?include=visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 14
{"visitors":0}
===
PATCH /records/events/1
{"visitors":1}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
PATCH /records/events/1
{"visitors":1}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
PATCH /records/events/1,1
[{"visitors":1},{"visitors":1}]
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 5
[1,1]
===
GET /records/events/1?include=visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 14
{"visitors":4}
===
PATCH /records/events/1
{"visitors":-4}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/events/1?include=visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 14
{"visitors":0}

View File

@@ -0,0 +1,8 @@
===
GET /records/invisibles
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 54
{"code":1001,"message":"Table 'invisibles' not found"}

View File

@@ -0,0 +1,18 @@
===
POST /records/comments
{"user_id":1,"post_id":2,"message":"invisible","category_id":3}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
6
===
GET /records/comments/6
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 46
{"code":1003,"message":"Record '6' not found"}

View File

@@ -0,0 +1,8 @@
===
GET /records/nopk
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 59
{"records":[{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}]}

View File

@@ -0,0 +1,52 @@
===
POST /records/kunsthåndværk
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":2}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 38
"b55decba-8eb5-436b-af3e-148f7b4eacda"
===
GET /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 104
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1,"invisible_id":null}
===
PUT /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":2}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 104
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1,"invisible_id":null}
===
DELETE /records/kunsthåndværk/e31ecfe6-591f-4660-9fbd-1a232083037f
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
0
===
DELETE /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1

View File

@@ -0,0 +1,22 @@
===
PATCH /records/kunsthåndværk/e42c77c6-06a4-4502-816c-d112c7142e6d
{"Umlauts ä_ö_ü-COUNT":10}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
X-Time-Taken: 0.003
1
===
PATCH /records/kunsthåndværk/e42c77c6-06a4-4502-816c-d112c7142e6d
{"Umlauts ä_ö_ü-COUNT":-10}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
X-Time-Taken: 0.003
1

View File

@@ -0,0 +1,24 @@
===
GET /records/tag_usage
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 85
{"records":[{"id":1,"name":"funny","count":2},{"id":2,"name":"important","count":2}]}
===
GET /records/tag_usage/1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 33
{"id":1,"name":"funny","count":2}
===
DELETE /records/tag_usage/1
===
405
Content-Type: application/json; charset=utf-8
Content-Length: 58
{"code":1015,"message":"Operation 'delete' not supported"}

View File

@@ -0,0 +1,9 @@
skip-for-sqlite: no support for geometry functions (spatialite)
===
GET /records/users?include=id,location&filter=location,swi,POLYGON((10 10,10 50,50 50,50 10,10 10))
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 48
{"records":[{"id":1,"location":"POINT(30 20)"}]}

View File

@@ -0,0 +1,32 @@
===
GET /records/posts?size=10
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 690
{"records":[{"id":1,"user_id":1,"category_id":1,"content":"blog started"},{"id":2,"user_id":1,"category_id":2,"content":"🦀€ Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте"},{"id":5,"user_id":1,"category_id":1,"content":"#1"},{"id":6,"user_id":1,"category_id":1,"content":"#2"},{"id":7,"user_id":1,"category_id":1,"content":"#3"},{"id":8,"user_id":1,"category_id":1,"content":"#4"},{"id":9,"user_id":1,"category_id":1,"content":"#5"},{"id":10,"user_id":1,"category_id":1,"content":"#6"},{"id":11,"user_id":1,"category_id":1,"content":"#7"},{"id":12,"user_id":1,"category_id":1,"content":"#8"}]}
===
GET /records/posts
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 690
{"records":[{"id":1,"user_id":1,"category_id":1,"content":"blog started"},{"id":2,"user_id":1,"category_id":2,"content":"🦀€ Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте"},{"id":5,"user_id":1,"category_id":1,"content":"#1"},{"id":6,"user_id":1,"category_id":1,"content":"#2"},{"id":7,"user_id":1,"category_id":1,"content":"#3"},{"id":8,"user_id":1,"category_id":1,"content":"#4"},{"id":9,"user_id":1,"category_id":1,"content":"#5"},{"id":10,"user_id":1,"category_id":1,"content":"#6"},{"id":11,"user_id":1,"category_id":1,"content":"#7"},{"id":12,"user_id":1,"category_id":1,"content":"#8"}]}
===
GET /records/posts?page=5,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 78
{"records":[{"id":7,"user_id":1,"category_id":1,"content":"#3"}],"results":12}
===
GET /records/posts?page=6,1
===
403
Content-Type: application/json; charset=utf-8
Content-Length: 46
{"code":1019,"message":"Pagination forbidden"}

View File

@@ -0,0 +1,44 @@
===
GET /records/events/1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 70
{"id":1,"name":"Launch","datetime":"2016-01-01 13:01:01","visitors":0}
===
PUT /records/events/1
{"datetime":null,"visitors":null}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/events/1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 56
{"id":1,"name":"Launch","datetime":null,"visitors":null}
===
PUT /records/events/1
{"datetime":"2016-01-01 13:01:01","visitors":0}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/events/1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 70
{"id":1,"name":"Launch","datetime":"2016-01-01 13:01:01","visitors":0}

View File

@@ -0,0 +1,32 @@
===
GET /records/posts/1?join=tags&include=tags.name
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 69
{"id":1,"tags":[{"id":1,"name":"funny"},{"id":2,"name":"important"}]}
===
GET /records/posts/1?join=categories&include=category_id,categories.name
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 53
{"id":1,"category_id":{"id":1,"name":"announcement"}}
===
GET /records/posts/1?join=comments,categories&include=category_id,categories.name
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 145
{"id":1,"category_id":1,"comments":[{"post_id":1,"category_id":{"id":3,"name":"comment"}},{"post_id":1,"category_id":{"id":3,"name":"comment"}}]}
===
GET /records/posts/1?join=categories&join=comments,categories&include=category_id,categories.name
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 174
{"id":1,"category_id":{"id":1,"name":"announcement"},"comments":[{"post_id":1,"category_id":{"id":3,"name":"comment"}},{"post_id":1,"category_id":{"id":3,"name":"comment"}}]}

View File

@@ -0,0 +1,44 @@
===
POST /records/barcodes
{"product_id":1,"hex":"","bin":""}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
2
===
GET /records/barcodes/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 64
{"id":2,"product_id":1,"hex":"","bin":"","ip_address":"TEST_IP"}
===
PUT /records/barcodes/2
{"ip_address":"FAKE_IP"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
0
===
GET /records/barcodes/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 64
{"id":2,"product_id":1,"hex":"","bin":"","ip_address":"TEST_IP"}
===
DELETE /records/barcodes/2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1

View File

@@ -0,0 +1,73 @@
skip-for-sqlite: no support for geometry functions (spatialite)
===
GET /geojson/countries/3
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 105
{"type":"Feature","id":3,"properties":{"name":"Point"},"geometry":{"type":"Point","coordinates":[30,10]}}
===
GET /geojson/countries/4
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 127
{"type":"Feature","id":4,"properties":{"name":"Line"},"geometry":{"type":"LineString","coordinates":[[30,10],[10,30],[40,40]]}}
===
GET /geojson/countries/5
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 143
{"type":"Feature","id":5,"properties":{"name":"Poly1"},"geometry":{"type":"Polygon","coordinates":[[[30,10],[40,40],[20,40],[10,20],[30,10]]]}}
===
GET /geojson/countries/6
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 177
{"type":"Feature","id":6,"properties":{"name":"Poly2"},"geometry":{"type":"Polygon","coordinates":[[[35,10],[45,45],[15,40],[10,20],[35,10]],[[20,30],[35,35],[30,20],[20,30]]]}}
===
GET /geojson/countries/7
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 137
{"type":"Feature","id":7,"properties":{"name":"Mpoint"},"geometry":{"type":"MultiPoint","coordinates":[[10,40],[40,30],[20,20],[30,10]]}}
===
GET /geojson/countries/8
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 169
{"type":"Feature","id":8,"properties":{"name":"Mline"},"geometry":{"type":"MultiLineString","coordinates":[[[10,10],[20,20],[10,40]],[[40,40],[30,30],[40,20],[30,10]]]}}
===
GET /geojson/countries/9
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 184
{"type":"Feature","id":9,"properties":{"name":"Mpoly1"},"geometry":{"type":"MultiPolygon","coordinates":[[[[30,20],[45,40],[10,40],[30,20]]],[[[15,5],[40,10],[10,20],[5,10],[15,5]]]]}}
===
GET /geojson/countries/10
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 229
{"type":"Feature","id":10,"properties":{"name":"Mpoly2"},"geometry":{"type":"MultiPolygon","coordinates":[[[[40,40],[20,45],[45,30],[40,40]]],[[[20,35],[10,30],[10,10],[30,5],[45,20],[20,35]],[[30,20],[20,15],[20,25],[30,20]]]]}}
===
GET /geojson/countries/11
===
500
Content-Type: application/json; charset=utf-8
Content-Length: 73
{"code":9999,"message":"Geometry type not supported: GEOMETRYCOLLECTION"}

View File

@@ -0,0 +1,17 @@
skip-for-sqlite: no support for geometry functions (spatialite)
===
GET /geojson/users/1?exclude=password
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 109
{"type":"Feature","id":1,"properties":{"username":"user1"},"geometry":{"type":"Point","coordinates":[30,20]}}
===
GET /geojson/users/2?exclude=password
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 75
{"type":"Feature","id":2,"properties":{"username":"user2"},"geometry":null}

View File

@@ -0,0 +1,41 @@
skip-for-sqlite: no support for geometry functions (spatialite)
===
GET /geojson/users?exclude=password
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 227
{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"properties":{"username":"user1"},"geometry":{"type":"Point","coordinates":[30,20]}},{"type":"Feature","id":2,"properties":{"username":"user2"},"geometry":null}]}
===
GET /geojson/users?exclude=password&geometry=location
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 227
{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"properties":{"username":"user1"},"geometry":{"type":"Point","coordinates":[30,20]}},{"type":"Feature","id":2,"properties":{"username":"user2"},"geometry":null}]}
===
GET /geojson/users?exclude=password&geometry=notlocation
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 235
{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"properties":{"username":"user1","location":"POINT(30 20)"},"geometry":null},{"type":"Feature","id":2,"properties":{"username":"user2","location":null},"geometry":null}]}
===
GET /geojson/users?exclude=password&page=1,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 163
{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"properties":{"username":"user1"},"geometry":{"type":"Point","coordinates":[30,20]}}],"results":2}
===
GET /geojson/users?exclude=password&bbox=29.99,19.99,30.01,20.01
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 151
{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"properties":{"username":"user1"},"geometry":{"type":"Point","coordinates":[30,20]}}]}

View File

@@ -0,0 +1,44 @@
===
GET /records/tags/1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 44
{"id":1,"name":"funny","is_important":false}
===
PUT /records/tags/1
{"id":1,"name":"funny","is_important":true}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/tags/1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 43
{"id":1,"name":"funny","is_important":true}
===
PUT /records/tags/1
{"id":1,"name":"funny","is_important":false}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/tags/1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 44
{"id":1,"name":"funny","is_important":false}

View File

@@ -0,0 +1,44 @@
===
POST /records/kunsthåndværk
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":2}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 38
"b55decba-8eb5-436b-af3e-148f7b4eacda"
===
GET /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 104
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1,"invisible_id":null}
===
PUT /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":3,"invisible":"test"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1
===
GET /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 104
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":3,"user_id":1,"invisible_id":null}
===
DELETE /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,116 @@
===
GET /records/posts/1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 61
{"id":1,"user_id":1,"category_id":1,"content":"blog started"}
===
GET /records/posts/1?format=xml
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 102
<root><id>1</id><user_id>1</user_id><category_id>1</category_id><content>blog started</content></root>
===
GET /records/posts?size=1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 75
{"records":[{"id":1,"user_id":1,"category_id":1,"content":"blog started"}]}
===
GET /records/posts?size=1&format=xml
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 147
<root><records type="array"><item><id>1</id><user_id>1</user_id><category_id>1</category_id><content>blog started</content></item></records></root>
===
GET /records/posts/1?join=users&format=xml
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 200
<root><id>1</id><user_id><id>1</id><username>user1</username><password>testtest2</password><location>POINT(30 20)</location></user_id><category_id>1</category_id><content>blog started</content></root>
===
GET /records/posts/1?join=users&join=comments,categories
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 335
{"id":1,"user_id":{"id":1,"username":"user1","password":"testtest2","location":"POINT(30 20)"},"category_id":1,"content":"blog started","comments":[{"id":1,"post_id":1,"message":"great","category_id":{"id":3,"name":"comment","icon":null}},{"id":2,"post_id":1,"message":"fantastic","category_id":{"id":3,"name":"comment","icon":null}}]}
===
GET /records/posts/1?join=users&join=comments,categories&format=xml
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 536
<root><id>1</id><user_id><id>1</id><username>user1</username><password>testtest2</password><location>POINT(30 20)</location></user_id><category_id>1</category_id><content>blog started</content><comments type="array"><item><id>1</id><post_id>1</post_id><message>great</message><category_id><id>3</id><name>comment</name><icon type="null"></icon></category_id></item><item><id>2</id><post_id>1</post_id><message>fantastic</message><category_id><id>3</id><name>comment</name><icon type="null"></icon></category_id></item></comments></root>
===
GET /records/posts?page=2,1
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 222
{"records":[{"id":2,"user_id":1,"category_id":2,"content":"🦀€ Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте"}],"results":12}
===
GET /records/posts?page=2,1&format=xml
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 302
<root><records type="array"><item><id>2</id><user_id>1</user_id><category_id>2</category_id><content>🦀€ Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте</content></item></records><results>12</results></root>
===
POST /records/posts?format=xml
Content-Type: application/xml
<object><id>1</id><user_id>1</user_id><category_id>1</category_id><content>blog started</content></object>
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 72
<root><code>1009</code><message>Duplicate key exception</message></root>
===
PUT /records/posts/1?format=xml
Content-Type: application/xml
<object><user_id>1</user_id><category_id>1</category_id><content>blog started</content></object>
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 14
<root>1</root>
===
PUT /records/posts/1?format=xml
Content-Type: application/xml
<root><user_id>a</user_id></root>
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 137
<root><code>1013</code><message>Input validation failed for 'posts'</message><details><user_id>invalid integer</user_id></details></root>
===
PUT /records/posts/1?format=xml
Content-Type: application/xml
<root><user_id>a</wrong_tag></root>
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 73
<root><code>1008</code><message>Cannot read HTTP message</message></root>

View File

@@ -0,0 +1,26 @@
===
GET /records/posts/1,2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 259
[{"id":1,"user_id":1,"category_id":1,"content":"blog started"},{"id":2,"user_id":1,"category_id":2,"content":"🦀€ Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте"}]
===
GET /records/posts/1,2?format=xml
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 364
<root type="array"><item><id>1</id><user_id>1</user_id><category_id>1</category_id><content>blog started</content></item><item><id>2</id><user_id>1</user_id><category_id>2</category_id><content>🦀€ Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте</content></item></root>
===
PUT /records/posts/1,2?format=xml
<object type="array"><object><user_id>1</user_id></object><object><user_id>2</user_id></object></object>
===
200
Content-Type: text/xml; charset=utf-8
Content-Length: 54
<root type="array"><item>1</item><item>1</item></root>

View File

@@ -0,0 +1,5 @@
===
GET http://localhost/records/posts
===
301
Location: https://localhost/records/posts

View File

@@ -0,0 +1,44 @@
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
X-Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6IjE1MzgyMDc2MDUiLCJleHAiOjE1MzgyMDc2MzV9.Z5px_GT15TRKhJCTHhDt5Z6K6LRDSFnLj8U5ok9l7gw
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
X-Authorization: Bearer invalid
===
403
Content-Type: application/json; charset=utf-8
Content-Length: 57
{"code":1012,"message":"Authentication failed for 'JWT'"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 54
{"code":1001,"message":"Table 'invisibles' not found"}
===
OPTIONS /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
Access-Control-Request-Method: POST
Access-Control-Request-Headers: X-PINGOTHER, Content-Type
===
200
Access-Control-Allow-Headers: Content-Type, X-XSRF-TOKEN, X-Authorization
Access-Control-Allow-Methods: OPTIONS, GET, PUT, POST, DELETE, PATCH
Access-Control-Allow-Credentials: true
Access-Control-Max-Age: 1728000

View File

@@ -0,0 +1,34 @@
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
Authorization: Basic dXNlcm5hbWUxOnBhc3N3b3JkMQ
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
Authorization: Basic aW52YWxpZHVzZXI6aW52YWxpZHBhc3M
===
403
Content-Type: application/json; charset=utf-8
Content-Length: 65
{"code":1012,"message":"Authentication failed for 'invaliduser'"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 54
{"code":1001,"message":"Table 'invisibles' not found"}

View File

@@ -0,0 +1,184 @@
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 54
{"code":1001,"message":"Table 'invisibles' not found"}
===
POST /login
Content-Type: application/json; charset=utf-8
{"username":"user2","password":"pass2"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":2,"username":"user2"}
===
GET /me
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":2,"username":"user2"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
===
POST /login
Content-Type: application/json; charset=utf-8
{"username":"user2","password":"incorect password"}
===
403
Content-Type: application/json; charset=utf-8
Content-Length: 59
{"code":1012,"message":"Authentication failed for 'user2'"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
===
POST /logout
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":2,"username":"user2"}
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
404
Content-Type: application/json; charset=utf-8
Content-Length: 54
{"code":1001,"message":"Table 'invisibles' not found"}
===
POST /logout
===
401
Content-Type: application/json; charset=utf-8
Content-Length: 49
{"code":1011,"message":"Authentication required"}
===
POST /register
Content-Type: application/json; charset=utf-8
{"username":"user2","password":""}
===
422
Content-Type: application/json; charset=utf-8
Content-Length: 60
{"code":1021,"message":"Password too short (<4 characters)"}
===
POST /register
Content-Type: application/json; charset=utf-8
{"username":"user2","password":"pass2"}
===
409
Content-Type: application/json; charset=utf-8
Content-Length: 53
{"code":1020,"message":"User 'user2' already exists"}
===
POST /register
Content-Type: application/json; charset=utf-8
{"username":"user3","password":"pass3"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":3,"username":"user3"}
===
POST /login
Content-Type: application/json; charset=utf-8
{"username":"user3","password":"pass3"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":3,"username":"user3"}
===
GET /me
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":3,"username":"user3"}
===
POST /password
Content-Type: application/json; charset=utf-8
{"username":"user3","password":"pass3","newPassword":"secret3"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":3,"username":"user3"}
===
POST /logout
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":3,"username":"user3"}
===
POST /login
Content-Type: application/json; charset=utf-8
{"username":"user3","password":"secret3"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":3,"username":"user3"}
===
GET /me
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":3,"username":"user3"}
===
POST /logout
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 27
{"id":3,"username":"user3"}
===
DELETE /records/users/3
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 1
1

View File

@@ -0,0 +1,9 @@
skip-for-sqlite: auto incrementing primary keys must be integer typed (may not be bigint)
===
GET /columns
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 2840
{"tables":[{"name":"barcodes","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"product_id","type":"integer","fk":"products"},{"name":"hex","type":"varchar","length":255},{"name":"bin","type":"blob"},{"name":"ip_address","type":"varchar","length":15,"nullable":true}]},{"name":"categories","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"name","type":"varchar","length":255},{"name":"icon","type":"blob","nullable":true}]},{"name":"comments","type":"table","columns":[{"name":"id","type":"bigint","pk":true},{"name":"post_id","type":"integer","fk":"posts"},{"name":"message","type":"varchar","length":255},{"name":"category_id","type":"integer","fk":"categories"}]},{"name":"countries","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"name","type":"varchar","length":255},{"name":"shape","type":"geometry"}]},{"name":"events","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"name","type":"varchar","length":255},{"name":"datetime","type":"timestamp","nullable":true},{"name":"visitors","type":"bigint","nullable":true}]},{"name":"kunsthåndværk","type":"table","columns":[{"name":"id","type":"varchar","length":36,"pk":true},{"name":"Umlauts ä_ö_ü-COUNT","type":"integer"},{"name":"user_id","type":"integer","fk":"users"},{"name":"invisible_id","type":"varchar","length":36,"nullable":true,"fk":"invisibles"}]},{"name":"nopk","type":"table","columns":[{"name":"id","type":"varchar","length":36}]},{"name":"post_tags","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"post_id","type":"integer","fk":"posts"},{"name":"tag_id","type":"integer","fk":"tags"}]},{"name":"posts","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"user_id","type":"integer","fk":"users"},{"name":"category_id","type":"integer","fk":"categories"},{"name":"content","type":"varchar","length":255}]},{"name":"products","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"name","type":"varchar","length":255},{"name":"price","type":"decimal","precision":10,"scale":2},{"name":"properties","type":"clob"},{"name":"created_at","type":"timestamp"},{"name":"deleted_at","type":"timestamp","nullable":true}]},{"name":"tag_usage","type":"view","columns":[{"name":"id","type":"integer","pk":true},{"name":"name","type":"varchar","length":255},{"name":"count","type":"bigint"}]},{"name":"tags","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"name","type":"varchar","length":255},{"name":"is_important","type":"boolean"}]},{"name":"users","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"username","type":"varchar","length":255},{"name":"password","type":"varchar","length":255},{"name":"location","type":"geometry","nullable":true}]}]}

View File

@@ -0,0 +1,8 @@
===
GET /columns/barcodes
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 283
{"name":"barcodes","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"product_id","type":"integer","fk":"products"},{"name":"hex","type":"varchar","length":255},{"name":"bin","type":"blob"},{"name":"ip_address","type":"varchar","length":15,"nullable":true}]}

View File

@@ -0,0 +1,8 @@
===
GET /columns/barcodes/id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 40
{"name":"id","type":"integer","pk":true}

View File

@@ -0,0 +1,37 @@
skip-for-sqlite: table (columns) cannot be altered online
===
PUT /columns/barcodes/id
{"name":"id2","type":"bigint"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/barcodes/id2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 40
{"name":"id2","type":"bigint","pk":true}
===
PUT /columns/barcodes/id2
{"name":"id","type":"integer"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/barcodes/id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 40
{"name":"id","type":"integer","pk":true}

View File

@@ -0,0 +1,37 @@
skip-for-sqlite: table (columns) cannot be altered online
===
PUT /columns/barcodes/product_id
{"nullable":true}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/barcodes/product_id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 70
{"name":"product_id","type":"integer","nullable":true,"fk":"products"}
===
PUT /columns/barcodes/product_id
{"nullable":false}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/barcodes/product_id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 54
{"name":"product_id","type":"integer","fk":"products"}

View File

@@ -0,0 +1,81 @@
skip-for-sqlite: table (columns) cannot be altered online
===
GET /columns/events/visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 51
{"name":"visitors","type":"bigint","nullable":true}
===
PUT /columns/events/visitors
{"nullable":false}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/events/visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 35
{"name":"visitors","type":"bigint"}
===
PUT /columns/events/visitors
{"nullable":true}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/events/id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 40
{"name":"id","type":"integer","pk":true}
===
PUT /columns/events/visitors
{"pk":false}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/events/visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 51
{"name":"visitors","type":"bigint","nullable":true}
===
PUT /columns/events/id
{"pk":true}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/events/id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 40
{"name":"id","type":"integer","pk":true}

View File

@@ -0,0 +1,37 @@
skip-for-sqlite: table (columns) cannot be altered online
===
PUT /columns/barcodes/product_id
{"fk":""}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/barcodes/product_id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 38
{"name":"product_id","type":"integer"}
===
PUT /columns/barcodes/product_id
{"fk":"products"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/barcodes/product_id
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 54
{"name":"product_id","type":"integer","fk":"products"}

View File

@@ -0,0 +1,36 @@
===
PUT /columns/barcodes
{"name":"barcodes2"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/barcodes2
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 284
{"name":"barcodes2","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"product_id","type":"integer","fk":"products"},{"name":"hex","type":"varchar","length":255},{"name":"bin","type":"blob"},{"name":"ip_address","type":"varchar","length":15,"nullable":true}]}
===
PUT /columns/barcodes2
{"name":"barcodes"}
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 4
true
===
GET /columns/barcodes
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 283
{"name":"barcodes","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"product_id","type":"integer","fk":"products"},{"name":"hex","type":"varchar","length":255},{"name":"bin","type":"blob"},{"name":"ip_address","type":"varchar","length":15,"nullable":true}]}

Some files were not shown because too many files have changed in this diff Show More