added static php-crud-api

This commit is contained in:
zino
2021-01-20 13:13:22 +01:00
parent ea9085b4a4
commit fda9de0fa5
175 changed files with 770 additions and 15545 deletions

View File

@@ -4,11 +4,9 @@ $settings = [
'username' => 'incorrect_username',
'password' => 'incorrect_password',
'controllers' => 'records,columns,cache,openapi,geojson',
'middlewares' => 'sslRedirect,xml,cors,reconnect,dbAuth,jwtAuth,basicAuth,authorization,sanitation,validation,ipAddress,multiTenancy,pageLimits,joinLimits,customization',
'middlewares' => 'cors,reconnect,dbAuth,jwtAuth,basicAuth,authorization,validation,ipAddress,sanitation,multiTenancy,pageLimits,joinLimits,customization',
'dbAuth.mode' => 'optional',
'dbAuth.returnedColumns' => 'id,username,password',
'dbAuth.registerUser' => '1',
'dbAuth.passwordLength' => '4',
'jwtAuth.mode' => 'optional',
'jwtAuth.time' => '1538207605',
'jwtAuth.secrets' => 'axpIrCGNGqxzx2R9dtXLIPUSqPo778uhb8CA0F4Hx',
@@ -37,7 +35,6 @@ $settings = [
'sanitation.handler' => function ($operation, $tableName, $column, $value) {
return is_string($value) ? strip_tags($value) : $value;
},
'sanitation.tables' => 'forgiving',
'validation.handler' => function ($operation, $tableName, $column, $value, $context) {
return ($column['name'] == 'post_id' && !is_numeric($value)) ? 'must be numeric' : true;
},

View File

@@ -1,2 +0,0 @@
<?php
$settings['driver'] = 'sqlite';

Binary file not shown.

View File

@@ -130,7 +130,7 @@ INSERT INTO `events` (`name`, `datetime`, `visitors`) VALUES
('Launch', '2016-01-01 13:01:01', 0);
DROP VIEW IF EXISTS `tag_usage`;
CREATE VIEW `tag_usage` AS select `tags`.`id` as `id`, `name`, count(`name`) AS `count` from `tags`, `post_tags` where `tags`.`id` = `post_tags`.`tag_id` group by `tags`.`id`, `name` order by `count` desc, `name`;
CREATE VIEW `tag_usage` AS select `name`, count(`name`) AS `count` from `tags`, `post_tags` where `tags`.`id` = `post_tags`.`tag_id` group by `name` order by `count` desc, `name`;
DROP TABLE IF EXISTS `products`;
CREATE TABLE `products` (
@@ -167,16 +167,14 @@ CREATE TABLE `kunsthåndværk` (
`Umlauts ä_ö_ü-COUNT` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`invisible` varchar(36),
`invisible_id` varchar(36),
PRIMARY KEY (`id`),
CONSTRAINT `kunsthåndværk_Umlauts ä_ö_ü-COUNT_fkey` UNIQUE (`Umlauts ä_ö_ü-COUNT`),
CONSTRAINT `kunsthåndværk_user_id_fkey` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
CONSTRAINT `kunsthåndværk_invisible_id_fkey` FOREIGN KEY (`invisible_id`) REFERENCES `invisibles` (`id`)
CONSTRAINT `kunsthåndværk_user_id_fkey` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `kunsthåndværk` (`id`, `Umlauts ä_ö_ü-COUNT`, `user_id`, `invisible`, `invisible_id`) VALUES
('e42c77c6-06a4-4502-816c-d112c7142e6d', 1, 1, NULL, 'e42c77c6-06a4-4502-816c-d112c7142e6d'),
('e31ecfe6-591f-4660-9fbd-1a232083037f', 2, 2, NULL, 'e42c77c6-06a4-4502-816c-d112c7142e6d');
INSERT INTO `kunsthåndværk` (`id`, `Umlauts ä_ö_ü-COUNT`, `user_id`, `invisible`) VALUES
('e42c77c6-06a4-4502-816c-d112c7142e6d', 1, 1, NULL),
('e31ecfe6-591f-4660-9fbd-1a232083037f', 2, 2, NULL);
DROP TABLE IF EXISTS `invisibles`;
CREATE TABLE `invisibles` (

View File

@@ -127,7 +127,7 @@ CREATE TABLE events (
-- Name: tag_usage; Type: VIEW; Schema: public; Owner: postgres; Tablespace:
--
CREATE VIEW "tag_usage" AS select "tags"."id" as "id", "name", count("name") AS "count" from "tags", "post_tags" where "tags"."id" = "post_tags"."tag_id" group by "tags"."id", "name" order by "count" desc, "name";
CREATE VIEW "tag_usage" AS select "name", count("name") AS "count" from "tags", "post_tags" where "tags"."id" = "post_tags"."tag_id" group by "name" order by "count" desc, "name";
--
-- Name: products; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
@@ -162,8 +162,7 @@ CREATE TABLE "kunsthåndværk" (
id character varying(36) NOT NULL,
"Umlauts ä_ö_ü-COUNT" integer NOT NULL,
user_id integer NOT NULL,
invisible character varying(36),
invisible_id character varying(36)
invisible character varying(36)
);
--
@@ -277,9 +276,9 @@ INSERT INTO "barcodes" ("product_id", "hex", "bin", "ip_address") VALUES
-- Data for Name: kunsthåndværk; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO "kunsthåndværk" ("id", "Umlauts ä_ö_ü-COUNT", "user_id", "invisible", "invisible_id") VALUES
('e42c77c6-06a4-4502-816c-d112c7142e6d', 1, 1, NULL, 'e42c77c6-06a4-4502-816c-d112c7142e6d'),
('e31ecfe6-591f-4660-9fbd-1a232083037f', 2, 2, NULL, 'e42c77c6-06a4-4502-816c-d112c7142e6d');
INSERT INTO "kunsthåndværk" ("id", "Umlauts ä_ö_ü-COUNT", "user_id", "invisible") VALUES
('e42c77c6-06a4-4502-816c-d112c7142e6d', 1, 1, NULL),
('e31ecfe6-591f-4660-9fbd-1a232083037f', 2, 2, NULL);
--
-- Data for Name: invisibles; Type: TABLE DATA; Schema: public; Owner: postgres
@@ -457,13 +456,6 @@ CREATE INDEX "kunsthåndværk_Umlauts ä_ö_ü-COUNT_idx" ON "kunsthåndværk" U
CREATE INDEX "kunsthåndværk_user_id_idx" ON "kunsthåndværk" USING btree (user_id);
--
-- Name: kunsthåndværk_invisible_id_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--
CREATE INDEX "kunsthåndværk_invisible_id_idx" ON "kunsthåndværk" USING btree (invisible_id);
--
-- Name: comments_post_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
@@ -527,7 +519,6 @@ ALTER TABLE ONLY barcodes
ALTER TABLE ONLY "kunsthåndværk"
ADD CONSTRAINT "kunsthåndværk_Umlauts ä_ö_ü-COUNT_uc" UNIQUE ("Umlauts ä_ö_ü-COUNT");
--
-- Name: kunsthåndværk_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
@@ -536,13 +527,6 @@ ALTER TABLE ONLY "kunsthåndværk"
ADD CONSTRAINT "kunsthåndværk_user_id_fkey" FOREIGN KEY (user_id) REFERENCES users(id);
--
-- Name: kunsthåndværk_invisible_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY "kunsthåndværk"
ADD CONSTRAINT "kunsthåndværk_invisible_id_fkey" FOREIGN KEY (invisible_id) REFERENCES invisibles(id);
--
-- PostgreSQL database dump complete
--

View File

@@ -1,175 +0,0 @@
-- Adminer 4.2.4 SQLite 3 dump
PRAGMA foreign_keys = off;
DROP TABLE IF EXISTS "categories";
CREATE TABLE "categories" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" varchar(255) NOT NULL,
"icon" blob NULL
);
INSERT INTO "categories" ("id", "name", "icon") VALUES (1, 'announcement', NULL);
INSERT INTO "categories" ("id", "name", "icon") VALUES (2, 'article', NULL);
INSERT INTO "categories" ("id", "name", "icon") VALUES (3, 'comment', NULL);
DROP TABLE IF EXISTS "comments";
CREATE TABLE "comments" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"post_id" integer NOT NULL,
"message" VARCHAR(255) NOT NULL,
"category_id" integer NOT NULL,
FOREIGN KEY ("post_id") REFERENCES "posts" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT,
FOREIGN KEY ("category_id") REFERENCES "categories" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT
);
CREATE INDEX "comments_post_id" ON "comments" ("post_id");
CREATE INDEX "comments_category_id" ON "comments" ("category_id");
INSERT INTO "comments" ("id", "post_id", "message", "category_id") VALUES (1, 1, 'great', 3);
INSERT INTO "comments" ("id", "post_id", "message", "category_id") VALUES (2, 1, 'fantastic', 3);
INSERT INTO "comments" ("id", "post_id", "message", "category_id") VALUES (3, 2, 'thank you', 3);
INSERT INTO "comments" ("id", "post_id", "message", "category_id") VALUES (4, 2, 'awesome', 3);
DROP TABLE IF EXISTS "posts";
CREATE TABLE "posts" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"user_id" integer NOT NULL,
"category_id" integer NOT NULL,
"content" varchar(255) NOT NULL,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT,
FOREIGN KEY ("category_id") REFERENCES "categories" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT
);
CREATE INDEX "posts_user_id" ON "posts" ("user_id");
CREATE INDEX "posts_category_id" ON "posts" ("category_id");
INSERT INTO "posts" ("id", "user_id", "category_id", "content") VALUES (1, 1, 1, 'blog started');
INSERT INTO "posts" ("id", "user_id", "category_id", "content") VALUES (2, 1, 2, 'It works!');
DROP TABLE IF EXISTS "post_tags";
CREATE TABLE "post_tags" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"post_id" integer NOT NULL,
"tag_id" integer NOT NULL,
FOREIGN KEY ("tag_id") REFERENCES "tags" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT,
FOREIGN KEY ("post_id") REFERENCES "posts" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT
);
CREATE UNIQUE INDEX "post_tags_post_id_tag_id" ON "post_tags" ("post_id", "tag_id");
INSERT INTO "post_tags" ("id", "post_id", "tag_id") VALUES (1, 1, 1);
INSERT INTO "post_tags" ("id", "post_id", "tag_id") VALUES (2, 1, 2);
INSERT INTO "post_tags" ("id", "post_id", "tag_id") VALUES (3, 2, 1);
INSERT INTO "post_tags" ("id", "post_id", "tag_id") VALUES (4, 2, 2);
DROP TABLE IF EXISTS "tags";
CREATE TABLE "tags" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" varchar(255) NOT NULL,
"is_important" boolean NOT NULL
);
INSERT INTO "tags" ("id", "name", "is_important") VALUES (1, 'funny', 0);
INSERT INTO "tags" ("id", "name", "is_important") VALUES (2, 'important', 1);
DROP TABLE IF EXISTS "users";
CREATE TABLE "users" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"username" varchar(255) NOT NULL,
"password" varchar(255) NOT NULL,
"location" text NULL
);
INSERT INTO "users" ("id", "username", "password", "location") VALUES (1, 'user1', 'pass1', NULL);
INSERT INTO "users" ("id", "username", "password", "location") VALUES (2, 'user2', '$2y$10$cg7/nswxVZ0cmVIsMB/pVOh1OfcHScBJGq7Xu4KF9dFEQgRZ8HWe.', NULL);
DROP TABLE IF EXISTS "countries";
CREATE TABLE "countries" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" varchar(255) NOT NULL,
"shape" text NOT NULL
);
INSERT INTO "countries" ("id", "name", "shape") VALUES (1, 'Left', 'POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))');
INSERT INTO "countries" ("id", "name", "shape") VALUES (2, 'Right', 'POLYGON ((70 10, 80 40, 60 40, 50 20, 70 10))');
INSERT INTO "countries" ("id", "name", "shape") VALUES (3, 'Point', 'POINT (30 10)');
INSERT INTO "countries" ("id", "name", "shape") VALUES (4, 'Line', 'LINESTRING (30 10, 10 30, 40 40)');
INSERT INTO "countries" ("id", "name", "shape") VALUES (5, 'Poly1', 'POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))');
INSERT INTO "countries" ("id", "name", "shape") VALUES (6, 'Poly2', 'POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10),(20 30, 35 35, 30 20, 20 30))');
INSERT INTO "countries" ("id", "name", "shape") VALUES (7, 'Mpoint', 'MULTIPOINT (10 40, 40 30, 20 20, 30 10)');
INSERT INTO "countries" ("id", "name", "shape") VALUES (8, 'Mline', 'MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))');
INSERT INTO "countries" ("id", "name", "shape") VALUES (9, 'Mpoly1', 'MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)),((15 5, 40 10, 10 20, 5 10, 15 5)))');
INSERT INTO "countries" ("id", "name", "shape") VALUES (10, 'Mpoly2', 'MULTIPOLYGON (((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)))');
INSERT INTO "countries" ("id", "name", "shape") VALUES (11, 'Gcoll', 'GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10))');
DROP TABLE IF EXISTS "events";
CREATE TABLE "events" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" varchar(255) NOT NULL,
"datetime" datetime,
"visitors" bigint
);
INSERT INTO "events" ("id", "name", "datetime", "visitors") VALUES (1, 'Launch', '2016-01-01 13:01:01', 0);
DROP VIEW IF EXISTS "tag_usage";
CREATE VIEW "tag_usage" AS select "tags"."id" as "id", "name", count("name") AS "count" from "tags", "post_tags" where "tags"."id" = "post_tags"."tag_id" group by "tags"."id", "name" order by "count" desc, "name";
DROP TABLE IF EXISTS "products";
CREATE TABLE "products" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" varchar(255) NOT NULL,
"price" decimal(10,2) NOT NULL,
"properties" clob NOT NULL,
"created_at" datetime NOT NULL,
"deleted_at" datetime NULL
);
INSERT INTO "products" ("id", "name", "price", "properties", "created_at") VALUES (1, 'Calculator', '23.01', '{"depth":false,"model":"TRX-120","width":100,"height":null}', '1970-01-01 01:01:01');
DROP TABLE IF EXISTS "barcodes2";
DROP TABLE IF EXISTS "barcodes";
CREATE TABLE "barcodes" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"product_id" integer NOT NULL,
"hex" varchar(255) NOT NULL,
"bin" blob NOT NULL,
"ip_address" varchar(15),
FOREIGN KEY ("product_id") REFERENCES "products" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT
);
INSERT INTO "barcodes" ("id", "product_id", "hex", "bin", "ip_address") VALUES (1, 1, '00ff01', 'AP8B', '127.0.0.1');
DROP TABLE IF EXISTS "kunsthåndværk";
CREATE TABLE "kunsthåndværk" (
"id" varchar(36) NOT NULL PRIMARY KEY,
"Umlauts ä_ö_ü-COUNT" integer NOT NULL UNIQUE,
"user_id" integer NOT NULL,
"invisible" varchar(36),
"invisible_id" varchar(36),
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT,
FOREIGN KEY ("invisible_id") REFERENCES "invisibles" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT
);
INSERT INTO "kunsthåndværk" ("id", "Umlauts ä_ö_ü-COUNT", "user_id", "invisible", "invisible_id") VALUES ('e42c77c6-06a4-4502-816c-d112c7142e6d', 1, 1, NULL, 'e42c77c6-06a4-4502-816c-d112c7142e6d');
INSERT INTO "kunsthåndværk" ("id", "Umlauts ä_ö_ü-COUNT", "user_id", "invisible", "invisible_id") VALUES ('e31ecfe6-591f-4660-9fbd-1a232083037f', 2, 2, NULL, 'e42c77c6-06a4-4502-816c-d112c7142e6d');
DROP TABLE IF EXISTS "invisibles";
CREATE TABLE "invisibles" (
"id" varchar(36) NOT NULL PRIMARY KEY
);
INSERT INTO "invisibles" ("id") VALUES ('e42c77c6-06a4-4502-816c-d112c7142e6d');
DROP TABLE IF EXISTS "nopk";
CREATE TABLE "nopk" (
"id" varchar(36) NOT NULL
);
INSERT INTO "nopk" ("id") VALUES ('e42c77c6-06a4-4502-816c-d112c7142e6d');
PRAGMA foreign_keys = on;
--

