Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In most cases, the time required to re-inference the model is greater than the time required to rebuild the search index. Unfortunately, the reasoning process is not easy to partition. To date, VIVO has no service that would allow you to update the inferences on a limited set of data.

Specification

Warning

BOGUS FROM HERE ON DOWN.

 

URL

[vivo]/searchService/updateUrisInSearch

Examples:

 

http://vivo.cornell.edu/apisearchService/sparqlUpdateupdateUrisInSearch

 

 

http://localhost:8080/vivo/apisearchService/sparqlUpdateupdateUrisInSearch

 

HTTP Method

The API supports only HTTP POST calls. GET, HEAD, and other methods are not supported, and will return a response code of 400 Bad Requestrequests with a content type of multipart/form-data.

If the request does not specify an encoding, UTF-8 is assumed.

Parameters

name
value
emailthe email address of a VIVO adminstrator administrator account
passwordthe password of the VIVO administrator account
updateA SPARQL Update request

The syntax for a SPARQL Update request is described on the World Wide Web Consortium site at http://www.w3.org/TR/2013/REC-sparql11-update-20130321/

Limitation

otherOne or more content parts, containing URIs to be indexed, separated by white space and/or commas

The name of the file content is unimportant. The API will examine all parts of the request and add any URIs to the list to be indexed. It is common, however, to put the entire list of URIs into a single content partThe API requires that you specify a GRAPH in your SPARQL update request. Insertions or deletions to the default graph are not supported.

Response Codes

The SPARQL Update request was syntactically incorrect
CodeReason
200 OKSPARQL Update was successful.
400 Bad RequestIncorrect HTTP method; only POST is accepted.
HTTP request did not include an update parameter.
The SPARQL Update request did not specify a GRAPH.
Search indexing request was successful.
403 ForbiddenHTTP request did not include an email parameter.
HTTP request did not include a password parameter.
The combination of email and password is not valid.
The selected VIVO account is not authorized to use the SPARQL Update API.
500 Internal Server ErrorVIVO could not execute the request; internal code threw an exception.

Examples

These examples use This example uses the UNIX curl command to insert and delete data using the API.

...

to request updates to the search records of 3 individuals.

Code Block
curl -v --form 'email=testAdmin@mydomain.edu' --form 'password=Password' --form 'uris=@uriList.txt' 'http://localhost:8080/vivo/searchService/updateUrisInSearch'
Code Block
titleuriList.txt
http://vivo.mydomain.edu/individual/n6724
http://vivo.mydomain.edu/individual/n90987
http://vivo.mydomain.edu/individual/n32

Securing the API

 

Note

In VIVO release 1.6, the Search Indexing service is enabled by default. However, it is recommended that you secure the URL /searchService with HTTPS. Otherwise, email/password combinations will be sent across the network without encryption. Methods for securing the URL will depend on your site's configuration.