Add rest endpoints for action log

This commit is contained in:
Denis Arh
2020-05-22 07:16:15 +02:00
parent 3e2e915418
commit f84f8b5b33
7 changed files with 657 additions and 1 deletions
+58 -1
View File
@@ -1759,7 +1759,6 @@
}
]
},
{
"title": "Statistics",
"entrypoint": "stats",
@@ -1863,5 +1862,63 @@
}
}
]
},
{
"title": "Action log",
"entrypoint": "actionlog",
"path": "/actionlog",
"struct": [
{
"imports": [
"time"
]
}
],
"apis": [
{
"name": "list",
"method": "GET",
"title": "Action log events",
"path": "/",
"parameters": {
"get": [
{
"name": "from",
"type": "*time.Time",
"required": false,
"title": "From"
},
{
"name": "to",
"type": "*time.Time",
"required": false,
"title": "To"
},
{
"name": "resource",
"required": false,
"title": "Resource",
"type": "string"
},
{
"name": "action",
"required": false,
"title": "Action",
"type": "string"
},
{
"name": "actorID",
"required": false,
"title": "Filter by one or more actors",
"type": "[]string"
},
{"type": "uint", "name": "limit", "title": "Limit"},
{"type": "uint", "name": "offset", "title": "Offset"},
{"type": "uint", "name": "page", "title": "Page number (1-based)"},
{"type": "uint", "name": "perPage", "title": "Returned items per page (default 50)"}
]
}
}
]
}
]
+77
View File
@@ -0,0 +1,77 @@
{
"Title": "Action log",
"Interface": "Actionlog",
"Struct": [
{
"imports": [
"time"
]
}
],
"Parameters": null,
"Protocol": "",
"Authentication": null,
"Path": "/actionlog",
"APIs": [
{
"Name": "list",
"Method": "GET",
"Title": "Action log events",
"Path": "/",
"Parameters": {
"get": [
{
"name": "from",
"required": false,
"title": "From",
"type": "*time.Time"
},
{
"name": "to",
"required": false,
"title": "To",
"type": "*time.Time"
},
{
"name": "resource",
"required": false,
"title": "Resource",
"type": "string"
},
{
"name": "action",
"required": false,
"title": "Action",
"type": "string"
},
{
"name": "actorID",
"required": false,
"title": "Filter by one or more actors",
"type": "[]string"
},
{
"name": "limit",
"title": "Limit",
"type": "uint"
},
{
"name": "offset",
"title": "Offset",
"type": "uint"
},
{
"name": "page",
"title": "Page number (1-based)",
"type": "uint"
},
{
"name": "perPage",
"title": "Returned items per page (default 50)",
"type": "uint"
}
]
}
}
]
}