View File

@@ -246,7 +246,7 @@ GO
CREATE VIEW [tag_usage]
AS
SELECT top 100 PERCENT tags.id as id, name, COUNT_BIG(name) AS [count] FROM tags, post_tags WHERE tags.id = post_tags.tag_id GROUP BY tags.id, name ORDER BY [count] DESC, name
SELECT top 100 PERCENT name, COUNT_BIG(name) AS [count] FROM tags, post_tags WHERE tags.id = post_tags.tag_id GROUP BY name ORDER BY [count] DESC, name
GO
DROP SEQUENCE IF EXISTS [products_id_seq]
@@ -285,7 +285,6 @@ CREATE TABLE [kunsthåndværk](
[Umlauts ä_ö_ü-COUNT] [int] NOT NULL,
[user_id] [int] NOT NULL,
[invisible] [nvarchar](36),
[invisible_id] [nvarchar](36),
CONSTRAINT [kunsthåndværk_pkey] PRIMARY KEY CLUSTERED([id] ASC)
)
GO
@@ -373,9 +372,9 @@ GO
INSERT [barcodes] ([product_id], [hex], [bin], [ip_address]) VALUES (1, N'00ff01', 0x00ff01, N'127.0.0.1')
GO
INSERT [kunsthåndværk] ([id], [Umlauts ä_ö_ü-COUNT], [user_id], [invisible], [invisible_id]) VALUES ('e42c77c6-06a4-4502-816c-d112c7142e6d', 1, 1, NULL, 'e42c77c6-06a4-4502-816c-d112c7142e6d')
INSERT [kunsthåndværk] ([id], [Umlauts ä_ö_ü-COUNT], [user_id], [invisible]) VALUES ('e42c77c6-06a4-4502-816c-d112c7142e6d', 1, 1, NULL)
GO
INSERT [kunsthåndværk] ([id], [Umlauts ä_ö_ü-COUNT], [user_id], [invisible], [invisible_id]) VALUES ('e31ecfe6-591f-4660-9fbd-1a232083037f', 2, 2, NULL, 'e42c77c6-06a4-4502-816c-d112c7142e6d')
INSERT [kunsthåndværk] ([id], [Umlauts ä_ö_ü-COUNT], [user_id], [invisible]) VALUES ('e31ecfe6-591f-4660-9fbd-1a232083037f', 2, 2, NULL)
GO
INSERT [invisibles] ([id]) VALUES ('e42c77c6-06a4-4502-816c-d112c7142e6d')
@@ -434,9 +433,3 @@ REFERENCES [users] ([id])
GO
ALTER TABLE [kunsthåndværk] CHECK CONSTRAINT [kunsthåndværk_user_id_fkey]
GO
ALTER TABLE [kunsthåndværk] WITH CHECK ADD CONSTRAINT [kunsthåndværk_invisible_id_fkey] FOREIGN KEY([invisible_id])
REFERENCES [invisibles] ([id])
GO
ALTER TABLE [kunsthåndværk] CHECK CONSTRAINT [kunsthåndværk_invisible_id_fkey]
GO

