CINXE.COM
Rest API Help - Social Networks and Archival Context
<!DOCTYPE html> <html> <head> <title>Rest API Help - Social Networks and Archival Context</title> <!-- JQuery --> <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css" integrity="sha384-aUGj/X2zp5rLCbBxumKTCw2Z50WgIr1vs/PFN4praOTvYXWlVyh2UtNUU0KAUhAX" crossorigin="anonymous"> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script> <!-- Select Upgrades --> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2-rc.1/css/select2.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2-rc.1/js/select2.min.js"></script> <link rel="stylesheet" href="https://snaccooperative.org/css/select2-bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- SNAC Styles --> <link rel="stylesheet" href="https://snaccooperative.org/css/snac.css?_=d4878f4ce077fa0a82d86d6ca6dc81a85faa5fc4"> <!-- SNAC Javascript --> <script src="https://snaccooperative.org/javascript/admin.js?_=d4878f4ce077fa0a82d86d6ca6dc81a85faa5fc4"></script> <script src="https://snaccooperative.org/javascript/save_actions.js?_=d4878f4ce077fa0a82d86d6ca6dc81a85faa5fc4"></script> <script src="https://snaccooperative.org/javascript/select_loaders.js?_=d4878f4ce077fa0a82d86d6ca6dc81a85faa5fc4"></script> <script src="https://snaccooperative.org/javascript/scripts.js?_=d4878f4ce077fa0a82d86d6ca6dc81a85faa5fc4"></script> <script src="https://snaccooperative.org/javascript/relation_search.js?_=d4878f4ce077fa0a82d86d6ca6dc81a85faa5fc4"></script> <script src="https://snaccooperative.org/javascript/html2canvas.js?_=d4878f4ce077fa0a82d86d6ca6dc81a85faa5fc4"></script> <script src="https://snaccooperative.org/javascript/feedback.js?_=d4878f4ce077fa0a82d86d6ca6dc81a85faa5fc4"></script> <script> $(document).ready(function() { // Use select2 to display the select dropdowns // rather than the HTML default $("select").each(function() { select_replace_simple($(this)); }); }); </script> <style> h2 { padding-top: 60px; } </style> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-CF5Y3HQ2TH"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CF5Y3HQ2TH'); </script> </head> <body role="document"> <script> var snacUrl = "https://snaccooperative.org"; var restUrl = "https://api.snaccooperative.org/"; var laravelUrl = "https://snaccooperative.org/v2"; </script> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand active" href="https://snaccooperative.org"><span class="snac-name-header">snac</span></a><!--<span class="snac-fullname-header"> | social networks and archival context</span>--> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="https://snaccooperative.org/search"><i class="fa fa-search" aria-hidden="true"></i> Search</a></li> <li><a href="https://snaccooperative.org/browse"><i class="fa fa-address-book" aria-hidden="true"></i> Browse</a></li> <li><a href="https://snaccooperative.org/vocab_administrator/resources"><i class="fa fa-book" aria-hidden="true" aria-label="Resource Descriptions"></i> <span class="navbar-hideable"> Resources</span></a></li> <!-- --> </ul> <div class="navbar-right"> <ul class="nav navbar-nav"> <li><a href="https://portal.snaccooperative.org/about"><i class="fa fa-info-circle" aria-hidden="true"></i> About</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-question-circle"></i> <span class="navbar-hideable"> Help</span> <span class="caret"></span> </a> <ul class="dropdown-menu"> <li><a href="https://snaccooperative.org/api_help"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Rest API Commands</a></li> <!-- --> <li role="separator" class="divider"></li> <li><a href="https://snaccooperative.org/contact"><i class="fa fa-fw fa-envelope" aria-hidden="true"></i> Contact Us</a></li> </ul> </li> <!-- --> <li><a href="https://snaccooperative.org/login?r=https%3A%2F%2Fsnaccooperative.org%2Fapi_help"><i class="fa fa-sign-in"></i> Login</a></li> <!-- --> </ul> </div> </div><!--/.nav-collapse --> </div> </nav> <div class="container snac" role="main"> <h1>Rest API Commands</h1> <div class="row"> <div class="col-md-12"> <p>The following commands may be given as JSON <code>PUT</code> requests to the SNAC RestFUL API. Most read-only API commands may be called without login, however anything that causes changes in the data require a <code>user</code> object which includes a temporary API key. For examples using the RestFUL API in PHP and Java, view the <a href="https://github.com/snac-cooperative/Rest-API-Examples">SNAC RestAPI Examples Repository</a> on GitHub. </div> </div> <div class="row"> <div class="col-md-12"> <h3 id="toc">Table of Contents</h3> <div class="row"> <div class="col-md-4"> <ul> <li>Discovery <ul> <li><a href="#recently_published">List Recently Published</a></li> <li><a href="#random_constellations">List Random Constellations</a></li> <li><a href="#list_constellations">List Constellations</a></li> <li><a href="#search">Search Constellations</a></li> <li><a href="#browse">Browse Constellations</a></li> <li><a href="#elastic">Elastic Search Query</a></li> </ul> </li> <li>Reconciliation <ul> <li><a href="#reconcile">Reconcile Against SNAC</a></li> </ul> </li> <li>Constellation Views <ul> <li><a href="#constellation_history">Get Constellation History</a></li> <li><a href="#download_constellation">Download Constellation</a></li> <li><a href="#constellation_list_maybesame">List Maybe-Same Constellations</a></li> <li><a href="#constellation_diff">Compute Constellation Diff</a></li> <li><a href="#read">Read Constellation</a></li> </ul> </li> </ul> </div> <div class="col-md-4"> <ul> <li>Constellation Modifications <ul> <li><a href="#insert_constellation">Insert New Constellation</a></li> <li><a href="#insert_and_publish_constellation">Insert And Publish New Constellation</a></li> <li><a href="#update_constellation">Update Constellation</a></li> <li><a href="#publish_constellation">Publish Constellation</a></li> <li><a href="#unlock_constellation">Unlock Constellation</a></li> <li><a href="#review_constellation">Send Constellation for Review</a></li> <li><a href="#delete_constellation">Delete Constellation</a></li> <li><a href="#reassign_constellation">Reassign Constellation to Another User</a></li> <li><a href="#constellation_add_maybesame">Add Maybe-Same Constellation Assertions</a></li> <li><a href="#constellation_diff_merge">Compute Constellation Diff and Set Merge</a></li> <li><a href="#constellation_merge">Merge Constellations</a></li> <li><a href="#constellation_auto_merge">Automatically Merge Constellations</a></li> <li><a href="#edit">Edit Constellation</a></li> <li><a href="#add_sameas">Add external links to a constellation</a></li> </ul> </li> </ul> </div> <div class="col-md-4"> <ul> <li>Vocabulary Operations <ul> <li><a href="#vocabulary">Search Vocabulary</a></li> <li><a href="#read_vocabulary">Read Vocabulary Term</a></li> </ul> </li> <li>Resource Operations <ul> <li><a href="#insert_resource">Insert Resource</a></li> <li><a href="#read_resource">Read Resource</a></li> <li><a href="#resource_search">Search Resources</a></li> <li><a href="#delete_resource">Delete Resource</a></li> <li><a href="#get_holdings">Get Holdings</a></li> <li><a href="#shared_resources">Shared Resources</a></li> </ul> </li> <li>User Operations <ul> <li><a href="#user_information">Get User Information</a></li> </ul> </li> </ul> </div> </div> <div class="row"> <div class="col-xs-12"> <h3>API Connection Information</h3> <p>The SNAC RestAPI is available at the following URL.</p> <div class="well well-lg text-center"> <p><strong>https://api.snaccooperative.org/</strong></p> </div> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <h2 id="vocabulary">Search Vocabulary</h2> <div class="row"> <div class="col-md-12"> <p>Search through the controlled vocabulary.</p> <!-- <h4>Examples</h4> <h5>Direct Term Read</h5> <p>When requesting to find only one term by id, this call returns that exact term, if it exists.</p> <h6>Query:</h6> <pre>{ "command": "vocabulary", "term_id": 700 }</pre> <h6>Response:</h6> <pre>{ "term": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "result": "success", "timing": 9.12 }</pre> <h5>Search for Term</h5> <p>Being provided with a query string, the search method returns a list of matching results.</p> <h6>Query:</h6> <pre>{ "command": "vocabulary", "query_string": "person", "type": "entity_type", "entity_type": null }</pre> <h6>Response:</h6> <pre>{ "results": [ { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type", "description": null } ], "timing": 10.91 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>vocabulary</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>term_id</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Term ID, if known. If given a term id, that vocabulary term is directly returned.</p> <p><code>query_string</code>: String </p> <p style="margin-left: 15px">Search string to find in the vocabulary list</p> <p><code>type</code>: String </p> <p style="margin-left: 15px">Type of the vocabulary to search, ex: subject, activity, occupation, geo_place, ...</p> <p><code>entity_type</code>: Integer|Null </p> <p style="margin-left: 15px">Entity type ID to filter vocabulary, if known</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>results</code>: Array of Objects</p> <p style="margin-left: 15px">Array of SNAC Term Objects matching the requested query string</p> <p><code>term</code>: Object</p> <p style="margin-left: 15px">SNAC Term Object of the requested term, if term_id was searched</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Direct Term Read</h4> <p>When requesting to find only one term by id, this call returns that exact term, if it exists.</p> <h5>Query:</h5> <pre>{ "command": "vocabulary", "term_id": 700 }</pre> <h5>Response:</h5> <pre>{ "term": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "result": "success", "timing": 9.12 }</pre> <h4>Search for Term</h4> <p>Being provided with a query string, the search method returns a list of matching results.</p> <h5>Query:</h5> <pre>{ "command": "vocabulary", "query_string": "person", "type": "entity_type", "entity_type": null }</pre> <h5>Response:</h5> <pre>{ "results": [ { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type", "description": null } ], "timing": 10.91 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="read_vocabulary">Read Vocabulary Term</h2> <div class="row"> <div class="col-md-12"> <p>Read a particular controlled vocabulary term.</p> <!-- <h4>Examples</h4> <h5>Read Vocabulary Term</h5> <p>When requesting to find only one term by id, this call returns that exact term, if it exists.</p> <h6>Query:</h6> <pre>{ "command": "read_vocabulary", "term_id": 700 }</pre> <h6>Response:</h6> <pre>{ "term": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "result": "success", "timing": 9.12 }</pre> <h5>Read Geo Vocabulary Term</h5> <p>If type is set to geoPlace, this will read geographic terms.</p> <h6>Query:</h6> <pre>{ "command": "read_vocabulary", "type": "geoPlace", "term_id": 2358 }</pre> <h6>Response:</h6> <pre>{ "term": { "id": "2358", "uri": "https:\/\/www.geonames.org\/4752031", "name": "Charlottesville", "latitude": "38.0293100", "longitude": "-78.4766800", "administrationCode": "VA", "countryCode": "US" }, "result": "success", "timing": 141.15 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>read_vocabulary</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>term_id</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Term ID, if known. If given a term id, that vocabulary term is directly returned.</p> <p><code>type</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Type of the vocabulary to search.</p> <p><code>term_value</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">The value of the vocabulary to search.</p> <p><code>uri</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">The unique URI of the vocabulary to search.</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>term</code>: Object</p> <p style="margin-left: 15px">SNAC Term Object of the requested term</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Read Vocabulary Term</h4> <p>When requesting to find only one term by id, this call returns that exact term, if it exists.</p> <h5>Query:</h5> <pre>{ "command": "read_vocabulary", "term_id": 700 }</pre> <h5>Response:</h5> <pre>{ "term": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "result": "success", "timing": 9.12 }</pre> <h4>Read Geo Vocabulary Term</h4> <p>If type is set to geoPlace, this will read geographic terms.</p> <h5>Query:</h5> <pre>{ "command": "read_vocabulary", "type": "geoPlace", "term_id": 2358 }</pre> <h5>Response:</h5> <pre>{ "term": { "id": "2358", "uri": "https:\/\/www.geonames.org\/4752031", "name": "Charlottesville", "latitude": "38.0293100", "longitude": "-78.4766800", "administrationCode": "VA", "countryCode": "US" }, "result": "success", "timing": 141.15 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="reconcile">Reconcile Against SNAC</h2> <div class="row"> <div class="col-md-12"> <p>Reconcile a given constellation against all constellations in SNAC, returning the top results.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "reconcile", "constellation": { "dataType": "Constellation", "entityType": { "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Tubman, Harriet, 1820-1913", "preferenceScore": 1 } ] } }</pre> <h6>Response:</h6> <pre>{ "reconciliation": [ { "strength": 43.514907186098, "identity": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6ms4s8z", "entityType": { "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Tubman, Harriet, 1820?-1913" } ], "id": 17796401 }, "vector": { "ElasticOriginalNameEntry": 9.020508, "ElasticNameOnly": 9.020508, "ElasticSeventyFive": 9.020508, "MultiStage:ElasticNameOnly:SNACDegree": 13.195286648076, "EntityTypeFilter": 0, "OriginalLength": 3.2580965380215 }, "properties": { "degree": 14 } }, { "strength": 14.443286538021, "identity": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6pz9nbf", "entityType": { "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Tubman, Harriet, 1815?-1913." } ], "id": 49248679 }, "vector": { "ElasticOriginalNameEntry": 5.592595, "ElasticSeventyFive": 5.592595, "EntityTypeFilter": 0, "OriginalLength": 3.2580965380215 }, "properties": { "degree": 1 } }, { "...": "..." } ], "result": "success", "timing": 200.33 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>reconcile</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Constellation object filled with as much information as known about the identity.</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>reconciliation</code>: Array of Objects</p> <p style="margin-left: 15px">A list of reconciliation objects, including strength of the match, the Constellation matched, and a vector of individual scores that comprise the match strength.</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "reconcile", "constellation": { "dataType": "Constellation", "entityType": { "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Tubman, Harriet, 1820-1913", "preferenceScore": 1 } ] } }</pre> <h5>Response:</h5> <pre>{ "reconciliation": [ { "strength": 43.514907186098, "identity": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6ms4s8z", "entityType": { "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Tubman, Harriet, 1820?-1913" } ], "id": 17796401 }, "vector": { "ElasticOriginalNameEntry": 9.020508, "ElasticNameOnly": 9.020508, "ElasticSeventyFive": 9.020508, "MultiStage:ElasticNameOnly:SNACDegree": 13.195286648076, "EntityTypeFilter": 0, "OriginalLength": 3.2580965380215 }, "properties": { "degree": 14 } }, { "strength": 14.443286538021, "identity": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6pz9nbf", "entityType": { "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Tubman, Harriet, 1815?-1913." } ], "id": 49248679 }, "vector": { "ElasticOriginalNameEntry": 5.592595, "ElasticSeventyFive": 5.592595, "EntityTypeFilter": 0, "OriginalLength": 3.2580965380215 }, "properties": { "degree": 1 } }, { "...": "..." } ], "result": "success", "timing": 200.33 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="user_information">Get User Information</h2> <div class="row"> <div class="col-md-12"> <p>Returns the information for the given user, including information for Constellations locked to the user.</p> <!-- <h4>Examples</h4> <h5>Get Current User Information</h5> <p></p> <h6>Query:</h6> <pre>{ "command": "user_information", "user": { "...": "..." } }</pre> <h6>Response:</h6> <pre>{ "result": "success", "user": { "userid": "123456", "userName": "...", "firstName": "John", "lastName": "Smith", "fullName": "John Smith", "email": "doctor@example.com", "active": true, "affiliation": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6xq0t7h", "entityType": { "id": "698", "term": "corporateBody", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#CorporateBody", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "University of Virginia", "preferenceScore": "99", "id": "18618207", "version": "2717174" } ], "id": "18614776", "version": "2717175" }, "token": { "access_token": "...", "expires": 1516245251 }, "roleList": [ { "privilegeList": [ { "dataType": "privilege", "id": "1", "label": "Edit", "description": "Edit constellations" }, { "...": "..." } ] } ], "groups": [ { "...": "..." } ], "messages": [ { "...": "..." } ], "editing": [ { "id": "47758348", "version": "11244077", "nameEntry": "Feuerbach, Ludwig, 1804-1872" } ], "editing_lock": [ { "id": "50774384", "version": "11243966", "nameEntry": "Karr, Gary, 1941-...." } ], "review_lock": [ { "id": "45808987", "version": "11244000", "nameEntry": "Koresh, 1838-1908" } ], "review": [ { "...": "..." } ], "recent": [ { "...": "..." } ], "timing": 25.678 } }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>user_information</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>user</code>: Object </p> <p style="margin-left: 15px">User object</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>user</code>: Object</p> <p style="margin-left: 15px">Full user object with name, affiliation Constellation, role and privilege list</p> <p><code>groups</code>: Array of Objects</p> <p style="margin-left: 15px">List of Group objects to which the user belongs</p> <p><code>messages</code>: Array of Objects</p> <p style="margin-left: 15px">Unread messages sent to this user</p> <p><code>editing</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified objects of {id, version, nameEntry} of the Constellations this user has checked out</p> <p><code>editing_lock</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified objects of {id, version, nameEntry} of the Constellations this user is currently editing (locked)</p> <p><code>review</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified objects of {id, version, nameEntry} of the Constellations sent for review to any reviewer</p> <p><code>review_lock</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified objects of {id, version, nameEntry} of the Constellations sent for review (locked) to this user</p> <p><code>recent</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified objects of {id, version, nameEntry} of the Constellations recently published by this user</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Get Current User Information</h4> <p></p> <h5>Query:</h5> <pre>{ "command": "user_information", "user": { "...": "..." } }</pre> <h5>Response:</h5> <pre>{ "result": "success", "user": { "userid": "123456", "userName": "...", "firstName": "John", "lastName": "Smith", "fullName": "John Smith", "email": "doctor@example.com", "active": true, "affiliation": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6xq0t7h", "entityType": { "id": "698", "term": "corporateBody", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#CorporateBody", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "University of Virginia", "preferenceScore": "99", "id": "18618207", "version": "2717174" } ], "id": "18614776", "version": "2717175" }, "token": { "access_token": "...", "expires": 1516245251 }, "roleList": [ { "privilegeList": [ { "dataType": "privilege", "id": "1", "label": "Edit", "description": "Edit constellations" }, { "...": "..." } ] } ], "groups": [ { "...": "..." } ], "messages": [ { "...": "..." } ], "editing": [ { "id": "47758348", "version": "11244077", "nameEntry": "Feuerbach, Ludwig, 1804-1872" } ], "editing_lock": [ { "id": "50774384", "version": "11243966", "nameEntry": "Karr, Gary, 1941-...." } ], "review_lock": [ { "id": "45808987", "version": "11244000", "nameEntry": "Koresh, 1838-1908" } ], "review": [ { "...": "..." } ], "recent": [ { "...": "..." } ], "timing": 25.678 } }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="insert_constellation">Insert New Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Insert a new Constellation into SNAC. The Constellation must have the operation flags set to "insert".</p> <!-- <h4>Examples</h4> <h5>Insert a simple Constellation</h5> <p>Inserting a Constellation with only one nameEntry</p> <h6>Query:</h6> <pre>{ "command": "insert_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "operation": "insert", "entityType": { "dataType": "Term", "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": 99, "operation": "insert", "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "operation": "insert", "order": 0, "type": { "id": 400228 } } ] } ] }, "message": "Example insert message." }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "status": "locked editing", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": 99, "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "type": { "id": 400228 }, "id": "76813081", "version": "11244084", "operation": "insert" } ], "id": "76813080", "version": "11244084", "operation": "insert" } ], "id": "76813079", "version": "11244085", "operation": "insert" }, "result": "success", "timing": 686.91 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Edit </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>insert_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Full Constellation object</p> <p><code>message</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">A commit message</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Insert a simple Constellation</h4> <p>Inserting a Constellation with only one nameEntry</p> <h5>Query:</h5> <pre>{ "command": "insert_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "operation": "insert", "entityType": { "dataType": "Term", "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": 99, "operation": "insert", "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "operation": "insert", "order": 0, "type": { "id": 400228 } } ] } ] }, "message": "Example insert message." }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "status": "locked editing", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": 99, "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "type": { "id": 400228 }, "id": "76813081", "version": "11244084", "operation": "insert" } ], "id": "76813080", "version": "11244084", "operation": "insert" } ], "id": "76813079", "version": "11244085", "operation": "insert" }, "result": "success", "timing": 686.91 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="insert_and_publish_constellation">Insert And Publish New Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Insert a new Constellation into SNAC. The Constellation must have the operation flags set to "insert".</p> <!-- <h4>Examples</h4> <h5>Insert a simple Constellation</h5> <p>Inserting a Constellation with only one nameEntry</p> <h6>Query:</h6> <pre>{ "command": "insert_and_publish_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "operation": "insert", "entityType": { "dataType": "Term", "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": 99, "operation": "insert", "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "operation": "insert", "order": 0, "type": { "id": 400228 } } ] } ] }, "message": "Example insert message." }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "status": "published", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": 99, "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "type": { "id": 400228 }, "id": "76813081", "version": "11244084", "operation": "insert" } ], "id": "76813080", "version": "11244084", "operation": "insert" } ], "id": "76813079", "version": "11244085", "operation": "insert" }, "result": "success", "timing": 686.91 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Publish </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>insert_and_publish_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Full Constellation object</p> <p><code>message</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">A commit message</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Insert a simple Constellation</h4> <p>Inserting a Constellation with only one nameEntry</p> <h5>Query:</h5> <pre>{ "command": "insert_and_publish_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "operation": "insert", "entityType": { "dataType": "Term", "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": 99, "operation": "insert", "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "operation": "insert", "order": 0, "type": { "id": 400228 } } ] } ] }, "message": "Example insert message." }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "status": "published", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": 99, "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "type": { "id": 400228 }, "id": "76813081", "version": "11244084", "operation": "insert" } ], "id": "76813080", "version": "11244084", "operation": "insert" } ], "id": "76813079", "version": "11244085", "operation": "insert" }, "result": "success", "timing": 686.91 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="update_constellation">Update Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Updates SNAC's copy of the given Constellation with this one. Any components with operation flags set to "update" will be overwritten with the new version.</p> <!-- <h4>Examples</h4> <h5>Update a simple Constellation</h5> <p>Update a Constellation with only one nameEntry</p> <h6>Query:</h6> <pre>{ "command": "update_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085", "entityType": { "dataType": "Term", "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244084", "operation": "update" } ] }, "message": "Example update message." }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "status": "locked editing", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244089", "operation": "update" } ], "id": "76813079", "version": "11244089" }, "result": "success", "timing": 583.96 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Edit </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>update_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Full Constellation object, with current ids and versions (the result of calling edit)</p> <p><code>message</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">A commit message</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Update a simple Constellation</h4> <p>Update a Constellation with only one nameEntry</p> <h5>Query:</h5> <pre>{ "command": "update_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085", "entityType": { "dataType": "Term", "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244084", "operation": "update" } ] }, "message": "Example update message." }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "status": "locked editing", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244089", "operation": "update" } ], "id": "76813079", "version": "11244089" }, "result": "success", "timing": 583.96 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="publish_constellation">Publish Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Publishes the given Constellation in SNAC. This does not make any updates to the Constellation data in SNAC.</p> <!-- <h4>Examples</h4> <h5>Publish a Constellation</h5> <p>When publishing, only the bare Constellation object is required to perform the publish.</p> <h6>Query:</h6> <pre>{ "command": "publish_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" }, "message": "Example publish message." }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Publish </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>publish_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Full Constellation object, with current ids and versions (the result of calling edit)</p> <p><code>message</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">A commit message</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Publish a Constellation</h4> <p>When publishing, only the bare Constellation object is required to perform the publish.</p> <h5>Query:</h5> <pre>{ "command": "publish_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" }, "message": "Example publish message." }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="unlock_constellation">Unlock Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Drops the lock on the given Constellation from "currently editing" down to simply locked to the user.</p> <!-- <h4>Examples</h4> <h5>Unlock a Constellation</h5> <p>When unlocking, only the bare Constellation object is required to perform the unlock.</p> <h6>Query:</h6> <pre>{ "command": "unlock_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" } }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Edit </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>unlock_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Constellation object with current ID and Version number</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Unlocked Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Unlock a Constellation</h4> <p>When unlocking, only the bare Constellation object is required to perform the unlock.</p> <h5>Query:</h5> <pre>{ "command": "unlock_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" } }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="review_constellation">Send Constellation for Review</h2> <div class="row"> <div class="col-md-12"> <p>Sends the given Constellation in SNAC for review. This does not make any updates to the Constellation data in SNAC. If a reviewer is specified, this query will put the Constellation in that user's review queue. If no reviewer is specified, the Constellation will go for general review.</p> <!-- <h4>Examples</h4> <h5>Sending for Review</h5> <p>When sending for review, only the bare Constellation object is required to perform the request.</p> <h6>Query:</h6> <pre>{ "command": "review_constellation", "apikey": "...", "reviewer": { "...": "..." }, "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" }, "message": "Please look over my name headings and biogHist entry" }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Edit </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>review_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>reviewer</code>: Object <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">User object of the intended reviewer</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Constellation object with at least current ID and Version</p> <p><code>message</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">A message for the reviewer</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Sending for Review</h4> <p>When sending for review, only the bare Constellation object is required to perform the request.</p> <h5>Query:</h5> <pre>{ "command": "review_constellation", "apikey": "...", "reviewer": { "...": "..." }, "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" }, "message": "Please look over my name headings and biogHist entry" }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="delete_constellation">Delete Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Deletes the given Constellation from SNAC. This does not make any updates to the Constellation data in SNAC before deleting.</p> <!-- <h4>Examples</h4> <h5>Delete a Constellation</h5> <p>When deleting, only the bare Constellation object is required to perform the request.</p> <h6>Query:</h6> <pre>{ "command": "delete_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" } }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Delete </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>delete_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Constellation object to delete with at least current ID and Version</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object deleted</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Delete a Constellation</h4> <p>When deleting, only the bare Constellation object is required to perform the request.</p> <h5>Query:</h5> <pre>{ "command": "delete_constellation", "apikey": "...", "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" } }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="reassign_constellation">Reassign Constellation to Another User</h2> <div class="row"> <div class="col-md-12"> <p>Reassigns the given Constellation to a different user, i.e. changes which user to which the Constellation is locked. This does not make any updates to the Constellation data in SNAC.</p> <!-- <h4>Examples</h4> <h5>Reassign Constellation</h5> <p>When reassigning a Constellation, only the bare Constellation object is required to perform the request.</p> <h6>Query:</h6> <pre>{ "command": "reassign_constellation", "apikey": "...", "to_user": { "...": "..." }, "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" } }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Change Locks </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>reassign_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Constellation object to assign, with at least current ID and Version</p> <p><code>to_user</code>: Object </p> <p style="margin-left: 15px">User object for the user to whom the Constellation should be assigned</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Reassign Constellation</h4> <p>When reassigning a Constellation, only the bare Constellation object is required to perform the request.</p> <h5>Query:</h5> <pre>{ "command": "reassign_constellation", "apikey": "...", "to_user": { "...": "..." }, "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244085" } }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "id": "76813079", "version": "11244089" }, "result": "success", "timing": 283.96 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="recently_published">List Recently Published</h2> <div class="row"> <div class="col-md-12"> <p>Returns a list of the most recently published Constellations in SNAC.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "recently_published" }</pre> <h6>Response:</h6> <pre>{ "constellation": [ { "dataType": "Constellation", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZICtRNdP", "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)" } ], "id": 76813079 }, { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6zk9rbc", "nameEntries": [ { "dataType": "NameEntry", "original": "100 Black Men of America, Inc." } ], "id": 19735756 }, { "...": "..." } ], "result": "success", "timing": 1778.94 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>recently_published</code></p></td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified Constellation objects {id, ark, nameEntry} of the recently published Constellations</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "recently_published" }</pre> <h5>Response:</h5> <pre>{ "constellation": [ { "dataType": "Constellation", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZICtRNdP", "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)" } ], "id": 76813079 }, { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6zk9rbc", "nameEntries": [ { "dataType": "NameEntry", "original": "100 Black Men of America, Inc." } ], "id": 19735756 }, { "...": "..." } ], "result": "success", "timing": 1778.94 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="random_constellations">List Random Constellations</h2> <div class="row"> <div class="col-md-12"> <p>Returns a random subset of the Constellations in SNAC.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "random_constellations" }</pre> <h6>Response:</h6> <pre>{ "constellation": [ { "dataType": "Constellation", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZICtRNdP", "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)" } ], "id": 76813079 }, { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6zk9rbc", "nameEntries": [ { "dataType": "NameEntry", "original": "100 Black Men of America, Inc." } ], "id": 19735756 }, { "...": "..." } ], "result": "success", "timing": 1778.94 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>random_constellations</code></p></td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified Constellation objects {id, ark, nameEntry} of random Constellations</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "random_constellations" }</pre> <h5>Response:</h5> <pre>{ "constellation": [ { "dataType": "Constellation", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZICtRNdP", "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)" } ], "id": 76813079 }, { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6zk9rbc", "nameEntries": [ { "dataType": "NameEntry", "original": "100 Black Men of America, Inc." } ], "id": 19735756 }, { "...": "..." } ], "result": "success", "timing": 1778.94 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="list_constellations">List Constellations</h2> <div class="row"> <div class="col-md-12"> <p>Returns a list of Constellations based on the query parameters. By default, it will return a subset of published Constellations. If a user object is supplied, additional statuses are allowed to be queried, including "needs review" for all Constellations needing review.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "list_constellations" }</pre> <h6>Response:</h6> <pre>{ "results": [ { "id": "76806764", "version": "11243376", "nameEntry": "100 Black Men of Charleston, Inc." }, { "id": "32319", "version": "11243333", "nameEntry": "Atlantic Yacht Club" }, { "id": "1960345", "version": "11243501", "nameEntry": "Boardman, Mabel Thorp, 1860-1946" }, { "...": "..." } ], "timing": 62303.38 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Change Locks </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>list_constellations</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>status</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Status of Constellations to return. Currently supported: "published" (default) and "needs review"</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>results</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified objects of {id, version, nameEntry} of the Constellations matching the query</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "list_constellations" }</pre> <h5>Response:</h5> <pre>{ "results": [ { "id": "76806764", "version": "11243376", "nameEntry": "100 Black Men of Charleston, Inc." }, { "id": "32319", "version": "11243333", "nameEntry": "Atlantic Yacht Club" }, { "id": "1960345", "version": "11243501", "nameEntry": "Boardman, Mabel Thorp, 1860-1946" }, { "...": "..." } ], "timing": 62303.38 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="constellation_history">Get Constellation History</h2> <div class="row"> <div class="col-md-12"> <p>Returns the edit history of the given Constellation.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "constellation_history", "constellationid": 76813079 }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244089" } ], "id": "76813079", "version": "11244089" }, "history": [ { "date": "2017-04-19T10:34:47", "userName": "user@gmail.com", "fullName": "Example User", "version": "11244089", "status": "published", "note": "" }, { "date": "2016-08-19T20:59:47", "userName": "system@localhost", "fullName": "System Service", "version": "11223504", "status": "published", "note": "" }, { "date": "2016-08-19T20:59:47", "userName": "system@localhost", "fullName": "System Service", "version": "11223502", "status": "ingest cpf", "note": "", "data": { "maintenanceStatus": { "id": "7656", "term": "revised" }, "maintenanceAgency": "SNAC: Social Networks and Archival Context Project", "maintenanceEvents": [ { "dataType": "MaintenanceEvent", "eventType": { "id": "704", "term": "revised" }, "eventDateTime": "2015-09-18", "agentType": { "id": "687", "term": "machine" }, "agent": "CPF merge program", "eventDescription": "Merge v2.0" } ], "sameAsRelations": [ { "dataType": "SameAs", "type": { "id": 28224, "term": "MergedRecord", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#MergedRecord" }, "uri": "OCLC-TXG-6843155.r02", "id": "76757792", "version": "11223503" } ] } } ], "timing": 278.9 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>constellation_history</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>constellationid</code>: Integer </p> <p style="margin-left: 15px">Constellation ID</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full current Constellation Object</p> <p><code>history</code>: Array of Objects</p> <p style="margin-left: 15px">List of history objects, in reverse order, describing what has happened to the Constellation through the current version.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "constellation_history", "constellationid": 76813079 }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244089" } ], "id": "76813079", "version": "11244089" }, "history": [ { "date": "2017-04-19T10:34:47", "userName": "user@gmail.com", "fullName": "Example User", "version": "11244089", "status": "published", "note": "" }, { "date": "2016-08-19T20:59:47", "userName": "system@localhost", "fullName": "System Service", "version": "11223504", "status": "published", "note": "" }, { "date": "2016-08-19T20:59:47", "userName": "system@localhost", "fullName": "System Service", "version": "11223502", "status": "ingest cpf", "note": "", "data": { "maintenanceStatus": { "id": "7656", "term": "revised" }, "maintenanceAgency": "SNAC: Social Networks and Archival Context Project", "maintenanceEvents": [ { "dataType": "MaintenanceEvent", "eventType": { "id": "704", "term": "revised" }, "eventDateTime": "2015-09-18", "agentType": { "id": "687", "term": "machine" }, "agent": "CPF merge program", "eventDescription": "Merge v2.0" } ], "sameAsRelations": [ { "dataType": "SameAs", "type": { "id": 28224, "term": "MergedRecord", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#MergedRecord" }, "uri": "OCLC-TXG-6843155.r02", "id": "76757792", "version": "11223503" } ] } } ], "timing": 278.9 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="download_constellation">Download Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Returns the full Constellation in the requested format. To perform a direct download, without JSON wrapping, submit a request to the webUI interface, <code>https://snaccooperative.org/download/{constellationid}?type={type}</code> or <code>https://snaccooperative.org/download?arkid={ark}&type={type}</code>.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "download_constellation", "constellationid": 76813079, "type": "eac-cpf" }</pre> <h6>Response:</h6> <pre>{ "file": { "mime-type": "text\/xml", "filename": "99999-ZICtRNdP.xml", "content": "... BASE64 ..." }, "timing": 399.35 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>download_constellation</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>constellationid</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Constellation ID for Constellation to read</p> <p><code>version</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Version of the Constellation to read</p> <p><code>type</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">What type of file to return: constellation_json or eac_cpf.</p> <p><code>arkid</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">ARK ID for Constellation to read, of the form 'http://n2t.net/ark:/99166/xxxxxxxx'</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>file</code>: Object</p> <p style="margin-left: 15px">File information object, including mime-type, filename, and base64-encoded content of the file.</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "download_constellation", "constellationid": 76813079, "type": "eac-cpf" }</pre> <h5>Response:</h5> <pre>{ "file": { "mime-type": "text\/xml", "filename": "99999-ZICtRNdP.xml", "content": "... BASE64 ..." }, "timing": 399.35 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="constellation_list_maybesame">List Maybe-Same Constellations</h2> <div class="row"> <div class="col-md-12"> <p>Returns a list of Constellations denoted as maybe-same-as the given Constellation. If the user object is given, it will contain mergeable flags to denote if the user has permission to merge any of the Constellations.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "constellation_list_maybesame", "apikey": "...", "constellationid": 66598997 }</pre> <h6>Response:</h6> <pre>{ "mergeable": true, "constellation": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6rf67f4", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Slemp, C. Bascom (Campbell Bascom), 1870-1943", "preferenceScore": "99", "id": "66599026", "version": "9740651" } ], "biogHists": [ { "dataType": "BiogHist", "text": "...", "id": "66598998", "version": "9740651" } ], "id": 66598997, "version": "9740652" }, "maybe_same": [ { "constellation": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6k219nd", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Slemp, C. B.", "preferenceScore": "1", "id": "15919565", "version": "2323442" } ], "id": "15919563", "version": "2323443" }, "mergeable": true }, { "constellation": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6wj8g41", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Slemp, Bascom", "preferenceScore": "1", "id": "68374832", "version": "9995489" } ], "id": "68374830", "version": "9995490" }, "mergeable": true } ], "timing": 539.29 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>constellation_list_maybesame</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellationid</code>: Integer </p> <p style="margin-left: 15px">Constellation ID</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>mergeable</code>: Boolean</p> <p style="margin-left: 15px">Boolean value denoting whether the Constellations can be merged by this user</p> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Summary Constellation Object of the requested Constellation</p> <p><code>maybe_same</code>: Array of Objects</p> <p style="margin-left: 15px">Array of objects, each containing a "mergeable" flag and a Constellation Object of the Constellation asserted to be the maybe the same.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "constellation_list_maybesame", "apikey": "...", "constellationid": 66598997 }</pre> <h5>Response:</h5> <pre>{ "mergeable": true, "constellation": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6rf67f4", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Slemp, C. Bascom (Campbell Bascom), 1870-1943", "preferenceScore": "99", "id": "66599026", "version": "9740651" } ], "biogHists": [ { "dataType": "BiogHist", "text": "...", "id": "66598998", "version": "9740651" } ], "id": 66598997, "version": "9740652" }, "maybe_same": [ { "constellation": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6k219nd", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Slemp, C. B.", "preferenceScore": "1", "id": "15919565", "version": "2323442" } ], "id": "15919563", "version": "2323443" }, "mergeable": true }, { "constellation": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6wj8g41", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Slemp, Bascom", "preferenceScore": "1", "id": "68374832", "version": "9995489" } ], "id": "68374830", "version": "9995490" }, "mergeable": true } ], "timing": 539.29 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="constellation_add_maybesame">Add Maybe-Same Constellation Assertions</h2> <div class="row"> <div class="col-md-12"> <p>Makes a maybe-same assertion between the constellations specified.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "constellation_add_maybesame", "apikey": "...", "constellationids": [ 123456, 987654, 626505 ], "assertion": "These three all have the same name and come from the same holding institution" }</pre> <h6>Response:</h6> <pre>{ "result": "success", "timing": 246.13 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>constellation_add_maybesame</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>assertion</code>: String </p> <p style="margin-left: 15px">User's assertion statement about the similarity of these Constellations</p> <p><code>constellationids</code>: Array of Integers </p> <p style="margin-left: 15px">2 or more Constellation IDs to assert as maybe_same</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the merge succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "constellation_add_maybesame", "apikey": "...", "constellationids": [ 123456, 987654, 626505 ], "assertion": "These three all have the same name and come from the same holding institution" }</pre> <h5>Response:</h5> <pre>{ "result": "success", "timing": 246.13 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="constellation_diff">Compute Constellation Diff</h2> <div class="row"> <div class="col-md-12"> <p>Computes the difference between the two given Constellations. Returns Constellation objects containing: only those items in the first, only those items in the second, and components shared.</p> <!-- <h4>Examples</h4> <h5>Diff</h5> <p></p> <h6>Query:</h6> <pre>{ "command": "constellation_diff", "apikey": "...", "constellationid1": 123456, "constellationid2": 987654 }</pre> <h6>Response:</h6> <pre>{ "result": "success", "constellation1": { "...": "..." }, "constellation2": { "...": "..." }, "intersection": { "...": "..." }, "mergeable": true }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>constellation_diff</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>constellationid1</code>: Integer </p> <p style="margin-left: 15px">Constellation ID for one Constellation to compare</p> <p><code>version1</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Constellation Version to compare. If not set, it will compare the published version.</p> <p><code>constellationid2</code>: Integer </p> <p style="margin-left: 15px">Constellation ID for the other Constellation to compare</p> <p><code>version2</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Constellation Version to compare. If not set, it will compare the published version.</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation1</code>: Object</p> <p style="margin-left: 15px">Constellation object containing only data distinct to the first Constellation</p> <p><code>constellation2</code>: Object</p> <p style="margin-left: 15px">Constellation object containing only data distinct to the second Constellation</p> <p><code>intersection</code>: Object</p> <p style="margin-left: 15px">Constellation object containing only data shared by both Constellations</p> <p><code>mergeable</code>: Boolean</p> <p style="margin-left: 15px">Boolean value denoting whether these two Constellations can be merged by this user</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Diff</h4> <p></p> <h5>Query:</h5> <pre>{ "command": "constellation_diff", "apikey": "...", "constellationid1": 123456, "constellationid2": 987654 }</pre> <h5>Response:</h5> <pre>{ "result": "success", "constellation1": { "...": "..." }, "constellation2": { "...": "..." }, "intersection": { "...": "..." }, "mergeable": true }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="constellation_diff_merge">Compute Constellation Diff and Set Merge</h2> <div class="row"> <div class="col-md-12"> <p>Computes the difference between the two given Constellations. Checks out the two Constellations in editing for the given user to allow a merge. Returns Constellation objects containing: only those items in the first, only those items in the second, and components shared.</p> <!-- <h4>Examples</h4> <h5>Successful Mergeable Diff</h5> <p>If the given user has permission to check both Constellations out for editing, then the system will automatically check them out to the user, produce the diff, and denote to the user in the mergeable flag that the user may merge these constellations.</p> <h6>Query:</h6> <pre>{ "command": "constellation_diff_merge", "apikey": "...", "constellationid1": 123456, "constellationid2": 987654 }</pre> <h6>Response:</h6> <pre>{ "result": "success", "constellation1": { "...": "..." }, "constellation2": { "...": "..." }, "intersection": { "...": "..." }, "mergeable": true }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Merge </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>constellation_diff_merge</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellationid1</code>: Integer </p> <p style="margin-left: 15px">Constellation ID for one Constellation to compare</p> <p><code>constellationid2</code>: Integer </p> <p style="margin-left: 15px">Constellation ID for the other Constellation to compare</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation1</code>: Object</p> <p style="margin-left: 15px">Constellation object containing only data distinct to the first Constellation</p> <p><code>constellation2</code>: Object</p> <p style="margin-left: 15px">Constellation object containing only data distinct to the second Constellation</p> <p><code>intersection</code>: Object</p> <p style="margin-left: 15px">Constellation object containing only data shared by both Constellations</p> <p><code>mergeable</code>: Boolean</p> <p style="margin-left: 15px">Boolean value denoting whether these two Constellations can be merged by this user</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Successful Mergeable Diff</h4> <p>If the given user has permission to check both Constellations out for editing, then the system will automatically check them out to the user, produce the diff, and denote to the user in the mergeable flag that the user may merge these constellations.</p> <h5>Query:</h5> <pre>{ "command": "constellation_diff_merge", "apikey": "...", "constellationid1": 123456, "constellationid2": 987654 }</pre> <h5>Response:</h5> <pre>{ "result": "success", "constellation1": { "...": "..." }, "constellation2": { "...": "..." }, "intersection": { "...": "..." }, "mergeable": true }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="constellation_merge">Merge Constellations</h2> <div class="row"> <div class="col-md-12"> <p>Given Constellation IDs and a full, merged, Constellation, creates a new Constellation in SNAC from the given Constellation and sets all Constellations given by the IDs to be "tombstoned" and redirected to the new, merged, Constellation.</p> <!-- <h4>Examples</h4> <h5>Merge three Constellations</h5> <p>If we want to merge three Constellations into one, which only has a name entry, we would provide all IDs and the appropriate merged version.</p> <h6>Query:</h6> <pre>{ "command": "constellation_merge", "apikey": "...", "constellationids": [ 123456, 987654, 626505 ], "constellation": { "dataType": "Constellation", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99 } ] } }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "status": "published", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244089" } ], "id": "76813079", "version": "11244089" }, "result": "success", "timing": 583.96 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>constellation_merge</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellationids</code>: Array of Integers </p> <p style="margin-left: 15px">2 or more Constellation IDs to merge together. Each Constellation will be "tombstoned" and point to a new Constellation that matches the one provided by the user in the Constellation parameter.</p> <p><code>constellation</code>: Object </p> <p style="margin-left: 15px">Full merged Constellation object. The version of the Constellation here will be considered by SNAC as the merged version; it will be written as a new Constellation.</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the merge succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Merge three Constellations</h4> <p>If we want to merge three Constellations into one, which only has a name entry, we would provide all IDs and the appropriate merged version.</p> <h5>Query:</h5> <pre>{ "command": "constellation_merge", "apikey": "...", "constellationids": [ 123456, 987654, 626505 ], "constellation": { "dataType": "Constellation", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99 } ] } }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "status": "published", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244089" } ], "id": "76813079", "version": "11244089" }, "result": "success", "timing": 583.96 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="constellation_auto_merge">Automatically Merge Constellations</h2> <div class="row"> <div class="col-md-12"> <p>Given Constellation IDs, creates a new Constellation in SNAC from the combined data from all Constellations, "tombstones" the originals, and redirects thier IDs to the new, merged, Constellation.</p> <!-- <h4>Examples</h4> <h5>Auto-merge three Constellations</h5> <p>If we want to merge three Constellations into one, which only has a name entry, we would provide all IDs and the system automatically creates a merged version.</p> <h6>Query:</h6> <pre>{ "command": "constellation_auto_merge", "apikey": "...", "constellationids": [ 123456, 987654, 626505 ] }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "status": "published", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244089" } ], "id": "76813079", "version": "11244089" }, "result": "success", "timing": 738.96 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>constellation_auto_merge</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellationids</code>: Array of Integers </p> <p style="margin-left: 15px">2 or more Constellation IDs to merge together. Each Constellation will be "tombstoned" and point to a new Constellation that matches the one provided by the user in the Constellation parameter.</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>constellation</code>: Object</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the merge succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Auto-merge three Constellations</h4> <p>If we want to merge three Constellations into one, which only has a name entry, we would provide all IDs and the system automatically creates a merged version.</p> <h5>Query:</h5> <pre>{ "command": "constellation_auto_merge", "apikey": "...", "constellationids": [ 123456, 987654, 626505 ] }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "status": "published", "entityType": { "id": 700, "term": "person" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (Doctor), 1963-2018", "preferenceScore": 99, "id": "76813080", "version": "11244089" } ], "id": "76813079", "version": "11244089" }, "result": "success", "timing": 738.96 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="read">Read Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Returns the full Constellation for viewing. Either a constellationid or arkid are required. If a constellationid and version are both supplied, this will read that version of the constellation, if it exists.</p> <!-- <h4>Examples</h4> <h5>Read a Constellation</h5> <p>By requesting simply a constellationid, we get the current published version of the Constellation.</p> <h6>Query:</h6> <pre>{ "command": "read", "constellationid": 76813079 }</pre> <h6>Response:</h6> <pre>{ "result": "success", "maybesame_count": 0, "constellation": { "dataType": "Constellation", "status": "editable", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZICtRNdP", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": "99", "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "order": "0", "type": { "id": "400228", "term": "Name", "type": "name_component" }, "id": "76813081", "version": "11244084" } ], "id": "76813080", "version": "11244084" } ], "id": "76813079", "version": "11244087" }, "timing": 230.63 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>read</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>constellationid</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Constellation ID for Constellation to read</p> <p><code>version</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Version of the Constellation to read</p> <p><code>type</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">How much of the Constellation to return. Without this parameter, the entire Constellation is returned. If set to "summary", a summary is returned without relationships.</p> <p><code>arkid</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">ARK ID for Constellation to read, of the form 'http://n2t.net/ark:/99166/xxxxxxxx'</p> <p><code>sameas</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">One of the Constellation's external links, for example 'http://en.wikipedia.org/wiki/Harriet_Tubman'</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" if one Constellation is returned, "success-notice" if there is a special return.</p> <p><code>message</code>: Object</p> <p style="margin-left: 15px">Message relating to the "success-notice" result. Contains a "text" string including a human-readable note and an "info" object of additional information about the Constellation.</p> <p><code>constellation</code>: Object|Array of Objects</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers. If the ID/Ark given point to a Constellation that has been split, multiple Constellation objects will be returned instead.</p> <p><code>maybesame_count</code>: Integer</p> <p style="margin-left: 15px">Number of other Constellations in SNAC listed as maybe-the-same as this one.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Read a Constellation</h4> <p>By requesting simply a constellationid, we get the current published version of the Constellation.</p> <h5>Query:</h5> <pre>{ "command": "read", "constellationid": 76813079 }</pre> <h5>Response:</h5> <pre>{ "result": "success", "maybesame_count": 0, "constellation": { "dataType": "Constellation", "status": "editable", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZICtRNdP", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": "99", "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "order": "0", "type": { "id": "400228", "term": "Name", "type": "name_component" }, "id": "76813081", "version": "11244084" } ], "id": "76813080", "version": "11244084" } ], "id": "76813079", "version": "11244087" }, "timing": 230.63 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="edit">Edit Constellation</h2> <div class="row"> <div class="col-md-12"> <p>Check out the Constellation for editing.</p> <!-- <h4>Examples</h4> <h5>Edit a Constellation</h5> <p></p> <h6>Query:</h6> <pre>{ "command": "edit", "apikey": "...", "constellationid": 76813079 }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "status": "editable", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZICtRNdP", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": "99", "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "order": "0", "type": { "id": "400228", "term": "Name", "type": "name_component" }, "id": "76813081", "version": "11244084" } ], "id": "76813080", "version": "11244084" } ], "id": "76813079", "version": "11244087" }, "timing": 230.63 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Edit </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>edit</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellationid</code>: Integer </p> <p style="margin-left: 15px">Constellation ID for Constellation to edit</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>review_note</code>: String</p> <p style="margin-left: 15px">Reviewer's note, if set by another user.</p> <p><code>constellation</code>: Object|Array of Objects</p> <p style="margin-left: 15px">Full Constellation object with current id and version numbers, ready for editing. Those id/version values must be present with future update queries.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Edit a Constellation</h4> <p></p> <h5>Query:</h5> <pre>{ "command": "edit", "apikey": "...", "constellationid": 76813079 }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "status": "editable", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZICtRNdP", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Smith, John (1963-2018)", "preferenceScore": "99", "components": [ { "dataType": "NameComponent", "text": "Smith, John (1963-2018)", "order": "0", "type": { "id": "400228", "term": "Name", "type": "name_component" }, "id": "76813081", "version": "11244084" } ], "id": "76813080", "version": "11244084" } ], "id": "76813079", "version": "11244087" }, "timing": 230.63 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="search">Search Constellations</h2> <div class="row"> <div class="col-md-12"> <p>Search for a Constellation, returning a list of possible matches.</p> <!-- <h4>Examples</h4> <h5>Basic Search</h5> <p>A basic search for "Washington" among people.</p> <h6>Query:</h6> <pre>{ "command": "search", "term": "Washington", "entity_type": "person", "start": 0, "count": 3 }</pre> <h6>Response:</h6> <pre>{ "total": 2170, "results": [ { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6028ps4", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Washington, George, 1732-1799", "preferenceScore": "99", "id": "57007281", "version": "8341616" } ], "biogHists": [ { "dataType": "BiogHist", "text": "...", "id": "57005056", "version": "8341616" } ], "id": "57005055", "version": "11243948" }, { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6fb5542", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Irving, Washington, 1783-1859", "preferenceScore": "99", "id": "58214892", "version": "8509754" } ], "biogHists": [ { "dataType": "BiogHist", "text": "...", "id": "58214480", "version": "8509754" } ], "id": "58214479", "version": "8509755" }, { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6zp5fs0", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Washington, Joe", "preferenceScore": "4", "id": "64784398", "version": "9470486" } ], "id": "64784275", "version": "9470487" } ], "aggregations": { "occupation": [ { "term": "Army officers.", "count": 8 }, { "term": "Authors.", "count": 7 }, { "term": "Lawyers.", "count": 7 }, { "term": "Collectors.", "count": 6 }, { "term": "Diplomats.", "count": 6 }, { "term": "Educators.", "count": 5 }, { "term": "Clergy.", "count": 4 }, { "term": "Farmers.", "count": 4 }, { "term": "Jurists.", "count": 4 }, { "term": "Soldiers--United States.", "count": 4 } ], "subject": [ { "term": "Agriculture", "count": 14 }, { "term": "Indians of North America", "count": 11 }, { "term": "Slavery", "count": 11 }, { "term": "African Americans", "count": 9 }, { "term": "Frontier and pioneer life", "count": 9 }, { "term": "Lawyers", "count": 9 }, { "term": "Physicians", "count": 9 }, { "term": "Real property", "count": 9 }, { "term": "Families--Social life and customs", "count": 8 }, { "term": "Pioneers", "count": 8 } ], "activity": [] }, "pagination": 15, "page": 0, "count": 3, "term": "Washington", "search_type": "default", "timing": 1092.14 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>search</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>term</code>: String </p> <p style="margin-left: 15px">Search term to query against SNAC</p> <p><code>start</code>: Integer </p> <p style="margin-left: 15px">Position in the results to start. Begin with 0</p> <p><code>count</code>: Integer </p> <p style="margin-left: 15px">Number of results to return</p> <p><code>entity_type</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">The entity type of the identity to search (person, corporateBody, family)</p> <p><code>biog_hist</code>: Boolean <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Whether or not to search biographical histories for the search term</p> <p><code>facets</code>: Object of String Arrays <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Facets to use in searching.</p> <p><code>search_type</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">What type of search to perform. By default, performs standard keyword search. Passing 'autocomplete' will use left-anchored autocomplete search. Passing 'advanced' will allow wildcards and other advanced features.</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>results</code>: Array of Objects</p> <p style="margin-left: 15px">Simplified Constellation objects {id, ark, nameEntry} of random Constellations</p> <p><code>aggregations</code>: Object of String Arrays</p> <p style="margin-left: 15px">List of facets that are included in the current search results</p> <p><code>term</code>: String</p> <p style="margin-left: 15px">Search term to query against SNAC</p> <p><code>count</code>: Integer</p> <p style="margin-left: 15px">Number of results returned in this request</p> <p><code>total</code>: Integer</p> <p style="margin-left: 15px">Number of total search results</p> <p><code>page</code>: Integer</p> <p style="margin-left: 15px">Page number of results based on total and count</p> <p><code>pagination</code>: Integer</p> <p style="margin-left: 15px">Number of total pages of results based on total and count</p> <p><code>search_type</code>: String</p> <p style="margin-left: 15px">What type of search to perform. By default, performs standard keyword search. Passing 'autocomplete' will use left-anchored autocomplete search. Passing 'advanced' will allow wildcards and other advanced features.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Basic Search</h4> <p>A basic search for "Washington" among people.</p> <h5>Query:</h5> <pre>{ "command": "search", "term": "Washington", "entity_type": "person", "start": 0, "count": 3 }</pre> <h5>Response:</h5> <pre>{ "total": 2170, "results": [ { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6028ps4", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Washington, George, 1732-1799", "preferenceScore": "99", "id": "57007281", "version": "8341616" } ], "biogHists": [ { "dataType": "BiogHist", "text": "...", "id": "57005056", "version": "8341616" } ], "id": "57005055", "version": "11243948" }, { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6fb5542", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Irving, Washington, 1783-1859", "preferenceScore": "99", "id": "58214892", "version": "8509754" } ], "biogHists": [ { "dataType": "BiogHist", "text": "...", "id": "58214480", "version": "8509754" } ], "id": "58214479", "version": "8509755" }, { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6zp5fs0", "entityType": { "id": "700", "term": "person", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Person", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Washington, Joe", "preferenceScore": "4", "id": "64784398", "version": "9470486" } ], "id": "64784275", "version": "9470487" } ], "aggregations": { "occupation": [ { "term": "Army officers.", "count": 8 }, { "term": "Authors.", "count": 7 }, { "term": "Lawyers.", "count": 7 }, { "term": "Collectors.", "count": 6 }, { "term": "Diplomats.", "count": 6 }, { "term": "Educators.", "count": 5 }, { "term": "Clergy.", "count": 4 }, { "term": "Farmers.", "count": 4 }, { "term": "Jurists.", "count": 4 }, { "term": "Soldiers--United States.", "count": 4 } ], "subject": [ { "term": "Agriculture", "count": 14 }, { "term": "Indians of North America", "count": 11 }, { "term": "Slavery", "count": 11 }, { "term": "African Americans", "count": 9 }, { "term": "Frontier and pioneer life", "count": 9 }, { "term": "Lawyers", "count": 9 }, { "term": "Physicians", "count": 9 }, { "term": "Real property", "count": 9 }, { "term": "Families--Social life and customs", "count": 8 }, { "term": "Pioneers", "count": 8 } ], "activity": [] }, "pagination": 15, "page": 0, "count": 3, "term": "Washington", "search_type": "default", "timing": 1092.14 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="browse">Browse Constellations</h2> <div class="row"> <div class="col-md-12"> <p>Given a query name heading, returns the surrounding matching Constellations (in alphabetical order).</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "browse", "term": "Washington", "position": "middle" }</pre> <h6>Response:</h6> <pre>{ "results": [ { "name_entry": "Wash, Frank H. (Frank Hord), 1867-", "name_entry_lower": "wash, frank h. (frank hord), 1867-", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6xh8hz5", "ic_id": "27734815", "degree": "0", "resources": "3", "entity_type": "person", "timestamp": "2017-04-14 16:04:00.34925" }, { "name_entry": "Wash. Gallery of Mod. Art", "name_entry_lower": "wash. gallery of mod. art", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6fk5r89", "ic_id": "57074890", "degree": "1", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 22:37:24.150557" }, { "name_entry": "Washiashi, Fumio", "name_entry_lower": "washiashi, fumio", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6946grx", "ic_id": "39098837", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 18:30:16.606595" }, { "name_entry": "Washida, Kyo.", "name_entry_lower": "washida, kyo.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w64n0f57", "ic_id": "39156515", "degree": "0", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 18:30:55.68445" }, { "name_entry": "W. A. Shields", "name_entry_lower": "w. a. shields", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6kj60fq", "ic_id": "27654177", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 16:03:04.819829" }, { "name_entry": "Washinawatok, Gwendolyn Dodge.", "name_entry_lower": "washinawatok, gwendolyn dodge.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6qr6f0k", "ic_id": "75832012", "degree": "0", "resources": "1", "entity_type": "person", "timestamp": "2017-04-15 03:10:03.948293" }, { "name_entry": "Washines, Lorena.", "name_entry_lower": "washines, lorena.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6vq3w4h", "ic_id": "6563783", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 11:55:33.983345" }, { "name_entry": "Washines, Lorena Neaman, 1949-", "name_entry_lower": "washines, lorena neaman, 1949-", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6rr43x3", "ic_id": "727678", "degree": "2", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 10:51:38.349649" }, { "name_entry": "Washinggon, G.", "name_entry_lower": "washinggon, g.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w63d067h", "ic_id": "73588329", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-15 02:36:18.961325" }, { "name_entry": "Washingon Public Power Supply System Organization", "name_entry_lower": "washingon public power supply system organization", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6mf4fhh", "ic_id": "32287913", "degree": "1", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 17:02:08.145018" }, { "name_entry": "Washington", "name_entry_lower": "washington", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/Z3Fcdj2v", "ic_id": "76806647", "degree": "6", "resources": "16", "entity_type": "person", "timestamp": "2017-05-16 10:21:36.134303" }, { "name_entry": "Washington", "name_entry_lower": "washington", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZSpIRzTp", "ic_id": "76806699", "degree": "6", "resources": "16", "entity_type": "person", "timestamp": "2017-05-16 10:22:13.54157" }, { "name_entry": "Washington ", "name_entry_lower": "washington ", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6w52tbs", "ic_id": "22801605", "degree": "1", "resources": "1", "entity_type": "family", "timestamp": "2017-04-14 15:01:53.291301" }, { "name_entry": "Washington, 1777", "name_entry_lower": "washington, 1777", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZCngp9Os", "ic_id": "76806751", "degree": "2", "resources": "1", "entity_type": "person", "timestamp": "2017-05-16 10:23:14.746397" }, { "name_entry": "Washington, Aaron", "name_entry_lower": "washington, aaron", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6hr6r64", "ic_id": "9579544", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 12:29:17.04413" }, { "name_entry": "Washington Abstinance Society.", "name_entry_lower": "washington abstinance society.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6rz7btv", "ic_id": "16198707", "degree": "1", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 13:43:39.761765" }, { "name_entry": "Washington Academy.", "name_entry_lower": "washington academy.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6b61j8k", "ic_id": "20509409", "degree": "0", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 14:34:04.568368" }, { "name_entry": "Washington Academy.", "name_entry_lower": "washington academy.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w60c969j", "ic_id": "35410477", "degree": "1", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 17:40:40.749371" }, { "name_entry": "Washington Academy (Lexington, Va.)", "name_entry_lower": "washington academy (lexington, va.)", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6713673", "ic_id": "53257876", "degree": "5", "resources": "7", "entity_type": "corporateBody", "timestamp": "2017-04-14 21:42:27.886325" }, { "name_entry": "Washington Academy of Sciences", "name_entry_lower": "washington academy of sciences", "ark": "http:\/\/n2t.net\/ark:\/99166\/w64w024n", "ic_id": "16299930", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 13:44:45.632322" } ], "result": "success", "timing": 440.19 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>browse</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>term</code>: String </p> <p style="margin-left: 15px">Search term to query against SNAC</p> <p><code>entity_type</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">The entity type of the identity to search (person, corporateBody, family)</p> <p><code>position</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Whether the "requested" term in the browse list should be in the "middle" of the list, "before", or "after".</p> <p><code>icid</code>: String <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Constellation ID if needed to distinguish between identical names in the response list</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>results</code>: Array of Objects</p> <p style="margin-left: 15px">An array of names from SNAC, in a special format. Includes the preferred name entry of a Constellation with its ark, Constellation ID, degree, resources, entity type, and timestamp of when it was updated. These results also include the normalized lower-case name entry.</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "browse", "term": "Washington", "position": "middle" }</pre> <h5>Response:</h5> <pre>{ "results": [ { "name_entry": "Wash, Frank H. (Frank Hord), 1867-", "name_entry_lower": "wash, frank h. (frank hord), 1867-", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6xh8hz5", "ic_id": "27734815", "degree": "0", "resources": "3", "entity_type": "person", "timestamp": "2017-04-14 16:04:00.34925" }, { "name_entry": "Wash. Gallery of Mod. Art", "name_entry_lower": "wash. gallery of mod. art", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6fk5r89", "ic_id": "57074890", "degree": "1", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 22:37:24.150557" }, { "name_entry": "Washiashi, Fumio", "name_entry_lower": "washiashi, fumio", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6946grx", "ic_id": "39098837", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 18:30:16.606595" }, { "name_entry": "Washida, Kyo.", "name_entry_lower": "washida, kyo.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w64n0f57", "ic_id": "39156515", "degree": "0", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 18:30:55.68445" }, { "name_entry": "W. A. Shields", "name_entry_lower": "w. a. shields", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6kj60fq", "ic_id": "27654177", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 16:03:04.819829" }, { "name_entry": "Washinawatok, Gwendolyn Dodge.", "name_entry_lower": "washinawatok, gwendolyn dodge.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6qr6f0k", "ic_id": "75832012", "degree": "0", "resources": "1", "entity_type": "person", "timestamp": "2017-04-15 03:10:03.948293" }, { "name_entry": "Washines, Lorena.", "name_entry_lower": "washines, lorena.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6vq3w4h", "ic_id": "6563783", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 11:55:33.983345" }, { "name_entry": "Washines, Lorena Neaman, 1949-", "name_entry_lower": "washines, lorena neaman, 1949-", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6rr43x3", "ic_id": "727678", "degree": "2", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 10:51:38.349649" }, { "name_entry": "Washinggon, G.", "name_entry_lower": "washinggon, g.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w63d067h", "ic_id": "73588329", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-15 02:36:18.961325" }, { "name_entry": "Washingon Public Power Supply System Organization", "name_entry_lower": "washingon public power supply system organization", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6mf4fhh", "ic_id": "32287913", "degree": "1", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 17:02:08.145018" }, { "name_entry": "Washington", "name_entry_lower": "washington", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/Z3Fcdj2v", "ic_id": "76806647", "degree": "6", "resources": "16", "entity_type": "person", "timestamp": "2017-05-16 10:21:36.134303" }, { "name_entry": "Washington", "name_entry_lower": "washington", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZSpIRzTp", "ic_id": "76806699", "degree": "6", "resources": "16", "entity_type": "person", "timestamp": "2017-05-16 10:22:13.54157" }, { "name_entry": "Washington ", "name_entry_lower": "washington ", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6w52tbs", "ic_id": "22801605", "degree": "1", "resources": "1", "entity_type": "family", "timestamp": "2017-04-14 15:01:53.291301" }, { "name_entry": "Washington, 1777", "name_entry_lower": "washington, 1777", "ark": "http:\/\/snaccooperative.org\/ark:\/99999\/ZCngp9Os", "ic_id": "76806751", "degree": "2", "resources": "1", "entity_type": "person", "timestamp": "2017-05-16 10:23:14.746397" }, { "name_entry": "Washington, Aaron", "name_entry_lower": "washington, aaron", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6hr6r64", "ic_id": "9579544", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 12:29:17.04413" }, { "name_entry": "Washington Abstinance Society.", "name_entry_lower": "washington abstinance society.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6rz7btv", "ic_id": "16198707", "degree": "1", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 13:43:39.761765" }, { "name_entry": "Washington Academy.", "name_entry_lower": "washington academy.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6b61j8k", "ic_id": "20509409", "degree": "0", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 14:34:04.568368" }, { "name_entry": "Washington Academy.", "name_entry_lower": "washington academy.", "ark": "http:\/\/n2t.net\/ark:\/99166\/w60c969j", "ic_id": "35410477", "degree": "1", "resources": "1", "entity_type": "corporateBody", "timestamp": "2017-04-14 17:40:40.749371" }, { "name_entry": "Washington Academy (Lexington, Va.)", "name_entry_lower": "washington academy (lexington, va.)", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6713673", "ic_id": "53257876", "degree": "5", "resources": "7", "entity_type": "corporateBody", "timestamp": "2017-04-14 21:42:27.886325" }, { "name_entry": "Washington Academy of Sciences", "name_entry_lower": "washington academy of sciences", "ark": "http:\/\/n2t.net\/ark:\/99166\/w64w024n", "ic_id": "16299930", "degree": "1", "resources": "1", "entity_type": "person", "timestamp": "2017-04-14 13:44:45.632322" } ], "result": "success", "timing": 440.19 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="insert_resource">Insert Resource</h2> <div class="row"> <div class="col-md-12"> <p>Given a Resource, inserts it into SNAC's resource cache.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "insert_resource", "resource": { "dataType": "Resource", "title": "My Title", "link": "https:\/\/mylink.com", "abstract": "This is a full abstract", "source": "My full citation", "documentType": { "id": "696", "term": "ArchivalResource", "type": "document_type" }, "extent": "20 pages", "repository": { "ark": "http:\/\/n2t.net\/ark:\/99166\/w6kq8qkp", "dataType": "Constellation", "id": "76763300" }, "operation": "insert" }, "apikey": "..." }</pre> <h6>Response:</h6> <pre>{ "resource": { "dataType": "Resource", "documentType": { "id": "696", "term": "ArchivalResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#ArchivalResource", "type": "document_type" }, "link": "https:\/\/mylink.com", "source": "My full citation", "title": "My Title", "abstract": "This is a full abstract", "extent": "20 pages", "repository": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6kq8qkp", "entityType": { "id": "698", "term": "corporateBody", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#CorporateBody", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Campbell University, Wiggins Memorial Library", "preferenceScore": "99", "id": "76763301", "version": "11225237" } ], "places": [ { "dataType": "Place", "original": "Campbell University, Wiggins Memorial Library", "type": { "id": "400242", "term": "Address", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Address", "type": "place_type" }, "address": [ { "dataType": "AddressLine", "text": "Wiggins Memorial Library", "order": "0", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763306", "version": "11225237" }, { "dataType": "AddressLine", "text": "P.O. Box 98 or 113 Main Street", "order": "1", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763307", "version": "11225237" }, { "dataType": "AddressLine", "text": "Buies Creek", "order": "2", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763308", "version": "11225237" }, { "dataType": "AddressLine", "text": "US-NC", "order": "3", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763309", "version": "11225237" }, { "dataType": "AddressLine", "text": "27506", "order": "4", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763310", "version": "11225237" }, { "dataType": "AddressLine", "text": "US", "order": "5", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763311", "version": "11225237" } ], "geoplace": { "id": "16695", "name": "Campbell University, Wiggins Memorial Library", "latitude": "35.4070892", "longitude": "-78.7394028" }, "confirmed": true, "id": "76763305", "version": "11225237" } ], "id": "76763300", "version": "11225240" }, "id": "11612307", "version": "8359251" }, "result": "success", "timing": 706.34 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> Edit </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>insert_resource</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>resource</code>: Object </p> <p style="margin-left: 15px">Resource object to write to SNAC, with "operation" set to "insert".</p> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>resource</code>: Object</p> <p style="margin-left: 15px">Full resource object as written to SNAC</p> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "insert_resource", "resource": { "dataType": "Resource", "title": "My Title", "link": "https:\/\/mylink.com", "abstract": "This is a full abstract", "source": "My full citation", "documentType": { "id": "696", "term": "ArchivalResource", "type": "document_type" }, "extent": "20 pages", "repository": { "ark": "http:\/\/n2t.net\/ark:\/99166\/w6kq8qkp", "dataType": "Constellation", "id": "76763300" }, "operation": "insert" }, "apikey": "..." }</pre> <h5>Response:</h5> <pre>{ "resource": { "dataType": "Resource", "documentType": { "id": "696", "term": "ArchivalResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#ArchivalResource", "type": "document_type" }, "link": "https:\/\/mylink.com", "source": "My full citation", "title": "My Title", "abstract": "This is a full abstract", "extent": "20 pages", "repository": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6kq8qkp", "entityType": { "id": "698", "term": "corporateBody", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#CorporateBody", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Campbell University, Wiggins Memorial Library", "preferenceScore": "99", "id": "76763301", "version": "11225237" } ], "places": [ { "dataType": "Place", "original": "Campbell University, Wiggins Memorial Library", "type": { "id": "400242", "term": "Address", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Address", "type": "place_type" }, "address": [ { "dataType": "AddressLine", "text": "Wiggins Memorial Library", "order": "0", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763306", "version": "11225237" }, { "dataType": "AddressLine", "text": "P.O. Box 98 or 113 Main Street", "order": "1", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763307", "version": "11225237" }, { "dataType": "AddressLine", "text": "Buies Creek", "order": "2", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763308", "version": "11225237" }, { "dataType": "AddressLine", "text": "US-NC", "order": "3", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763309", "version": "11225237" }, { "dataType": "AddressLine", "text": "27506", "order": "4", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763310", "version": "11225237" }, { "dataType": "AddressLine", "text": "US", "order": "5", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76763311", "version": "11225237" } ], "geoplace": { "id": "16695", "name": "Campbell University, Wiggins Memorial Library", "latitude": "35.4070892", "longitude": "-78.7394028" }, "confirmed": true, "id": "76763305", "version": "11225237" } ], "id": "76763300", "version": "11225240" }, "id": "11612307", "version": "8359251" }, "result": "success", "timing": 706.34 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="read_resource">Read Resource</h2> <div class="row"> <div class="col-md-12"> <p>Read the entire Resource from SNAC's resource cache.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "read_resource", "resourceid": 7149468 }</pre> <h6>Response:</h6> <pre>{ "resource": { "dataType": "Resource", "documentType": { "id": "696", "term": "ArchivalResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#ArchivalResource", "type": "document_type" }, "link": "https:\/\/www.worldcat.org\/oclc\/25756829", "source": "...", "title": "Papers, 1881-1958.", "abstract": "This collection contains business papers, political papers, and family papers. ", "extent": "4 boxes (2 cu.ft.)", "originationNames": [ { "dataType": "OriginationName", "name": "Avary, Robert Lee.", "id": "9120396", "version": "7149468" } ], "repository": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6nq2ssj", "entityType": { "id": "698", "term": "corporateBody", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#CorporateBody", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "preferenceScore": "99", "id": "76760880", "version": "11224337" } ], "places": [ { "dataType": "Place", "original": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "type": { "id": "400242", "term": "Address", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Address", "type": "place_type" }, "address": [ { "dataType": "AddressLine", "text": "130 W. Paces Ferry Rd. NW", "order": "0", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760885", "version": "11224337" }, { "dataType": "AddressLine", "text": "Atlanta", "order": "1", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760886", "version": "11224337" }, { "dataType": "AddressLine", "text": "US-GA", "order": "2", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760887", "version": "11224337" }, { "dataType": "AddressLine", "text": "30305-1366", "order": "3", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760888", "version": "11224337" }, { "dataType": "AddressLine", "text": "US", "order": "4", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760889", "version": "11224337" } ], "geoplace": { "id": "16354", "name": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "latitude": "33.8411636", "longitude": "-84.3860474" }, "confirmed": true, "id": "76760884", "version": "11224337" } ], "id": "76760879", "version": "11224340" }, "id": "7149468", "version": "7149468" }, "timing": 18.4 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>read_resource</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>resourceid</code>: Integer </p> <p style="margin-left: 15px">The resource ID from SNAC to read</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>resource</code>: Object</p> <p style="margin-left: 15px">Full resource object from SNAC</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "read_resource", "resourceid": 7149468 }</pre> <h5>Response:</h5> <pre>{ "resource": { "dataType": "Resource", "documentType": { "id": "696", "term": "ArchivalResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#ArchivalResource", "type": "document_type" }, "link": "https:\/\/www.worldcat.org\/oclc\/25756829", "source": "...", "title": "Papers, 1881-1958.", "abstract": "This collection contains business papers, political papers, and family papers. ", "extent": "4 boxes (2 cu.ft.)", "originationNames": [ { "dataType": "OriginationName", "name": "Avary, Robert Lee.", "id": "9120396", "version": "7149468" } ], "repository": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6nq2ssj", "entityType": { "id": "698", "term": "corporateBody", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#CorporateBody", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "preferenceScore": "99", "id": "76760880", "version": "11224337" } ], "places": [ { "dataType": "Place", "original": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "type": { "id": "400242", "term": "Address", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Address", "type": "place_type" }, "address": [ { "dataType": "AddressLine", "text": "130 W. Paces Ferry Rd. NW", "order": "0", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760885", "version": "11224337" }, { "dataType": "AddressLine", "text": "Atlanta", "order": "1", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760886", "version": "11224337" }, { "dataType": "AddressLine", "text": "US-GA", "order": "2", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760887", "version": "11224337" }, { "dataType": "AddressLine", "text": "30305-1366", "order": "3", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760888", "version": "11224337" }, { "dataType": "AddressLine", "text": "US", "order": "4", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760889", "version": "11224337" } ], "geoplace": { "id": "16354", "name": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "latitude": "33.8411636", "longitude": "-84.3860474" }, "confirmed": true, "id": "76760884", "version": "11224337" } ], "id": "76760879", "version": "11224340" }, "id": "7149468", "version": "7149468" }, "timing": 18.4 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="resource_search">Search Resources</h2> <div class="row"> <div class="col-md-12"> <p>Searches the resource cache in SNAC. Returns the top matches.</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "resource_search", "term": "Papers" }</pre> <h6>Response:</h6> <pre>{ "total": 308000, "results": [ { "dataType": "Resource", "documentType": { "id": "696", "term": "ArchivalResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#ArchivalResource", "type": "document_type" }, "link": "https:\/\/www.worldcat.org\/oclc\/25756829", "source": "...", "title": "Papers, 1881-1958.", "abstract": "This collection contains business papers, political papers, and family papers. ", "extent": "4 boxes (2 cu.ft.)", "originationNames": [ { "dataType": "OriginationName", "name": "Avary, Robert Lee.", "id": "9120396", "version": "7149468" } ], "repository": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6nq2ssj", "entityType": { "id": "698", "term": "corporateBody", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#CorporateBody", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "preferenceScore": "99", "id": "76760880", "version": "11224337" } ], "places": [ { "dataType": "Place", "original": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "type": { "id": "400242", "term": "Address", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Address", "type": "place_type" }, "address": [ { "dataType": "AddressLine", "text": "130 W. Paces Ferry Rd. NW", "order": "0", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760885", "version": "11224337" }, { "dataType": "AddressLine", "text": "Atlanta", "order": "1", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760886", "version": "11224337" }, { "dataType": "AddressLine", "text": "US-GA", "order": "2", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760887", "version": "11224337" }, { "dataType": "AddressLine", "text": "30305-1366", "order": "3", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760888", "version": "11224337" }, { "dataType": "AddressLine", "text": "US", "order": "4", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760889", "version": "11224337" } ], "geoplace": { "id": "16354", "name": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "latitude": "33.8411636", "longitude": "-84.3860474" }, "confirmed": true, "id": "76760884", "version": "11224337" } ], "id": "76760879", "version": "11224340" }, "id": "7149468", "version": "7149468" }, { "dataType": "Resource", "documentType": { "id": "697", "term": "BibliographicResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#BibliographicResource", "type": "document_type" }, "title": "Johnston family papers, 1824-1922", "id": "2522525", "version": "2522525" }, { "dataType": "Resource", "documentType": { "id": "697", "term": "BibliographicResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#BibliographicResource", "type": "document_type" }, "title": "Mathematical papers : selected papers", "id": "3267730", "version": "3267730" } ], "pagination": 30800, "page": 0, "timing": 5846.73 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>resource_search</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>term</code>: String </p> <p style="margin-left: 15px">Search term to query against the SNAC resource cache.</p> <p><code>count</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Number of results to return</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>results</code>: Array of Objects</p> <p style="margin-left: 15px">List of matching Resource objects from SNAC</p> <p><code>total</code>: Integer</p> <p style="margin-left: 15px">Number of total search results</p> <p><code>page</code>: Integer</p> <p style="margin-left: 15px">Page number of results based on total and count</p> <p><code>pagination</code>: Integer</p> <p style="margin-left: 15px">Number of total pages of results based on total and count</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "resource_search", "term": "Papers" }</pre> <h5>Response:</h5> <pre>{ "total": 308000, "results": [ { "dataType": "Resource", "documentType": { "id": "696", "term": "ArchivalResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#ArchivalResource", "type": "document_type" }, "link": "https:\/\/www.worldcat.org\/oclc\/25756829", "source": "...", "title": "Papers, 1881-1958.", "abstract": "This collection contains business papers, political papers, and family papers. ", "extent": "4 boxes (2 cu.ft.)", "originationNames": [ { "dataType": "OriginationName", "name": "Avary, Robert Lee.", "id": "9120396", "version": "7149468" } ], "repository": { "dataType": "Constellation", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6nq2ssj", "entityType": { "id": "698", "term": "corporateBody", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#CorporateBody", "type": "entity_type" }, "nameEntries": [ { "dataType": "NameEntry", "original": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "preferenceScore": "99", "id": "76760880", "version": "11224337" } ], "places": [ { "dataType": "Place", "original": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "type": { "id": "400242", "term": "Address", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Address", "type": "place_type" }, "address": [ { "dataType": "AddressLine", "text": "130 W. Paces Ferry Rd. NW", "order": "0", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760885", "version": "11224337" }, { "dataType": "AddressLine", "text": "Atlanta", "order": "1", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760886", "version": "11224337" }, { "dataType": "AddressLine", "text": "US-GA", "order": "2", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760887", "version": "11224337" }, { "dataType": "AddressLine", "text": "30305-1366", "order": "3", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760888", "version": "11224337" }, { "dataType": "AddressLine", "text": "US", "order": "4", "type": { "id": "400243", "term": "Unspecified", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#Unspecified", "type": "address_part" }, "id": "76760889", "version": "11224337" } ], "geoplace": { "id": "16354", "name": "Atlanta History Center, Kenan Research Center \/ Cherokee Garden Library", "latitude": "33.8411636", "longitude": "-84.3860474" }, "confirmed": true, "id": "76760884", "version": "11224337" } ], "id": "76760879", "version": "11224340" }, "id": "7149468", "version": "7149468" }, { "dataType": "Resource", "documentType": { "id": "697", "term": "BibliographicResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#BibliographicResource", "type": "document_type" }, "title": "Johnston family papers, 1824-1922", "id": "2522525", "version": "2522525" }, { "dataType": "Resource", "documentType": { "id": "697", "term": "BibliographicResource", "uri": "http:\/\/socialarchive.iath.virginia.edu\/control\/term#BibliographicResource", "type": "document_type" }, "title": "Mathematical papers : selected papers", "id": "3267730", "version": "3267730" } ], "pagination": 30800, "page": 0, "timing": 5846.73 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="delete_resource">Delete Resource</h2> <div class="row"> <div class="col-md-12"> <p>Deletes a given resource and all its relationships</p> <!-- <h4>Examples</h4> <h5></h5> <p></p> <h6>Query:</h6> <pre>{ "command": "delete_resource", "resourceid": "76763300", "apikey": "..." }</pre> <h6>Response:</h6> <pre>{ "result": "success" }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <div class="alert alert-danger"> <strong>Permissions Required: </strong> ViewAdminDashboard </div> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>delete_resource</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>resourceid</code>: String </p> <p style="margin-left: 15px">ID of the resource to delete</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>result</code>: String</p> <p style="margin-left: 15px">"success" or "failure" depending on whether the query succeeded.</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4></h4> <p></p> <h5>Query:</h5> <pre>{ "command": "delete_resource", "resourceid": "76763300", "apikey": "..." }</pre> <h5>Response:</h5> <pre>{ "result": "success" }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="elastic">Elastic Search Query</h2> <div class="row"> <div class="col-md-12"> <p>Search through the Constellation indexes using Elastic Search syntax.</p> <!-- <h4>Examples</h4> <h5>Basic Elastic Search Query</h5> <p>A basic search for "poets".</p> <h6>Query:</h6> <pre>{ "command": "elastic", "query": { "simple_query_string": { "query": "poets", "default_operator": "and" } }, "size": 2, "from": 0 }</pre> <h6>Response:</h6> <pre>{ "results": { "took": 3, "timed_out": false, "hits": { "total": 4714, "max_score": 2.8193178, "hits": [ { "_id": "36683640", "_score": 2.8193178, "_source": { "nameEntry": "Grano, Paul, 1894-1975", "entityType": "person", "arkID": "http:\/\/n2t.net\/ark:\/99166\/w6cv522g", "id": 36683640, "degree": 5, "resources": 15, "subject": [ "Poets, Australian--20th century", "Australian poetry" ], "occupation": [ "Poets", "Poets." ], "activity": [], "biogHist": [], "hasImage": false, "imageURL": null, "imageMeta": null, "timestamp": "2017-11-01T19:15:51-04:00" } }, { "_id": "50543201", "_score": 2.794444, "_source": { "nameEntry": "O'Hara, John Bernard, 1862-1927", "entityType": "person", "arkID": "http:\/\/n2t.net\/ark:\/99166\/w6wq071g", "id": 50543201, "degree": 7, "resources": 5, "subject": [ "Poets, Australian--20th century" ], "occupation": [ "Poets", "Poets." ], "activity": [], "biogHist": [], "hasImage": false, "imageURL": null, "imageMeta": null, "timestamp": "2017-11-01T20:03:33-04:00" } } ] } }, "result": "success", "timing": 18.34 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>elastic</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>query</code>: Object </p> <p style="margin-left: 15px">JSON-formatted Elastic Search query. This would be the "query" portion of an Elastic Search API call. We will automatically include the index and type for Elastic Search.</p> <p><code>size</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Number of results to return</p> <p><code>from</code>: Integer <span style="margin-left: 15px"><em>optional</em></span> </p> <p style="margin-left: 15px">Starting point in the results, 0-based</p> </td> </tr> <tr> <td style="width: 20%"><p>Return Values:</p></td> <td style="width: 80%"> <p><code>results</code>: Array of Objects</p> <p style="margin-left: 15px">Full results directly from Elastic Search</p> <p><code>timing</code>: Float</p> <p style="margin-left: 15px">Number of milliseconds spent to produce the result</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Basic Elastic Search Query</h4> <p>A basic search for "poets".</p> <h5>Query:</h5> <pre>{ "command": "elastic", "query": { "simple_query_string": { "query": "poets", "default_operator": "and" } }, "size": 2, "from": 0 }</pre> <h5>Response:</h5> <pre>{ "results": { "took": 3, "timed_out": false, "hits": { "total": 4714, "max_score": 2.8193178, "hits": [ { "_id": "36683640", "_score": 2.8193178, "_source": { "nameEntry": "Grano, Paul, 1894-1975", "entityType": "person", "arkID": "http:\/\/n2t.net\/ark:\/99166\/w6cv522g", "id": 36683640, "degree": 5, "resources": 15, "subject": [ "Poets, Australian--20th century", "Australian poetry" ], "occupation": [ "Poets", "Poets." ], "activity": [], "biogHist": [], "hasImage": false, "imageURL": null, "imageMeta": null, "timestamp": "2017-11-01T19:15:51-04:00" } }, { "_id": "50543201", "_score": 2.794444, "_source": { "nameEntry": "O'Hara, John Bernard, 1862-1927", "entityType": "person", "arkID": "http:\/\/n2t.net\/ark:\/99166\/w6wq071g", "id": 50543201, "degree": 7, "resources": 5, "subject": [ "Poets, Australian--20th century" ], "occupation": [ "Poets", "Poets." ], "activity": [], "biogHist": [], "hasImage": false, "imageURL": null, "imageMeta": null, "timestamp": "2017-11-01T20:03:33-04:00" } } ] } }, "result": "success", "timing": 18.34 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="parse_eac">Parse EAC-CPF XML to Constellation (Pre-Alpha)</h2> <div class="row"> <div class="col-md-12"> <p>Parses a given EAC-CPF file into a Constellation JSON object using the SNAC profile.</p> <!-- --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>parse_eac</code></p></td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="add_sameas">Add external links to a constellation</h2> <div class="row"> <div class="col-md-12"> <p>Links a constellation to an external identity on sites such as Wikipedia, VIAF, etc.</p> <!-- <h4>Examples</h4> <h5>Add sameAs links</h5> <p>Checks out a given constellation, adds external links and publishes the constellation</p> <h6>Query:</h6> <pre>{ "command": "add_sameas", "constellationid": 73093297, "sameas_uris": [ "https:\/\/en.wikipedia.org\/wiki\/Franciscus_Gomarus", "https:\/\/id.loc.gov\/authorities\/names\/nb98048106" ], "apikey": "..." }</pre> <h6>Response:</h6> <pre>{ "constellation": { "dataType": "Constellation", "status": "currently editing", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6vz535m", "sameAsRelations": [ { "dataType": "SameAs", "type": { "id": 28225 }, "uri": "https:\/\/id.loc.gov\/authorities\/names\/nb98048106", "id": "83129381", "version": "11258569", "operation": "insert" }, { "dataType": "SameAs", "type": { "id": 28225 }, "uri": "https:\/\/id.loc.gov\/authorities\/names\/nb98048106", "id": "83129382", "version": "11258569", "operation": "insert" } ], "id": 73093297, "version": "11258570" }, "result": "success", "timing": 3052.06 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>add_sameas</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>apikey</code>: String </p> <p style="margin-left: 15px">Valid API Key</p> <p><code>constellationid</code>: Integer </p> <p style="margin-left: 15px">Constellation ID</p> <p><code>sameas_uris</code>: Array </p> <p style="margin-left: 15px">An array of URIs to link this constellation to.</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Add sameAs links</h4> <p>Checks out a given constellation, adds external links and publishes the constellation</p> <h5>Query:</h5> <pre>{ "command": "add_sameas", "constellationid": 73093297, "sameas_uris": [ "https:\/\/en.wikipedia.org\/wiki\/Franciscus_Gomarus", "https:\/\/id.loc.gov\/authorities\/names\/nb98048106" ], "apikey": "..." }</pre> <h5>Response:</h5> <pre>{ "constellation": { "dataType": "Constellation", "status": "currently editing", "ark": "http:\/\/n2t.net\/ark:\/99166\/w6vz535m", "sameAsRelations": [ { "dataType": "SameAs", "type": { "id": 28225 }, "uri": "https:\/\/id.loc.gov\/authorities\/names\/nb98048106", "id": "83129381", "version": "11258569", "operation": "insert" }, { "dataType": "SameAs", "type": { "id": 28225 }, "uri": "https:\/\/id.loc.gov\/authorities\/names\/nb98048106", "id": "83129382", "version": "11258569", "operation": "insert" } ], "id": 73093297, "version": "11258570" }, "result": "success", "timing": 3052.06 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="get_holdings">Get Holdings</h2> <div class="row"> <div class="col-md-12"> <p>Get an array of resources held by a Holding Repository</p> <!-- <h4>Examples</h4> <h5>Get Holdings</h5> <p>Get an array of resources held by a Holding Repository</p> <h6>Query:</h6> <pre>{ "command": "get_holdings", "constellationid": "76778184" }</pre> <h6>Response:</h6> <pre>{ "resources": [ { "id": "7677119", "title": "Report of a focused visit to Oakland Community College ...", "href": "http:\/\/www.worldcat.org\/oclc\/54358612", "relation_count": 2 } ], "result": "success", "timing": 792.5 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>get_holdings</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>constellationid</code>: Integer </p> <p style="margin-left: 15px">Constellation ID</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Get Holdings</h4> <p>Get an array of resources held by a Holding Repository</p> <h5>Query:</h5> <pre>{ "command": "get_holdings", "constellationid": "76778184" }</pre> <h5>Response:</h5> <pre>{ "resources": [ { "id": "7677119", "title": "Report of a focused visit to Oakland Community College ...", "href": "http:\/\/www.worldcat.org\/oclc\/54358612", "relation_count": 2 } ], "result": "success", "timing": 792.5 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="shared_resources">Shared Resources</h2> <div class="row"> <div class="col-md-12"> <p>Get an array of resources related to both constellations </p> <!-- <h4>Examples</h4> <h5>Shared Resources</h5> <p>Get an array of resources held by a Holding Repository</p> <h6>Query:</h6> <pre>{ "command": "shared_resources", "icid1": "29260863", "icid2": "50307952" }</pre> <h6>Response:</h6> <pre>{ "resources": [ { "id": "7960925", "title": "C.S. Lewis collection. [1939].", "href": "http:\/\/www.worldcat.org\/oclc\/667850821" } ], "result": "success", "timing": 792.5 }</pre> --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>shared_resources</code></p></td> </tr> <tr> <td style="width: 20%"><p>Parameters:</p></td> <td style="width: 80%"> <p><code>icid1</code>: Integer </p> <p style="margin-left: 15px">Constellation ID</p> <p><code>icid2</code>: Integer </p> <p style="margin-left: 15px">Constellation ID</p> </td> </tr> <tr> <td style="width: 20%"><p>Examples:</p></td> <td style="width: 80%"> <h4>Shared Resources</h4> <p>Get an array of resources held by a Holding Repository</p> <h5>Query:</h5> <pre>{ "command": "shared_resources", "icid1": "29260863", "icid2": "50307952" }</pre> <h5>Response:</h5> <pre>{ "resources": [ { "id": "7960925", "title": "C.S. Lewis collection. [1939].", "href": "http:\/\/www.worldcat.org\/oclc\/667850821" } ], "result": "success", "timing": 792.5 }</pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> <h2 id="merge_resource"></h2> <div class="row"> <div class="col-md-12"> <p></p> <!-- --> <!--</div> <div class="col-md-8">--> <div class="panel panel-default"> <div class="panel-heading">Usage Information</div> <div class="panel-body"> <table class="table table-noborder"> <tbody> <tr> <td style="width: 20%"><p>Command:</p></td> <td style="width: 80%"><p><code>merge_resource</code></p></td> </tr> </tbody> </table> </div> </div> </div> </div> <p style="text-align: right; margin-top: 0px; padding-top: 0px;"><a href="#">back to top</a></p> </div> </div> </div> <div class="footer footer-inverse"> <div class="container"> <div class="row"> <div class="col-md-4 footer-content"> <p class="text-center"> <img src="https://snaccooperative.org/images/paper_dolls_art2.png" alt="SNAC Cooperative Logo"/><br/> </p> <h4 class="text-center">Social Networks and Archival Context</h4> <p class="text-center" style="margin-top: 5px;"> <a href="https://twitter.com/snaccooperative" title="Visit us on Twitter"> <i class="fa fa-2x fa-twitter-square" style="vertical-align: middle" aria-hidden="true"></i></a> <a href="https://snaccooperative.org/contact" title="Contact us"><span class="fa-stack fa-sm"> <i class="fa fa-square fa-stack-2x"></i> <i class="fa fa-envelope fa-stack-1x" style="color: #000"></i> </span></a> <a href="https://portal.snaccooperative.org/terms_and_privacy" title="Terms and Information"><span class="fa-stack fa-sm"> <i class="fa fa-square fa-stack-2x"></i> <i class="fa fa-life-ring fa-stack-1x" style="color: #000"></i> </span></a> </p> </div> <div class="col-md-4 footer-content"> <p style="font-size: medium; margin-top: 30px;">SNAC is a discovery service for persons, families, and organizations found within archival collections at cultural heritage institutions.</p> </div> <div class="col-md-4 footer-content"> <div class="row"> <h4 class="">Sponsors</h4> <p> <a href="https://www.mellon.org" target="_blank">The Andrew W. Mellon Foundation</a><br> <a href="https://www.imls.gov" target="_blank">Institute of Museum and Library Services</a><br> <a href="https://www.neh.gov" target="_blank">National Endowment for the Humanities</a> </p> <h4 class="">Hosts</h4> <p> <a href="https://library.virginia.edu" target="_blank">University of Virginia Library</a><br> <a href="https://www.archives.gov" target="_blank">National Archives and Records Administration</a> </p> </div> </div> </div> </div> </div> <script> function setCookie(name,value,days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + (value || "") + expires + "; path=/"; } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(";"); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==" ") c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { document.cookie = name+"=; Max-Age=-99999999;"; } $(document).ready(function() { if (!getCookie("acceptprivacy")) $("#privacyDisplay").show(); }); </script> <div id="privacyDisplay" style="display: none; min-height: 30px; width: 100%; position: fixed; bottom: 0px; left: 0px; padding: 10px; background: #111111; color: #ffffff; z-index: 99999;"> <div class="row"> <div class="col-md-6"> We use cookies to understand how you use our site and to improve your experience. By continuing to use our site, you accept our use of cookies, <a href="https://portal.snaccooperative.org/terms_and_privacy">Privacy Policy and Terms of Use</a>. </div> <div class="col-md-6 text-right"> <button class="btn btn-info" id="privacyAccept" onClick="setCookie('acceptprivacy', 'true', 90); $('#privacyDisplay').remove();">Accept and Continue</button> </div> </div> </div> </body> </html>