Publishing Service Endpoint Record (SER) to EMIR
SER Lifecycle
In the lifecycle of a Service Endpoint Record (SER) three different step has to be taken:
The last step is optional since EMIR is a soft-state database the unforgotten entries are going to be deleted automatically after a while.
SER Registration
To access this method of the serviceadmin interface HTTP
POST method have to be used. Since EMIR version 1.2.0 the HTTP
PUT is able to use for a registration. The serviceadmin interface can be addressed usually on the http[s]://host.domain:port/serviceadmin URL.
The correspondant JSON document should be composed and sent in the body of the HTTP request.
Example usage:
curl -v -H "Content-Type:application/json" -X POST http://host.domain:port/serviceadmin -d @info.json
SER Update
To access this method of the serviceadmin interface HTTP
PUT method have to be used. The serviceadmin interface can be addressed usually on the http[s]://host.domain:port/serviceadmin URL.
The correspondant JSON document should be composed and sent in the body of the HTTP request.
The updated service entry will be identified by the
Service_Endpoint_ID property that has to be included by the JSON document itself.
The update messages should repeat until the whole lifetime of the registered service more frequently than the validity period.
Example usage:
curl -v -H "Content-Type:application/json" -X PUT http://host.domain:port/serviceadmin -d @info-updated.json
SER Delete
To access this method of the serviceadmin interface HTTP
DELETE method have to be used. The serviceadmin interface can be addressed usually on the http[s]://host.domain:port/serviceadmin URL.
The ID of the service to be deleted has to be sent as the value of the
Service_Endpoint_ID GET parameter.
Example usage:
curl -v -X DELETE http://host.domain:port/serviceadmin?Service_Endpoint_ID=<MyServiceID>
Service Endpoint Record (SER)
The Service Endpoint Record (SER) is a JSON document consists of key-value pairs, where values can be possible structures. The allowed values can be found on the
EMIR Service Endpoint Record Description wiki page.
The mandatory elements are also listed there.
Example JSON documents can be found on the
project github site.
There is also a higher level client available that is developed and maintained by the EMIR PT and that is called
EMIR-SERP as EMI Registry - Service Endpoint Record Publisher. This client manage the records during their whole lifetime from composing the JSON documents automatically based on the information queried from resource BDIIs, until the registration to or deletion from EMIR services.
--
IvanMarton - 13-Jul-2012