Example resources suitable for minimal testing (Mandatory properties only).
Namespace details must conform with the current vo-dml model used.
<SimpleObservation xmlns:caom2="http://ivoa.net/dm/models/vo-dml/experiment/caom2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="caom2:SimpleObservation">
<collection>e-merlin</collection>
<uri>urn:obs:jbo:20170801:obs1</uri> //Must be unique
<intent>science</intent>
</SimpleObservation>
@type has to be set for JSON
{
"@type": "caom2:caom2.SimpleObservation",
"collection": "test",
"uri": "urn:obs:jbo:20170801:obs1",
"intent": "science"
}
<DerivedObservation xmlns:caom2="http://ivoa.net/dm/models/vo-dml/experiment/caom2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="caom2:DerivedObservation">
<collection>test</collection>
<uri>urn:obs:jbo:20170801:obs1</uri>
<intent>science</intent>
<members>jbo-simple1</members>
<members>jbo-simple2</members>
</DerivedObservation>
Details of the functionality of the archive-service endpoints.
GET
/observations
(Returns either all of the observations OR a paginated subset if optional page and size parameters supplied)
name type data type description collectionId optional String Filter by collection Id if required (not supplying will return all). page optional integer The page index, zero-indexed size optional integer The number of observations to return for each page, must be greater than zero.
http code content-type response 200
application/xml
Returned successfully
400
text/plain
{"code":"400","message":"Bad Request"}
curl -X 'GET' -H 'accept: application/xml' 'http://localhost:8080/observations'
GET
/observations/{observationId}
(Returns an Observation with the supplied ID, if found)
name type data type description observationId required String The unique identifier of a specific Observation (Simple or Derived)
http code content-type response 201
application/xml
Observation found and returned successfully
400
text/plain
{"code":"400","message":"Bad Request"}
404
text/plain
Observation not found
curl -X 'GET' 'http://localhost:8080/observations/23456' -H 'accept: application/xml'
POST
/observations
(Add a new observation)
http code content-type response 201
application/xml
Observation added successfully, body contains new Observation
400
text/plain
{"code":"400","message":"Bad Request"}
curl -X 'POST' -H 'Content-Type: application/xml' -H 'accept: application/xml' --data "@observation2.json" http://localhost:8080/observations
with JSON response also
curl -X 'POST' -H 'Content-Type: application/json' -H 'accept: application/json' --data "@observation2.json" http://localhost:8080/observations
UPDATE
/observations/{observationId}
(Updates an observation (Simple or Derived) with the same observationId)
name type data type description observationId required String The unique identifier of a specific observation to update
http code content-type response 200
application/xml
Observation updated successfully
400
text/plain
{"code":"400","message":"Bad Request"}
404
text/plain
Observation not found
curl -X 'PUT' -H 'Content-Type: application/xml' -H 'Accept: application/xml' -T observation2.xml http://localhost:8080/observations/988
DELETE
/observations/{observationId}
(Delete an Observation with the supplied ID, if found)
name type data type description observationId required String The unique identifier of a specific Observation (Simple or Derived)
http code content-type response 204
application/xml
Observation deleted
400
text/plain
{"code":"400","message":"Bad Request"}
404
text/plain
Observation not found
curl -X 'DELETE' 'http://localhost:8080/observations/delete/123' -H 'accept: */*'
GET
/collections
(Returns the names of all the collections as a TSV (Tab Separated List))
http code content-type response 200
text/plain
Returned successfully
400
text/plain
{"code":"400","message":"Bad Request"}
curl -X 'GET' -H 'accept: application/xml' 'http://localhost:8080/collections'
The TAP schema is currently added to the database with the import.sql file which runs automatically on startup and adds the required tables to the database. This is followed by a bean (TapSchemaPopulator) that will read the database and add each type (Observation etc.) to the generated TAP schema entries.
TODO: Generate a VO-DML/XSD model definition so that the TAP schema entries can be auto-added in the same way as the CAOM library.
Navigate to the /tap endpoint (http://localhost:8080/tap for example), the host is the root of the archive-service.
This displays the default Vollt user interface and displays links to the standard utilities:
- async
- tables
- capabilities
- examples
- availability
- sync
along with a textbox to run experimental queries.
Update resources/templates/tapProperties.txt
as required.
One setting that may need changing is file_root_path
it should resolve to a local folder (Windows requires full path too)
file_root_path = /some/linux/path
Using Stilts TapLint utility, any issues can be highlighted.
java -jar .\stilts.jar taplint interface=tap1.0 tapurl=http://localhost:8080/tap
Can be focused on a subset if required using the report
parameter, see Usages
Caution: Some of the TapLint tests seem to assume TAP 1.1 compliance and Vollt is currently 1.0. So double-check any issues with the specifications: