Can we execute datameer jobs through REST API instead of going to Datameer web UI?
AnsweredHi there,
Can we execute(run) datameer jobs through REST API instead of going to datameer web UI?
Thanks,
-
Hi Jee,
Yes, there are REST API calls to Start the various types of artifacts.
For further information, please see our documentation:
-
Hi Alan,
Thanks for your reply. I am trying to execute a Export job through Datameer browser like below:
https://xxx.com:8443/rest/job-execution?configuration=947
But, it gives error
{ "status": "failure", "reason": "Not yet implemented. get-all" }
I also tried to execute using REST API curl command like
curl -k -u 'jk:abc' -X POST 'https://xxx.com:8443/rest/job-execution?configuration=947'
But, It is neither running nor reply any error -
Hi Jee,
Because this is a POST request, you won't be able to execute it from the browser.
It's odd that you get no response at all. I just tested the functionality on my Datameer instance and it returns an error if you put in an invalid configuration id, it returns a success json element if it works, and if you can't resolve the host curl complains about that...
Do you have another host you might be able to try the curl command from? The syntax you used does look good. -k to disable SSL, userid/pass, -X POST, and then url itself.
$ curl -k -u 'alan:password' -X POST 'https://localhost:8443/rest/job-execution?configuration=32'
{
"status": "success",
"job-execution-id": 132,
"job-execution-user": "alan",
"job-execution-trigger": "RESTAPI"
}This is what a good response looks like.
Post is closed for comments.
Comments
4 comments