Can we execute datameer jobs through REST API instead of going to Datameer web UI?


Hi there,

 Can we execute(run) datameer jobs through REST API instead of going to datameer web UI?




Jee Answered


  • Avatar

    Hi Alan,

    Thanks for your reply.  I am trying to execute a Export job through Datameer browser like below:

    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 ''

    But, It is neither running nor reply any error
    Comment actions Permalink
  • Avatar
    Alan Mark

    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.

    Comment actions Permalink
Post is closed for comments.