SNAC has two de facto APIs that serve data to the public interface.
-
http://socialarchive.iath.virginia.edu/snac/search
lucene query via XTF, in JSON or XML -
http://socialarchive.iath.virginia.edu/rex2/snac
Rexster Basic REST API with a custom kibble. Rexster Extensions are nicknamed "kibble".
And we have CORS headers set, so no need to JSONP it.
- do a search in the public interface and note the URL
/snac/search?text=fred§ionType=cpfdescription
SAMPLE QUERY for fred
-
add
&rmode=slickgrid
to the URL for JSON SAMPLE JSON forfred
-
add
&rmode=slickgrid&raw=1
to the URL for XML SAMPLE XML forfred
-
add
&startDoc=25
to go to the next page of results SAMPLE startDoc forfred
All read only parts of the Rexster REST API should work.
indexes can be accessed by key
, up-to-date list of key indices: /rex2/snac/keyindices
-
recordId
n2t.net ARK for the identity/rex2/snac/vertices?key=recordId&value=http://n2t.net/ark:/...
SAMPLErecordId
SEARCH -
identity
exact string match SAMPLEidentity
SEARCH -
sourceEADurlIndex
misnamed and unpopulated, need to populate for "related URIs/URLs," search to use in collection widget API for SNAC 2. [UN-POPULATED right now]
snac/theJit
in the URL means a custom kibble is applied to the base vertex/_id
. The output for this was designed to work with the javascript infovis toolkit's Radial Graph.
- you will need to look up the internal record
_id
using therecordId
index SAMPLErecordId
SEARCH
{
results:
{
_id: 2327314,
...
Note: This step can be removed if we migrate to a new graph wrapper in germlin. Right now, these internal _id
s will change between rebuilds of the graph.
- call rexster extension on that node
/rex2/snac/vertices/_id/snac/theJit
SAMPLE KIBBLE