AdminService Resource

Handle admin requests

GET /admin

Display finder statistics in HTML format. This end point uses the admin.ftl template to format the HTML

Request Parameters
name type description default constraints
Accept header - type of data requested, this determines if just data is returned or html    
divOnly query - if true will only return the div section for the finder data false boolean
finder query - which finder to get data for, 0 gets all finders 0 int
Response Body
media type data type description
application/json object (JSON) Finder data or HTML formatted finder data
text/html (custom)

Example

Request
GET /admin
Accept: application/json
Accept: ...

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /admin/cells

Response Body
media type data type
application/json IndexNameList (JSON)

Example

Request
GET /admin/cells
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "listEntries" : [ {
    "index" : 12345,
    "name" : "..."
  }, {
    "index" : 12345,
    "name" : "..."
  } ]
}
                
              

POST /admin/cells

Example

Request
POST /admin/cells

              
Response
HTTP/1.1 201 Created

              

GET /admin/health

Response Body
media type data type description
application/json string (JSON) String - giving health information about the finder
application/xml string (XML)

Example

Request
GET /admin/health
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /admin/live

Check if finder is alive (sanity check).

Response Body
media type data type description
application/json string (JSON) "yes"
application/xml string (XML)

Example

Request
GET /admin/live
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /admin/replicas

Get replicas data for just this system.

Request Parameters
name type description default constraints
Accept header    
divOnly query false boolean
Response Body
media type data type description
application/json object (JSON) HTML page with replicas statistics
text/html (custom)

Example

Request
GET /admin/replicas
Accept: application/json
Accept: ...

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /admin/volumes

Response Body
media type data type
application/json IndexNameList (JSON)

Example

Request
GET /admin/volumes
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "listEntries" : [ {
    "index" : 12345,
    "name" : "..."
  }, {
    "index" : 12345,
    "name" : "..."
  } ]
}
                
              

GET /admin/writable

Returns information on the write state of the finder.

Response Body
media type data type description
application/json string (JSON) String - containing the write information about the finder.
application/xml string (XML)

Example

Request
GET /admin/writable
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /admin/apids/{storageCellID}

Request Parameters
name type description
storageCellID path - storage cell to get catalog from
Response Body
media type data type description
application/json object (JSON) Response - Normal response information
application/xml anyType (XML)

Example

Request
GET /admin/apids/{storageCellID}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /admin/apidsperday/{date}

Request Parameters
name type description
date path - date for apid count
Response Body
media type data type description
application/familysearch+xml apidsByGroup (XML) ApidsByGroup - apids for the group
application/json ApidsByGroup (JSON)
application/xml apidsByGroup (XML)
text/xml apidsByGroup (XML)

Example

Request
GET /admin/apidsperday/{date}
Accept: application/familysearch+xml

              
Response
HTTP/1.1 200 OK
Content-Type: application/familysearch+xml

                
<apidsByGroup xmlns="http://digitalarchive.familysearch.org/v1">
  <apids>
    <group>...</group>
    <apids>...</apids>
  </apids>
  <startTS>...</startTS>
</apidsByGroup>

                
              

PUT /admin/cells/{cellname}

Updates the status for a storage cell.

Request Parameters
name type description
cellname path - name of the cell to update
status query - status to set it to. Should be one of 'up', 'down', 'offline'

Example

Request
PUT /admin/cells/{cellname}

              
Response
HTTP/1.1 204 No Content

              

GET /admin/db/connections

Response Body
media type data type
text/plain (custom)

Example

Request
GET /admin/db/connections
Accept: text/plain

              
Response
HTTP/1.1 200 OK
Content-Type: text/plain

                
...
                
              

DELETE /admin/db/pool

Request Parameters
name type description default
active query no
available query no

Example

Request
DELETE /admin/db/pool

              
Response
HTTP/1.1 204 No Content

              

GET /admin/db/pool

Return information about current Finder database connections

Request Parameters
name type description
Accept header
Response Body
media type data type description
application/json object (JSON) String. If no permission then return "null"
text/html (custom)

Example

Request
GET /admin/db/pool
Accept: application/json
Accept: ...

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /admin/modifications/{date}

Request Parameters
name type description
date path - date to get mods for.
Response Body
media type data type description
application/familysearch+xml stringList (XML) StringList - a list of modifications for the date in mind.
application/json StringList (JSON)
application/xml stringList (XML)
text/xml stringList (XML)

Example

Request
GET /admin/modifications/{date}
Accept: application/familysearch+xml

              
Response
HTTP/1.1 200 OK
Content-Type: application/familysearch+xml

                
<stringList xmlns="http://digitalarchive.familysearch.org/v1">
  <strings>...</strings>
</stringList>

                
              

GET /admin/moveapids/{storageCellID}

Request Parameters
name type description constraints
storageCellID path - cell to get the list from  
count query - number of artifacts to get int
Response Body
media type data type description
application/json ApidList (JSON) ApidList - artifacts to move.
application/xml apidList (XML)
text/xml apidList (XML)

Example

Request
GET /admin/moveapids/{storageCellID}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "apids" : [ "...", "..." ],
  "count" : 12345,
  "source" : "..."
}