Ace:JSON Interface: Difference between revisions
From Adapt
No edit summary |
No edit summary |
||
| Line 72: | Line 72: | ||
} | } | ||
]} | ]} | ||
</pre> | |||
==/EventLog== | |||
Event log is a session away log servlet that can be used to query for log events. Events are attached to a collection, a particular invocation of an audit called a session, and to a particular item by path. | |||
'''Parameters''' | |||
* start - log entry id to start display at | |||
* count - number of results to return | |||
* toggletype - filter to toggle, one of 'errors','missing','newmaster','sync' | |||
* top | |||
* sessionId - sessionID to get events for, or set to 0 to clear | |||
* logpath - path to get events for, or set to empty to clear | |||
* collection - collection to retrieve events for, or set to 0 to clear | |||
* clear - set to 1 to reset any filters | |||
'''Output''' | |||
Log items along with current paging and query information for the log | |||
<pre> | |||
session - long, current session filter if any (opt) | |||
collection - long, current collection filter (opt) | |||
logpath - current path filter (opt) | |||
events : [ array containing log events | |||
id - long, numeric ID of log entry | |||
date - timestamp of entry | |||
session - long, session this entry belongs to | |||
type - type of log entry, complete list available at [Ace:Log Messages] | |||
collection - long, collection this entry is attached to (opt) | |||
path - path this item is attached to | |||
description - descriptive message for this entry | |||
] | |||
</pre> | |||
'''Example''' | |||
Revision as of 19:59, 14 January 2009
The following functionality is visible through a JSON interface. To generate JSON output, append json=1 to the request on any supported servlet.
/Status
Returns an overview of all collections in the current ACE installation
Parameters
- none
Output
A list containing the replication details for all collections is returned. Unless otherwise noted, all values are strings
collections : [ - array containing the following properties
id - numeric ID of collection (long)
name - descriptive name
directory - base directory
lastSync - date of last sync (Tue Sep 23 12:31:21 EDT 2008)
storage - string name for storage type
checkPeriod - int for number of days to check collection
proxyData - boolean, true if data may be proxied through ACE
auditTokens - boolean, should digests and tokens be audited along w/ files
state - char, current state of collection ....
totalFiles - long, number of files in collection
fileAuditRunning - boolean, true if a file audit is in progress
tokenAuditRunning - boolean, true if a token audit is in progress
The following objects will ONLY exist if a file or token audit is running
fileAudit : {
totalErrors - long, total number of errors encountered thus far
newFilesFound - long, new files found in collection
filesSeen - long, total files processes so far
lastFileSeen - last file processed
tokensAdded - long, new tokens issued during this audit
}
tokenAudit : {
totalErrors - long, total number of errors encountered thus far
tokensSeen - long, total number of digests/tokens loaded
validTokens - number of tokensa/digests validated against round summaries
}
]
Example
Invoking URL: http://localhost:8080/ace-am/Status?json=1
Output
{"collections": [
{
"id": 18,
"name": "3 layer, 10files, 50dirs",
"directory": "/",
"lastSync": "Wed Jan 07 12:25:54 EST 2009",
"storage": "benchmark",
"checkPeriod": 0,
"proxyData": false,
"auditTokens": false,
"state": "A",
"totalFiles": 1250000,
"fileAuditRunning": true,
"tokenAuditRunning": false,
"fileAudit": {
"totalErrors": 0,
"newFilesFound": 0,
"filesSeen": 161468,
"lastFileSeen": "/dir-6/dir-22/dir-46/file-7",
"tokensAdded": 0
}
}
]}
/EventLog
Event log is a session away log servlet that can be used to query for log events. Events are attached to a collection, a particular invocation of an audit called a session, and to a particular item by path.
Parameters
- start - log entry id to start display at
- count - number of results to return
- toggletype - filter to toggle, one of 'errors','missing','newmaster','sync'
- top
- sessionId - sessionID to get events for, or set to 0 to clear
- logpath - path to get events for, or set to empty to clear
- collection - collection to retrieve events for, or set to 0 to clear
- clear - set to 1 to reset any filters
Output
Log items along with current paging and query information for the log
session - long, current session filter if any (opt) collection - long, current collection filter (opt) logpath - current path filter (opt) events : [ array containing log events id - long, numeric ID of log entry date - timestamp of entry session - long, session this entry belongs to type - type of log entry, complete list available at [Ace:Log Messages] collection - long, collection this entry is attached to (opt) path - path this item is attached to description - descriptive message for this entry ]
Example