Personal tools

Ace:JSON Interface: Difference between revisions

From Adapt

Jump to: navigation, search
No edit summary
No edit summary
Line 1: Line 1:
The following functionality is visible through a JSON interface. To generate JSON output, append json=1 to the request on any supported servlet.
The following functionality is visible through a JSON interface. To generate JSON output, append json=1 to the request on any supported servlet.


''/Status''
==/Status==


Returns an overview of all collections in the current ACE installation
Returns an overview of all collections in the current ACE installation

Revision as of 21:50, 12 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 - 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
    }
  }
]}