Goal
Learn to perform job operations based on a Datameer file path using the REST API.
Learn
There might be a scenario where you want to make a REST API call based on a file path within Datameer. Right now, the API can be made only with IDs, such as configuration ID, file ID, job execution ID, UUI, etc. To accomplish that, perform the following procedure.
Example:
1. Export a list of all existing export jobs in the system by using the REST API.
This gives a output like the following:
[
{ "description": "", "id": 272, "name": "exp_kp0705_oracle", "path": "/ExportJobs/exp_kp0705_oracle.exp" }
,
{ "description": "", "id": 427, "name": "exp hdfs", "path": "/ExportJobs/tester/exp hdfs.exp" }
,
…
]
2. Match the value in the path with the target export-job path (such as /Admin/REST_API_TestExportJob.exp).
3. Store the ID of the corresponding path.
4. Delete the export job by using this ID.
curl -u <username>:<password> -X DELETE 'http://<Datameer-serverIP>:<port-number>/rest/export-job/<export-job-configuration-id>'
Comments
0 comments
Please sign in to leave a comment.