3. Why develop against CTS2?
CTS2 Development Framework
supports XML, JSON, and JSONP
• JSONP is useful in avoiding Cross-Site-Scripting conflicts in
browsers
Resources are linked via Hypermedia
• Even though a WADL is provided, Resources may be
dynamically traversed via hrefs. Little prior knowledge of
the service is needed
Result Sets are page able
• All result sets have „next‟, „previous‟ hrefs
4. What exists right now
• The CTS2 Development Framework
https://github.com/cts2/cts2-framework
• Bioportal -> CTS2 Wrapper
https://github.com/cts2/bioportal-service
• eXist implementation
https://github.com/cts2/exist-service
5. REST API Signatures
General Pattern:
• Resource by name
/[resourceName]/{resourceId}
• Resource by uri
/[resourceName]byuri?uri={uri}
• List of Resources
/[resourceName]s
6. REST API Signatures
Sub-resources follow the same pattern
• Resource by name
/[resourceName]/{resourceId}/[subresource]/{id}
• All subresources are linked via hrefs
WADL specification:
http://informatics.mayo.edu/svn/trunk/cts2/spec/ps
m/rest/cts2.wadl
7. REST API Signatures
Our goal is that by Hypermedia, limited
initial knowledge of the service URL
structure is needed.
In fact, CTS2 QUERY/READ services
function like many services we use
every day
9. JSON Format (con‟t.)
• Every resource may be returned as
JSON
• Adding a „callback‟ parameter
enables JSONP
callback({"codeSystemVersionCatalogEntry”
{"codeSystemVersionName":"GO_2-0_OBO","versionOf … })
10. Searching
• Search widget
• Searching for Entities based on a
search string
http://informatics.mayo.edu/cts2widgets/search.html
11. Searching
• Map Search widget
• Searching ontology mappings based
on queries of either the source or
target
http://informatics.mayo.edu/cts2/rest/widgets/viewmap.html
12. ChangeSet Workflow
• What is a ChangeSet?
An ordered collection of changes that, when
applied, will transform a service instance
from one consistent state to another. A
ChangeSet is viewed as an atomic unit of
change.
13. ChangeSet Workflow
• ChangeSets
ChangeSets can be created, committed, and rolled back. They
are similar to a source control branch.
Content in ChangeSets does NOT appear in normal lookups
and queries, although they MAY be included if explicitly asked
for.
15. ChangeSet Workflow
• Creating a Resource within a given
ChangeSet
• Any Resource state change must
be within the context of a
ChangeSet
16. ChangeSet Workflow
• Creating two branches of changes for
the same resource
• The same resource may exist in
different states in different
ChangeSets
17. ChangeSet Workflow
• Committing a ChangeSet
• Committing a ChangeSet moves
the content of a ChangeSet into
the main service content
18. ChangeSet Workflow
• Rolling back a ChangeSet
• A rollback will remove all of the
content associated with the
change set, as well as the change
set itself
21. But WHY?
• What is this useful for?
There are many well designed REST services out there – do I
use them all? NO!
Our Goal:
A RESTful, Hypermedia based, self describing service that fills a
community need.
The key is whether the data coming back fills a community
need. Users will still use a poorly designed REST service if it
fills a need. Conversely, a perfectly designed RESTful service
that doesn‟t fill a useful need is still not useful.
23. What need does CTS2 fill?
“Pluto is a Planet”
What is Pluto?
What is a Planet? Is it the International Astronomical Union
definition? Some people have rejected their definition and
defined their own.
Is “Pluto is a Planet” interoperable?
24. What need does CTS2 fill?
“Pluto is a Planet”
http://purl.bioontology.org/ontology/MSH/D018542
http://purl.bioontology.org/ontology/MSH/D016083
25. Use-case discussion
Given a Use-case:
• Does the CTS2 Spec include it?
• Do we have tools to do it now?
• If not, could they be created? How?