Difference between revisions of "Interaction with SDI-Service"
(→Exposed Interfaces) |
(→SDI) |
||
Line 37: | Line 37: | ||
This interface returns the complete configuration of the SDI in the caller's context. The following is a typical response from this interface : | This interface returns the complete configuration of the SDI in the caller's context. The following is a typical response from this interface : | ||
− | <source lang="JavaScript"> | + | <source lang="JavaScript" line highlight="3,23,42"> |
{ | { | ||
Line 83: | Line 83: | ||
} | } | ||
</source> | </source> | ||
+ | |||
===GeoServer=== | ===GeoServer=== | ||
===Metadata=== | ===Metadata=== |
Revision as of 14:43, 4 July 2017
SDI-Service is a REST service aimed to offer a simplified interface to SDI administration over the infrastructure and to most common use cases in dealing with geospatial data. This page illustrates the interface exposed by the service and how to interact with it.
Contents
Interaction
Thanks to the SDI-Service application can gather details on SDI facilities offered by the infrastructure. Every response returned by the service is contextualized by the request's gcube-token meaning :
- Configuration is related to the context (INFRASTRUCTURE, VO or VRE) of the request
- Credentials and accessible data spaces are related to the current ROLES associated with the authenticated calling user
Invocations to SDI-Service may trigger on-the-fly initialization of SDI resources, where needed. Being a SmartGears service, it is automatically published in the infrastructure's Information System with coordinates :
- Service Class : SDI
- Service Name : sdi-service
REST Invocation
SDI-Service is a SmartGears web application offering a REST interface, thus it can be invoked with simple HTTP requests. Every HTTP request to the service must contain a proper gcube-token property (as HTTP header or as query string parameter) in order to be authenticated and authorized. See #REST Interface for interface description.
JAVA Clients
For Java applications, a client library is distributed along with the service. The library facilitates the interaction with the service, automatically dealing with token and providing both an object model and a better fault management (see #Client library for more details). Such library is distributed as a maven artifact with the following coordinates
<groupId>org.gcube.spatial.data</groupId> <artifactId>sdi-library</artifactId>
REST Interface
This section describes the interfaces exposed by SDI-Service and how to interact with it with HTTP requests. It is required that every request is authorized, meaning that it must contain a proper gcube token (see details here).
Exposed Interfaces
This section describes the interfaces exposed by SDI-Service, listing their methods and expected parameters. HTTP Response are returned and the content is represented in JSON.
The base path for every request , referred to as <BASE_PATH> from now on, is : https://<HOSTNAME>/sdi-service/gcube/service
SDI
- PATH : <BASE_PATH>/SDI
- METHOD : GET
This interface returns the complete configuration of the SDI in the caller's context. The following is a typical response from this interface :
{
"contextName" : "...",
"geonetworkConfiguration" : {
"version" : {
"major" : 2,
"minor" : 6,
"build" : 0
},
"baseEndpoint" : "...",
"accessibleCredentials" : [ {
"username" : "...",
"password" : "...",
"accessType" : "CKAN"
}, {
"username" : "...",
"password" : "...",
"accessType" : "CONTEXT_USER"
} ],
"contextGroup" : "...",
"sharedGroup" : "...",
"publicGroup" : "..."
},
"geoserverClusterConfiguration" : {
"availableInstances" : [ {
"version" : {
"major" : 2,
"minor" : 1,
"build" : 2
},
"baseEndpoint" : "...",
"accessibleCredentials" : [ {
"username" : "...",
"password" : "...",
"accessType" : "ADMIN"
} ],
"confidentialWorkspace" : ...,
"contextVisibilityWorkspace" : ...,
"sharedWorkspace" : ...,
"publicWorkspace" : ...
} ]
},
"threddsConfiguration" : ...
}