View File

@@ -1,8 +1,7 @@
===
GET /records/posts
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

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

View File

@@ -1,16 +1,7 @@
===
GET /records/posts/2
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

@@ -1,8 +1,7 @@
===
GET /records/posts/1,2
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,11 +1,10 @@
===
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-Type: application/json
Content-Length: 1
1
@@ -13,7 +12,7 @@ Content-Length: 1
GET /records/posts/2
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 195
{"id":2,"user_id":1,"category_id":2,"content":"🦀€ Grüßgott, Ваю, dobrý deň, hyvää päivää, გამარჯობა, Γεια σας, góðan dag, здравствуйте"}

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,10 +1,9 @@
===
POST /records/posts
{"user_id":1,"category_id":1,"content":"#1"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
5
@@ -14,7 +13,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#2"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
6
@@ -24,7 +23,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#3"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
7
@@ -34,7 +33,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#4"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
8
@@ -44,7 +43,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#5"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
9
@@ -54,7 +53,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#6"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 2
10
@@ -64,7 +63,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#7"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 2
11
@@ -74,7 +73,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#8"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 2
12
@@ -84,7 +83,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#9"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 2
13
@@ -94,7 +93,7 @@ POST /records/posts
{"user_id":1,"category_id":1,"content":"#10"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 2
14
@@ -102,7 +101,7 @@ Content-Length: 2
GET /records/posts?page=2,2&order=id
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

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

View File

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

View File

@@ -1,8 +1,7 @@
===
GET /records/posts?page=1,2&order=category_id,asc&order=id,desc
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

@@ -1,8 +1,7 @@
===
GET /records/posts?page=2,2&order=id,desc
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

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

View File

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

View File

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

View File

@@ -1,8 +1,7 @@
===
GET /records/posts?page=3,5&order=id
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

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

View File

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

View File

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

View File

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

View File

@@ -1,8 +1,7 @@
===
GET /records/posts?join=comments&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

@@ -1,8 +1,7 @@
===
GET /records/posts?join=tags&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

@@ -1,8 +1,7 @@
===
GET /records/posts?join=categories&join=post_tags,tags&join=comments&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

@@ -1,8 +1,7 @@
===
GET /records/posts?join=categories&join=tags&join=comments&filter=id,eq,1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

@@ -1,8 +1,7 @@
===
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-Type: application/json
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

@@ -1,9 +1,8 @@
===
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-Type: application/json
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

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

View File

@@ -1,10 +1,9 @@
===
PUT /records/categories/2
{"icon":""}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -12,7 +11,7 @@ Content-Length: 1
GET /records/categories/2
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 35
{"id":2,"name":"article","icon":""}
@@ -22,7 +21,7 @@ PUT /records/categories/2
{"icon":null}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -30,7 +29,7 @@ Content-Length: 1
GET /records/categories/2
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 37
{"id":2,"name":"article","icon":null}

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,3 @@
===
OPTIONS /records/posts/1?include=id
Origin: http://example.com
Access-Control-Request-Method: POST

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,10 +1,9 @@
===
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-Type: application/json
Content-Length: 58
{"code":1002,"message":"Argument count mismatch in '1,2'"}

View File

@@ -1,10 +1,9 @@
===
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-Type: application/json
Content-Length: 58
{"code":1002,"message":"Argument count mismatch in '1,2'"}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,24 +1,7 @@
===
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-Type: application/json
Content-Length: 31
{"records":[{"id":1},{"id":2}]}

View File

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

View File

@@ -1,8 +1,7 @@
===
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-Type: application/json
Content-Length: 31
{"records":[{"id":1},{"id":2}]}

View File

@@ -1,8 +1,7 @@
===
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-Type: application/json
Content-Length: 31
{"records":[{"id":1},{"id":2}]}

View File

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

View File

@@ -1,16 +1,7 @@
===
GET /records/kunsthåndværk/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 138
Content-Type: application/json
Content-Length: 84
{"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"}
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d","Umlauts ä_ö_ü-COUNT":1,"user_id":1}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,10 +1,9 @@
===
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-Type: application/json
Content-Length: 1
5
@@ -12,7 +11,7 @@ Content-Length: 1
GET /records/comments/5
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 59
{"id":5,"post_id":2,"message":"Title Body","category_id":3}

View File

@@ -1,8 +1,7 @@
===
GET /records/events/1?include=visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 14
{"visitors":0}
@@ -12,7 +11,7 @@ PATCH /records/events/1
{"visitors":1}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -22,7 +21,7 @@ PATCH /records/events/1
{"visitors":1}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -32,7 +31,7 @@ PATCH /records/events/1,1
[{"visitors":1},{"visitors":1}]
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 5
[1,1]
@@ -40,7 +39,7 @@ Content-Length: 5
GET /records/events/1?include=visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 14
{"visitors":4}
@@ -50,7 +49,7 @@ PATCH /records/events/1
{"visitors":-4}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -58,7 +57,7 @@ Content-Length: 1
GET /records/events/1?include=visitors
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 14
{"visitors":0}

View File

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

View File

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

View File

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

View File

@@ -1,10 +1,9 @@
===
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-Type: application/json
Content-Length: 38
"b55decba-8eb5-436b-af3e-148f7b4eacda"
@@ -12,17 +11,17 @@ Content-Length: 38
GET /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 104
Content-Type: application/json
Content-Length: 84
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1,"invisible_id":null}
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1}
===
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-Type: application/json
Content-Length: 1
1
@@ -30,15 +29,15 @@ Content-Length: 1
GET /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 104
Content-Type: application/json
Content-Length: 84
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1,"invisible_id":null}
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1}
===
DELETE /records/kunsthåndværk/e31ecfe6-591f-4660-9fbd-1a232083037f
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
0
@@ -46,7 +45,7 @@ Content-Length: 1
DELETE /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1

