Get |
---|
URL | /api/v1/api.php?target=log&action=get |
Description | Returns a list of log entries. Use optional parameters to filter the list. |
Returns | Examples: SUCCESSFUL | {"success":1,"message":"Search Successful.","data":[{"logId":"31568","time": "2012-05-07 17:44:43", "logLevel":"INFO","userId":"39","userName": "user@6connect.com","logCategory": "User","message": "User Doe (user@6connect.com) logged in via local authentication","ip":"107.111.0.228"}]} | ERROR | {'success':0, 'message':'error message'} |
Data Detail
| | | |
---|
log_id | INTEGER | 24 | Unique log entry id. | time | DATETIME | 2012-05-07 22:10:07 | Date and time year to second. | log_level | STRING | NOTICE | Standard syslog log levels in verbose format (EMERG, ALERT, CRIT, ERR, WARNING, NOTICE, INFO, DEBUG). | user_id | INTEGER | 11 | The unique user id associated with the log entry. | username | STRING | user@6connect.com | The unique user name associated with the log entry. | log_category | STRING | IPAM | The 6connect category for the log entry (User, IPAM, Resource Holder, DNS, Peering, Assistant, NTP, Reporting). | message | STRING | Created new children from 1.0.0.0/24 | The detailed log message. | ip | STRING | 107.111.0.228 | The remote IP address of the user who took the action being logged. |
|
Required Parameters | *There are no required parameters, but at least one optional parameter must be provided for the call to succeed. |
Optional Parameters | | | | |
---|
block_id | INTEGER | 310 | Id of the IPAM netblocks to which the logs belong
| get_attributes | BOOLEAN | 1 | Display the log attributes along with the log into the client's response. (The attributes for each log record). Valid values are 1 (true) and 0 (false). | log_id | INTEGER | 24 | Unique log entry id. | time_min | DATETIME | 2015-05-07 [21:00:00] | Retrieve logs starting at this Date and optional time year to second. | time_max | DATETIME | 2015-05-07 [22:00:00] | Retrieve logs ending at this Date and optional time year to second. | limit | INTEGER | 100 | Total log entries to retrieve. Default limit is 1000 records. | orderby | STRING | log_id | Order results by log_id, time, log_level | order | STRING | ASC | Order by ascending / descending (ASC / DESC). | offset | INTEGER | 50 | Offset from 0 to retrieve log entries | username | STRING | user@6connect.com | The unique user name associated with the log entry. | log_category | STRING | IPAM | The 6connect category for the log entry (User, IPAM, Resource Holder, DNS, Peering, Assistant, NTP, Reporting). | log_level | STRING | NOTICE | Standard syslog log levels in verbose format (EMERG, ALERT, CRIT, ERR, WARNING, NOTICE, INFO, DEBUG). | ip | STRING | 1.2.3.4 | The remote IP address of the user whose action was logged | search | STRING | Aggregate Added | Search for a string in the logs. It searches in 'message', 'username', 'time', 'ip' and 'log_category' | time | DATETIME | 2015-05-07 [21:00:00] | Search logs from a specific time. |
|
Example URL | /api/v1/api.php?target=log&action=get&block_id=310&order_by=log_id&order=DESC |