AnsweredAssumed Answered

How do I delete scheduler jobs via REST API?

Question asked by Dirk Sachse on Feb 15, 2019
Latest reply on Feb 18, 2019 by Dirk Sachse

This is how I get a list of all scheduled jobs:

 

curl -H "Accept: application/json" --noproxy "*" -k -s --basic -u admin:password -X GET http://localhost:8080/pentaho/api/scheduler/getJobs | jq '.job' | grep jobId

 

Output looks like this:

 

    "jobId": "admin\tCBS_2_DWH_001\t52ca3816-3136-11e9-a0df-54ee75cd09eb",

    "jobId": "admin\tCBS_2_DWH_001\t56a0e299-3136-11e9-a0df-54ee75cd09eb",

    "jobId": "admin\tPentahoSystemVersionCheck\te70feb70-30fd-11e9-a0df-54ee75cd09eb",

 

The delete call should be like this:

 

curl -H "Content-Type: application/json" -u admin:password -X DELETE http://localhost:8080/pentaho/api/scheduler/removeJob --data '{"jobId":"admin\tCBS_2_DWH_001\t048feec3-3135-11e9-a0df-54ee75cd09eb"}'

 

I get this response:

 

200 REMOVED

 

But the scheduled jobs does not get deleted.

Any ideas?

 

Thanks!

Dirk

Outcomes