View File

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

View File

@@ -1,24 +1,15 @@
===
GET /records/tag_usage
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 85
Content-Type: application/json
Content-Length: 71
{"records":[{"id":1,"name":"funny","count":2},{"id":2,"name":"important","count":2}]}
{"records":[{"name":"funny","count":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
Content-Type: application/json
Content-Length: 56
{"code":1015,"message":"Operation 'delete' not supported"}
{"code":1015,"message":"Operation 'read' not supported"}

View File

@@ -1,9 +1,7 @@
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-Type: application/json
Content-Length: 48
{"records":[{"id":1,"location":"POINT(30 20)"}]}

View File

@@ -1,8 +1,7 @@
===
GET /records/posts?size=10
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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"}]}
@@ -10,7 +9,7 @@ Content-Length: 690
GET /records/posts
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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"}]}
@@ -18,7 +17,7 @@ Content-Length: 690
GET /records/posts?page=5,1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 78
{"records":[{"id":7,"user_id":1,"category_id":1,"content":"#3"}],"results":12}
@@ -26,7 +25,7 @@ Content-Length: 78
GET /records/posts?page=6,1
===
403
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 46
{"code":1019,"message":"Pagination forbidden"}

View File

@@ -1,8 +1,7 @@
===
GET /records/events/1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 70
{"id":1,"name":"Launch","datetime":"2016-01-01 13:01:01","visitors":0}
@@ -12,7 +11,7 @@ PUT /records/events/1
{"datetime":null,"visitors":null}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -20,7 +19,7 @@ Content-Length: 1
GET /records/events/1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 56
{"id":1,"name":"Launch","datetime":null,"visitors":null}
@@ -30,7 +29,7 @@ PUT /records/events/1
{"datetime":"2016-01-01 13:01:01","visitors":0}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -38,7 +37,7 @@ Content-Length: 1
GET /records/events/1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 70
{"id":1,"name":"Launch","datetime":"2016-01-01 13:01:01","visitors":0}

View File

@@ -1,8 +1,7 @@
===
GET /records/posts/1?join=tags&include=tags.name
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 69
{"id":1,"tags":[{"id":1,"name":"funny"},{"id":2,"name":"important"}]}
@@ -10,7 +9,7 @@ Content-Length: 69
GET /records/posts/1?join=categories&include=category_id,categories.name
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 53
{"id":1,"category_id":{"id":1,"name":"announcement"}}
@@ -18,7 +17,7 @@ Content-Length: 53
GET /records/posts/1?join=comments,categories&include=category_id,categories.name
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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"}}]}
@@ -26,7 +25,7 @@ Content-Length: 145
GET /records/posts/1?join=categories&join=comments,categories&include=category_id,categories.name
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

@@ -1,10 +1,9 @@
===
POST /records/barcodes
{"product_id":1,"hex":"","bin":""}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
2
@@ -12,7 +11,7 @@ Content-Length: 1
GET /records/barcodes/2
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 64
{"id":2,"product_id":1,"hex":"","bin":"","ip_address":"TEST_IP"}
@@ -22,7 +21,7 @@ PUT /records/barcodes/2
{"ip_address":"FAKE_IP"}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
0
@@ -30,7 +29,7 @@ Content-Length: 1
GET /records/barcodes/2
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 64
{"id":2,"product_id":1,"hex":"","bin":"","ip_address":"TEST_IP"}
@@ -38,7 +37,7 @@ Content-Length: 64
DELETE /records/barcodes/2
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1

View File

@@ -1,9 +1,7 @@
skip-for-sqlite: no support for geometry functions (spatialite)
===
GET /geojson/countries/3
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 105
{"type":"Feature","id":3,"properties":{"name":"Point"},"geometry":{"type":"Point","coordinates":[30,10]}}
@@ -11,7 +9,7 @@ Content-Length: 105
GET /geojson/countries/4
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 127
{"type":"Feature","id":4,"properties":{"name":"Line"},"geometry":{"type":"LineString","coordinates":[[30,10],[10,30],[40,40]]}}
@@ -19,7 +17,7 @@ Content-Length: 127
GET /geojson/countries/5
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 143
{"type":"Feature","id":5,"properties":{"name":"Poly1"},"geometry":{"type":"Polygon","coordinates":[[[30,10],[40,40],[20,40],[10,20],[30,10]]]}}
@@ -27,7 +25,7 @@ Content-Length: 143
GET /geojson/countries/6
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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]]]}}
@@ -35,7 +33,7 @@ Content-Length: 177
GET /geojson/countries/7
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 137
{"type":"Feature","id":7,"properties":{"name":"Mpoint"},"geometry":{"type":"MultiPoint","coordinates":[[10,40],[40,30],[20,20],[30,10]]}}
@@ -43,7 +41,7 @@ Content-Length: 137
GET /geojson/countries/8
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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]]]}}
@@ -51,7 +49,7 @@ Content-Length: 169
GET /geojson/countries/9
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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]]]]}}
@@ -59,7 +57,7 @@ Content-Length: 184
GET /geojson/countries/10
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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]]]]}}
@@ -67,7 +65,7 @@ Content-Length: 229
GET /geojson/countries/11
===
500
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 73
{"code":9999,"message":"Geometry type not supported: GEOMETRYCOLLECTION"}

