Difference between revisions of "Resource Registry Service - Query & Access"

From Gcube Wiki
Jump to: navigation, search
(Created page with "Category: Developer's Guide Category: Information System {| align="right" ||__TOC__ |} This sections provide information regarding how to interact with Information...")
 
Line 23: Line 23:
 
</pre>
 
</pre>
  
To use the client you need first get a ''ResourceRegistryClient'' instance.  
+
To use the client you need first get a ''ResourceRegistryClient'' instance.
By using ResourceRegistryClientFactory.create() method the library discover the correct endpoint to interact with the Resource Registry for the current context.
+
 
 +
By using ''ResourceRegistryClientFactory.create()'' method the library discover the correct endpoint to interact with the Resource Registry for the current context.
  
 
<pre>
 
<pre>

Revision as of 18:01, 8 November 2017

This sections provide information regarding how to interact with Resource Registry Service for Query and Access. REST and JAVA API are presented for each functionality.

Please note that the provided examples can intentionally hide some details in the response to avoid unneeded complexity.


Apart the REST API this port type can be used also by using Resource Registry Client java client.


Resource Registry Client has the following maven coordinates

<dependency>
	<groupId>org.gcube.information-system</groupId>
	<artifactId>resource-registry-client</artifactId>
	<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>

To use the client you need first get a ResourceRegistryClient instance.

By using ResourceRegistryClientFactory.create() method the library discover the correct endpoint to interact with the Resource Registry for the current context.

SecurityTokenProvider.instance.set("Your-NextNext-Token-Here"); //If not already set
ResourceRegistryClient resourceRegistryClient = ResourceRegistryClientFactory.create();



Exists

HEAD /resource-registry/access/instance/{ER-Type}/{INSTANCE UUID}

Example

HEAD /resource-registry/access/instance/ContactFacet/4d28077b-566d-4132-b073-f4edaf61dcb9


Get Instance

GET /resource-registry/access/instance/{ER-Type}/{INSTANCE UUID}

Example

GET /resource-registry/access/instance/ContactFacet/4d28077b-566d-4132-b073-f4edaf61dcb9


Get All Instances of a Specific Type

GET /resource-registry/access/instances/{ER-Type}?[polymorphic=(true|false)][&reference={INSTANCE UUID}][&direction=(in|out|both)]

Default:

* polymorphic : false
* direction : both

direction has sense only if reference UUID is provided, is ignored otherwise.


GET /resource-registry/access/instances/EService?polymorphic=true
GET /resource-registry/access/instances/EService?polymorphic=true&reference=4d28077b-566d-4132-b073-f4edaf61dcb9&direction=(in|out|both)


Raw Query

GET /resource-registry/access?query=SELECT FROM Facet