VIVO Documentation
Old Release
This documentation relates to an old version of VIVO, version 1.11.x.
Looking for another version? See all documentation.
Overview
Purpose
Permits external applications to obtain a list of all Individuals in VIVO that belong to a specified class. For example, a list of all Persons, or a list of all Organizations.
This API complements the Linked Open Data API. The Linked Open Data standard describes a way to get data about any Individual, but it does not provide a way to get a list of Individuals to begin with.
Filtered results
The results of this query is filtered by the same VIVO policies that control Linked Open Data. Individuals may be omitted from the results, if those policies restrict access to those Individuals.
Use Cases
Harvesting data from VIVO
Data in VIVO is available to other applications via Linked Open Data - requests and responses. A list of Individuals from this API may provide a starting point for such applications.
Multi-site search index
If an external application chooses to build a compendium from several VIVO sites, it will need to know what Individuals are present in each site.
Specification
URL
[vivo]/listrdf
Examples:
http://vivo.cornell.edu/listrdf
http://localhost:8080/vivo/listrdf
HTTP Method
The API supports HTTP GET or POST calls.
Parameters
name | value |
---|---|
vclass | the URI of the class to be listed. |
Response Codes
Code | Reason |
---|---|
200 OK | SPARQL query was successful. |
400 Bad Request | HTTP request did not include a vclass parameter. |
406 Not Acceptable | The Accept header does not include any available content types. |
500 Internal Server Error | VIVO could not execute the request; internal code threw an exception. |
Content of the response
The response will contain RDF triples. Each triple asserts that an Individual is an instance of the requested class.
Available content types
The request may include an Accept
header, to specify the preferred content type of the response. If no Accept
header is provided, the preferred content type is assumed to be text/plain
.
MIME type in the Accept header | Response format | Format description |
---|---|---|
text/plain | N-Triples | http://www.w3.org/2001/sw/RDFCore/ntriples/ |
application/rdf+xml | RDF/XML | http://www.w3.org/TR/rdf-syntax-grammar/ |
text/n3 | N3 | http://www.w3.org/TeamSubmission/n3/ |
text/turtle | Turtle | http://www.w3.org/TeamSubmission/turtle/ |
application/json | JSON-LD | http://www.w3.org/TR/json-ld/ |
Examples
These examples use the UNIX curl
command to issue queries to the API.
Continents as N-Triples example
This example requests a list of vivo:Continent
Individuals, in N-triples format.
curl -i -d 'vclass=http://vivoweb.org/ontology/core#Continent' -H 'Accept:text/plain' 'http://localhost:8080/vivo/listrdf'
The response looks like this:
<http://aims.fao.org/aos/geopolitical.owl#Africa> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Continent> . <http://aims.fao.org/aos/geopolitical.owl#Europe> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Continent> . <http://aims.fao.org/aos/geopolitical.owl#Antarctica> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Continent> . <http://aims.fao.org/aos/geopolitical.owl#northern_America> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Continent> . <http://aims.fao.org/aos/geopolitical.owl#South_America> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Continent> . <http://aims.fao.org/aos/geopolitical.owl#Australia_and_New_Zealand> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Continent> . <http://aims.fao.org/aos/geopolitical.owl#Asia> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Continent> .
Faculty Members as JSON-LD example
This example requests a list of vivo:FacultyMember
Individuals, in JSON.
curl -i -d 'vclass=http://vivoweb.org/ontology/core#FacultyMember' -H 'Accept:application/json' 'http://localhost:8080/vivo/listrdf'
The response (for a very small VIVO) looks like this:
[{"@id":"http://vivo.mydomain.edu/individual/n4295","@type":["http://vivoweb.org/ontology/core#FacultyMember"]},{"@id":"http://vivo.mydomain.edu/individual/n5056","@type":["http://vivoweb.org/ontology/core#FacultyMember"]},{"@id":"http://vivo.mydomain.edu/individual/n7630","@type":["http://vivoweb.org/ontology/core#FacultyMember"]},{"@id":"http://vivoweb.org/ontology/core#FacultyMember"}]