Consuming EMIR Service Endpoint Records (SER)

Every previously published Service Endpoint Records (SER) can be queried from the EMIR databases if user is allowed. The queries can be:

  • customized by setting up filter parameters
  • paginated
  • result format can be selected (JSON or XML)

To access the query method of the services interface HTTP GET or POST method have to be used. The services interface can be addressed usually on the http[s]://host.domain:port/services URL.

All of the stored attributes can be used as a filter. The list of allowed values can be found on the EMIR Service Endpoint Record Description wiki page.

The filters has to sent as GET parameter key-value pairs or as POST where more complex query expression can be defined.

The result format is defined by the Accept HTTP header. If non of this headers is present, then JSON will be sent.

Example usage:

curl -v -H "Accept:application/xml" -X GET http://host.domain:port/services?Service_Endpoint_ID=<MyServiceID>
curl -v -H "Accept:application/json" -X GET http://host.domain:port/services?Service_Endpoint_ID=<MyServiceID>

The pagination can be accessed under services/pagedquery. The number of results on one page can be defined by pageSize, while the first element on the page by the ref GET parameter.

Example usage:

curl -v -H "Accept:application/json" -X GET http://host.domain:port/services/pagedquery?Service_Type=<MyServiceType>&pageSize=10

Example usage in case of client-side authentication with curl:

curl -v -H "Accept:application/json" -X GET https://host.domain:port/services -k --cert /path/client.pem:pass --key /path/key.pem

-- IvanMarton - 13-Jul-2012

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r3 - 2012-07-18 - IvanMartonExCern
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EMI All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback