Difference between revisions of "SStorageRest"

From Gcube Wiki
Jump to: navigation, search
(Usage examples)
(Usage examples)
Line 37: Line 37:
 
==Usage examples ==
 
==Usage examples ==
  
Post method is used to create new resource. Here we are adding new JSON object to the related collection:
+
To insert (create) a new record in the system, we might use:
 +
POST n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources?gcube-token=xxxxxxxx
  
http://n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources?gcube-token=xxxxxxxx
 
  
 +
To read a object with  ID# 33245:
 +
GET http://n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources/33245?gcube-token=xxxxxxxx The same URI would be used for PUT and DELETE, to update and delete, respectively.
  
Use get method to check if above json have been added to the related collection:
+
Here are proposed URIs for products:
 +
POST http://n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources?gcube-token=xxxxxxxx for creating a new object.
  
http://n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources?gcube-token=xxxxxxxxx
+
GET|PUT|DELETE http://n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources/33245?gcube-token=xxxxxxxx
 
+
for reading, updating, deleting object with id 66432, respectively.
In this way the service return all the object in the collection.
+
  
 
= Deployment =
 
= Deployment =

Revision as of 13:42, 8 March 2017


Overview

A RESTful service providing functions for create, update, read a json object on MongoDB

Key features

The core of the service is java based. It offers a interface for performing CRUD operation through a remote backend over JSON object:

  • Create
  • Read
  • Update
  • Delete


Design and Architecture

TO-DO

Access Mode

TO-DO


Supported Operations

TO-DO

Getting-Started

Maven artifacts

Usage examples

To insert (create) a new record in the system, we might use: POST n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources?gcube-token=xxxxxxxx


To read a object with ID# 33245: GET http://n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources/33245?gcube-token=xxxxxxxx The same URI would be used for PUT and DELETE, to update and delete, respectively.

Here are proposed URIs for products: POST http://n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources?gcube-token=xxxxxxxx for creating a new object.

GET|PUT|DELETE http://n039.smart-applications.area.pi.cnr.it:8080/storage/rest/resources/33245?gcube-token=xxxxxxxx for reading, updating, deleting object with id 66432, respectively.

Deployment