Adds new REST API v2/

Addresses #5269
This commit is contained in:
Simone Mainardi 2021-07-08 09:57:46 +02:00
parent 1f24dec3e3
commit b117e8a23a
178 changed files with 6639 additions and 124 deletions

View file

@ -248,7 +248,7 @@ print [[
$(`#btn-generate_token`).click(async function(e) {
const user = $(`#input-username`).val() || loggedUser;
const response = await fetch(`${http_prefix}/lua/rest/v1/create/ntopng/api_token.lua`, {
const response = await fetch(`${http_prefix}/lua/rest/v2/create/ntopng/api_token.lua`, {
method: 'POST',
body: JSON.stringify({username: user, csrf: ']] print(ntop.getRandomCSRFValue()) print [['}),
headers: {