Page History
Table of Contents |
---|
These web RESTful services use a JSON exchange format (ei-x) to allow external parties to create and update resources in an eagle-i repository. They are currently deployed in the development server:
...
- authentication is still to be implemented (this very first pass uses no authentication). This will most likely be HTTP BasicAuth over HTTPS
- error codes not properly handled
- currently no ontology-level validation of externally-produced resource descriptions
The ei-x JSON request and response formats
...
Browse the Java code from which these are serialized:
EIExchangeInstance field descriptions:
...
The most specific ontology type assigned to the resource. The type EIURI can be obtained from the ontology browser (grab it from the URL bar), e.g. DNA Sequencer: http://purl.obolibrary.org/obo/OBI_0400103
rootType -- EIURI
The root type of the resource (one of the eagle-i Primary Types), e.g. Instrument: http://purl.obolibrary.org/obo/ERO_0000004
foreignKey -- String
A string that uniquely identifies the resource in its external location (format determined by the source)
...
newlyCreatedUriToForeignKey -- Map<String, String>
Newly created URIs and their foreign keys. Note that there can be multiple eagle-i URIs for a single foreign key (to cover the use case of an external resource being split into more granular reagle-i records)
updatedUriToForeignKey -- Map<String, String>
Updated resource URIs and their foreign keys. Same remark as above.
failures -- Map<String, String>
the eagle-i URI of the resource that failed, and an error message
REST service description
Obtain an ei-x representation of a resource
URL:
/sweet/api/externalResource
...
No Format |
---|
http://montana.dev.eagle-i.net/sweet/api/externalResource?uri=http://montana.dev.eagle-i.net/i/0000012f-989d-df6c-b822-788380000000 |
Result:
resource information in ei-exfEIExchangeInstance in JSON
Create or update a resource in an eagle-i repository
URL:
/sweet/api/externalResource
Method:
POST
Args:
exchangeInstance
-- the EIExchangeInstance JSON of the primary resource and secondary resources to be created/updated (no instance URI indicates that the resource should be created
pretty
-- true | false, return prettified JSON (useful for debugging)
Result:
InstanceUpdateResponse in JSON, indicating successes and failures