- API function overview
- API usage
- Link relations
- HTTP methods
- Resources and resource formats
- Security considerations
- Cache considerations
- Feedback/comments by GK (remove this section later)
The stability measurement consists on the evaluation of the RO along time. The idea is to capture concrete values provided by the evaluation of the RO in different moments of its evolution. In other words, by subjecting the snapshots of a RO to the checklist evaluation (that may vary its purpose).
This API will provide a global evaluation of the stability of the RO that is evaluated and a list of measurements that correspond to the snapshots of the RO. The RO that we want to measure, the minim and the purpose will be needed as inputs.
As the usage of this API is very similar to the checklist evaluation service, and some of the concepts are reused from there, it's recommended to take a look to the checklist API for additional information.
Let's suppose that we have available this different set of resources:
- A RO <http://www.ro-examples.com/ro/fakeRO>
- A MINIM minimum information model description (containing checklist definitions including one for repeatability) at <http://www.minim-examples.com/minim/Repeatability.rdf>
- A PURPOSE: The checklist definition in the MINIM model for repeatability is associated with the purpose keyword "Repeatable".
Those will be the inputs needed for calling the webservice, as we can see in the following explanation:
The stability evaluation would then be invoked in a sequence of two HTTP operations:
1.Client retrieves service document:
2.Client parses the service document, extracts the URI template for the checklist evaluation service and assembles URI for the desired evaluation result , and issues a second HTTP GET request:
This relation is generally used used in the service description document
It indicates a relation between a service description and a URI template for RO evaluation results using the described service. The URI template is is used to construct a service result URI by:
- applying the URI template expansion procedures with caller-supplied RO URI, minim URI, purpose and
- resolving the resulting URI-reference to an absolute URI using normal URI resolution rules (e.g. typically, using the service document URI as a base URI)
The only HTTP method available for this API is the GET method. Depending on the content negotiation (which is explained in the next point) we will get a)description of the servic or b)results obtained by the invocation of the stability evaluation.
There are severeal responses that can be provided by the service depending on the type content negotiation. In absence of content negotiation we will get a service description in RDF. We can also negotiate the kind of response of the service with the corresponding parameters in order to get the results in XML or in JSON.
In this section we will explain not only the different kinds of outputs but also the meaning of them. In the examples we will find the following concepts for describing the results:
- ro: the RO that has been evaluated (uri)
- stabilityValue: the main result of the API, the stability value (double between 0 and 1 that reflects the standard deviation of the checklist evaluation values).
- listElements: list of measured snapshots of the RO
- uri: uri of the snapshot (uri)
- value: result obtained by the evaluation the snapshot using the checklist (double between 0 and 1 that shows the percentage of requirements that have been satisfied)
- date: date of the snapshot (DD/MM/YYYY)
Some information additional information:
- Info about the RO Model
- Info about RO Vocabulary specification
- Information about the evaluation of the snapshots:RO checklist evaluation API
- Information about the snapshots:RO evolution
Provisional json Output example:
Provisional xml Output example:
Stability evaluation is a read-only function, so there shouldn't be any security risks of adding or deleting content. The main problem is that this service provides information about the RO and its snapshots, and the person who is going to see the results of the service should have access permissions to it.
Stability measurement is not supposed to change often, so it seems a good idea to have some control in order to avoid excessive use of the service and keep it efficient.
If we are calling the stability evaluation service two or more times in a row we will probably get the same results each time (unless we change the minim or the purpose of the checklist), so it is not necessary to recalculate everything.
TODO: add link
This API is part of the showcase 68
Is strongly related with the checklist evaluation
And uses the work of RO evolution
I think you're on the right lines here, but there are a few areas that might need clarifying a little.
What is the time period over which stability is evaluated; how is it determined? Maybe some additional (optional) template parameters would be appropriate?
I see your notion of stability is closely related to a particular minim-based checklist - roughly you measure the stability of an RO with respect to a particular checklist? If so, it might be sufficient to reference the corresponding checklist API and simply say the paramneters are as defined there. (You don't mention target, but maybe it makes sense that stability is only meaningful with respect to a complete RO?)
I think what's important to capture here is a sense of how a checklist evaluation may change over time, and how that determines a notion of stability.
I would expect the URI template to appear in a service document, probably with its own link relation, so that the usage would cover the essential steps; e.g.
Srtarting with service URI, RO to evaluate, checklist details:
1. Retrieve service document
2. Extract the stability evaluation link and usethe resulting value as a URI template...
3. Retrieve evaluation result using constructed URI
I think this pattern would almost identical to the checklist API, except that a different link relation is used, and (if additional parameters are used to define the time period for the evaluation) some additional values may be referenced by the template.
Nit: the example given shows an RO URI that has not been %-escaped. If the RO or Minim URI contain fragment identifiers, this would cause problems with URI interprtation. For this reason, in the Checklist API, I use the URI-template form
, which causes all URI-reserved charecters to be %-escaped.
You'll need a URI that relates the service document to the URI template for the stability evaluation result. Following the checklist pattern, I'd suggest:
But you can choose your own if you prefer.
You only use GET: I think it's worth stating. This keeps things relatively simple, which is good.
It may be better to make the HTTP method conventions part of the resources descriptions (i.e. muy templkate may be sub-optimal) - we should see how this plays out with the RODL service APIs.
There's no mention of Service Descripotion, which I think is needed. A principle of RESP APIs is that starting with just the URI of the service you can navigate links to find all the resources your application needs to access or manipulate. The service description is what you get when dereferencing the service URI - sometimes called an "API home page" or "Service document". (Other mechanisms are possible, e.g. HTTP Link header, but this seems easy enough in this case.)
You mention RO as a resource, but don't provide description or reference to what it is and possible formats. I suggest using links to the RO model pages.
You don't mention minim description as a resource (could just reference the checklist API description - doesn't need to be long)
The key resource that your API introduces is the stability evaluation result, which you do describe.
Looks good for now. Be prepared to expand on this as and when particular security/privacy threats are identified.
What I'd try to focus on here is how the service interacts specifically with HTTP cacheing.
This is a topic that I introduced in the template because it's such a fundamental aspect of HTTP, and it is so easy to cause incorrectly cached values to be returned. But maybe this isn't something that should be part of every API description. Maybe we should (a) find a write-up on the web, or (b) add a one-off description of issues to the architecture document, then simply reference that?
Probably need references to RO.