View File

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

View File

@@ -1,9 +1,7 @@
skip-for-sqlite: no support for geometry functions (spatialite)
===
GET /geojson/users?exclude=password
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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}]}
@@ -11,7 +9,7 @@ Content-Length: 227
GET /geojson/users?exclude=password&geometry=location
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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}]}
@@ -19,7 +17,7 @@ Content-Length: 227
GET /geojson/users?exclude=password&geometry=notlocation
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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}]}
@@ -27,7 +25,7 @@ Content-Length: 235
GET /geojson/users?exclude=password&page=1,1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 163
{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"properties":{"username":"user1"},"geometry":{"type":"Point","coordinates":[30,20]}}],"results":2}
@@ -35,7 +33,7 @@ Content-Length: 163
GET /geojson/users?exclude=password&bbox=29.99,19.99,30.01,20.01
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 151
{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"properties":{"username":"user1"},"geometry":{"type":"Point","coordinates":[30,20]}}]}

View File

@@ -1,8 +1,7 @@
===
GET /records/tags/1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 44
{"id":1,"name":"funny","is_important":false}
@@ -12,7 +11,7 @@ PUT /records/tags/1
{"id":1,"name":"funny","is_important":true}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -20,7 +19,7 @@ Content-Length: 1
GET /records/tags/1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 43
{"id":1,"name":"funny","is_important":true}
@@ -30,7 +29,7 @@ PUT /records/tags/1
{"id":1,"name":"funny","is_important":false}
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1
@@ -38,7 +37,7 @@ Content-Length: 1
GET /records/tags/1
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 44
{"id":1,"name":"funny","is_important":false}

