[3655] an example of CRUD REST endpoint for geolocations, continents, and us-states
Created by: chenejac
linked PR - PR
What does this pull request do?
Add an example of dynamic actions for CRUD operations over geolocation
What's new?
two n3 files have been added, one is for APIInformation (needed for generating OpenAPI specification), and the another one for geolocationAPI
How should this be tested?
There are endpoints for geolocation, continent and stateOrProvince. Below are examples of HTTP requests for geolocation API.
fetch all geographic locations
GET http://localhost:8080/vivo/api/rest/1.0.0/geolocation/
there is an issue with format of total counts of records - see the issue 3721
adding new geographic location
POST http://localhost:8080/vivo/api/rest/1.0.0/geolocation/ In the HTTP body should be: { "label": "a test geolocation@en-US", "uri": "http://dbpedia.org/resource/TestCountry" }
GET http://localhost:8080/vivo/api/rest/1.0.0/geolocation/ TestCountry should be at the end
getting one geographic location
Return one geolocation (TestCountry)
fetch geographic locations with pagination (limit and offset are mandatory, don't support limit without defined offset)
GET http://localhost:8080/vivo/api/rest/1.0.0/geolocation/?limit=10&offset=20
NOT WORKING
issue description )
fetch geographic locations with sorting (sort by and order are mandatory, don't support sort by without defined order, see theGET http://localhost:8080/vivo/api/rest/1.0.0/geolocation/?sortBy=limit&order=ASC
PR )
deleting (resolved inPR )
editing (resolved inPUT http://localhost:8080/vivo/api/rest/1.0.0/geolocation/resource:aHR0cDovL2RicGVkaWEub3JnL3Jlc291cmNlL1Rlc3RDb3VudHJ5 In the HTTP body should be: { "label": "a test geolocation changed label@en-US", "uri": "http://dbpedia.org/resource/TestCountry" }
Interested parties
@VIVO-project/vivo-committers, @wwelling