Project

General

Profile

DataSet resources and representations

Resources

1. Resources List:

URL Verb Description Code Response Comments
/datasets/{datasetsId} GET Method to retrieve a single or all datasets 200 The dataset's nodes' information as JSON
/datasets/{datasetsId} DELETE Method to delete a dataset by ID 200 The dataset's nodes' information as JSON
/datasets/{datasetsId}/start PUT Activate the dataset {datasetId} 200 The dataset's nodes' information as JSON
/datasets/{datasetsId}/stop PUT deactivate the dataset {datasetId} 200 The dataset's nodes' information as JSON
/datasets/{datasetsId}/getSqlString PUT Builds and returns the underlying datasource SQL request string for the dataset. 200 get success message and sql as JSON
/datasets/{datasetsId}/refresh PUT Method to refresh dataset status {datasetId} 200 The latest dataset's nodes' information as JSON
/datasets/{datasetsId}/notify PUT Manage notification of dataset resources updating 200 OK Response sent to indicate that handling occured
/datasets/{datasetsId}/notify PUT Manage notification of dataset resources updating 403 Sitools2 error page - The server understood the request, but is refusing to fulfill it Request not authorized due to roles and methods access security configuration for this user.
/datasets/{datasetsId}/mappings GET Method to retrieve the complete dictionaries mapping 200 Dictionaries mapping information as JSON Returns a SITools2 response, indicating if the object retrieval was OK or not, and containing the object if yes.
/datasets/{datasetsId}/mappings GET Method to retrieve the complete dictionaries mapping 403 Sitools2 error page - The server understood the request, but is refusing to fulfill it Request not authorized due to roles and methods access security configuration for this user.
/datasets GET Method to the list of all projects available in Sitools. 200 Dataset's information as JSON
/datasets GET Method to the list of all projects available in Sitools. 403 Sitools2 error page - The server understood the request, but is refusing to fulfill it

2. Methods:
  • GET: Method to retrieve a single or all datasets
  • PUT:
    1. PUT /{datasetId}/start: Performs a start action on the dataset making the related DatasetApplication ACTIVE.
    2. PUT /{datasetId}/getSqlString: Builds and returns the underlying data source SQL request string for the dataset.
    3. PUT /{datasetId}/stop: Performs a stop action on the dataset making the related DatasetApplication INACTIVE.

3. Examples:

curl -u $username:$userpwd -X PUT http://$localhost/sitools/datasets/$dataset_id/start

curl -u $username:$userpwd -X PUT http://$localhost/sitools/datasets/$dataset_id/start

curl -u $username:$userpwd -X PUT http://$localhost/sitools/datasets/$dataset_id/getSqlString

4. Results of the above examples:

1. Performs a stop action on the dataset

2. Performs a start action on the dataset

3. Builds and returns the underlying data source SQL request string for the dataset.

5. PUT and POST

  • POST: Used to modify and update a resource. It is idempotent(Do it as many times I want with the same result at last).
  • PUT: Used to create a resource, or overwrite it. While you specify the resources new URL. It is not idempotent.
  • POST can't be used for modifying the status of a dataset in Sitools.

Representations

  • JSON response output representation (application/json - )

Example:

http://idoc-medoc-test/webs_PICARD_dataset?media=json

Then all information about the dataset come, including all XML nodes infomation, id, name, status, description, columnModel result block etc..