View File

@@ -1,10 +1,9 @@
===
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-Type: application/json
Content-Length: 38
"b55decba-8eb5-436b-af3e-148f7b4eacda"
@@ -12,17 +11,17 @@ Content-Length: 38
GET /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 104
Content-Type: application/json
Content-Length: 84
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1,"invisible_id":null}
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":4,"user_id":1}
===
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-Type: application/json
Content-Length: 1
1
@@ -30,15 +29,15 @@ Content-Length: 1
GET /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Length: 104
Content-Type: application/json
Content-Length: 84
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":3,"user_id":1,"invisible_id":null}
{"id":"b55decba-8eb5-436b-af3e-148f7b4eacda","Umlauts ä_ö_ü-COUNT":3,"user_id":1}
===
DELETE /records/kunsthåndværk/b55decba-8eb5-436b-af3e-148f7b4eacda
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 1
1

File diff suppressed because one or more lines are too long

View File

@@ -1,116 +0,0 @@
===
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

@@ -1,26 +0,0 @@
===
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

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

View File

@@ -1,9 +1,8 @@
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
X-Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6IjE1MzgyMDc2MDUiLCJleHAiOjE1MzgyMDc2MzV9.Z5px_GT15TRKhJCTHhDt5Z6K6LRDSFnLj8U5ok9l7gw
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
@@ -11,7 +10,7 @@ Content-Length: 45
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
@@ -20,7 +19,7 @@ GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
X-Authorization: Bearer invalid
===
403
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 57
{"code":1012,"message":"Authentication failed for 'JWT'"}
@@ -28,7 +27,7 @@ Content-Length: 57
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
404
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 54
{"code":1001,"message":"Table 'invisibles' not found"}

