DataSet resources and representations » History » Version 1
Version 1/2
-
Next » -
Current version
Guanji Wang, 27/07/2017 17:39
DataSet resources and representations¶
Resources¶
1. Resources List:
- http://localhost:8184/sitools/datasets/{datasetId}
- http://localhost:8184/sitools/datasets/{datasetId}/start
- http://localhost:8184/sitools/datasets/{datasetId}/getSqlString
- http://localhost:8184/sitools/datasets/{datasetId}/stop
- http://localhost:8184/sitools/datasets/{datasetId}/refresh
- http://localhost:8184/sitools/datasets/{datasetId}/notify
- http://localhost:8184/sitools/datasets/{datasetId}/mappings
- http://localhost:8184/sitools/datasets/{datasetId}/mappings/{dictionaryId}
- http://localhost:8184/sitools/datasets/
$HOST_DOMAIN = Starter.PUBLIC_HOST_DOMAIN
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.
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..