Api event user get logs

From Tygron Support wiki
Jump to navigation Jump to search

API Endpoint: api/event/user/get_logs/

Description: Get logs since a date.

Index Importance Type Description Values
0 OPTIONAL (String) Domain Name (optional, leave empty by default)
1 REQUIRED (Enumeration) Type BACKUP, JOBS, LOGINS, SECURITY, SESSIONS or USERS
2 REQUIRED (Integer number) Date in milliseconds

Response Codes

Response Code: Description
200 Log[] (Log array)
300-600 Codes Overview

Example POST

Curl example POST

curl 'https://engine.tygron.com/api/event/user/get_logs/' -H 'Content-Type: application/json' -H 'Authorization: Basic <credentials>' -d '[ "", "SESSIONS", 0 ]'

JavaScript example POST

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Basic <credentials>" },
 body: '[ "", "SESSIONS", 0 ]'
};
fetch("https://engine.tygron.com/api/event/user/get_logs/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));

See also