View File

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

View File

@@ -1,27 +1,18 @@
===
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
404
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 54
{"code":1001,"message":"Table 'invisibles' not found"}
===
POST /login
Content-Type: application/json; charset=utf-8
Content-Type: application/json
{"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-Type: application/json
Content-Length: 27
{"id":2,"username":"user2"}
@@ -29,18 +20,18 @@ Content-Length: 27
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
===
POST /login
Content-Type: application/json; charset=utf-8
Content-Type: application/json
{"username":"user2","password":"incorect password"}
===
403
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 59
{"code":1012,"message":"Authentication failed for 'user2'"}
@@ -48,7 +39,7 @@ Content-Length: 59
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 45
{"id":"e42c77c6-06a4-4502-816c-d112c7142e6d"}
@@ -56,7 +47,7 @@ Content-Length: 45
POST /logout
===
200
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 27
{"id":2,"username":"user2"}
@@ -64,7 +55,7 @@ Content-Length: 27
GET /records/invisibles/e42c77c6-06a4-4502-816c-d112c7142e6d
===
404
Content-Type: application/json; charset=utf-8
Content-Type: application/json
Content-Length: 54
{"code":1001,"message":"Table 'invisibles' not found"}
@@ -72,113 +63,7 @@ Content-Length: 54
POST /logout
===
401
Content-Type: application/json; charset=utf-8
Content-Type: application/json
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

@@ -1,9 +1,7 @@
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
Content-Type: application/json
Content-Length: 2712
{"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}]}]}
{"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":"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":"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}]}]}

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