07-11-2017 11:00 AM
I am trying to use following toggle endpoint to enable or disable ultra task:
snap = REST POST
url = "https://elastic.snaplogic.com/api/1/rest/slsched/job/toggle%2F"+$snode_id
http entity = {"snode_id":$snode_id,"enabled":true}
I am getting:
{
"error_entity": {
"query_string": "",
"path": "/api/1/rest/slsched/job/toggle/5935c7e1bc9ffa5b8bd6883e",
"response_map": {
"error_list": [
{
"message": "Expecting body argument for endpoint toggle_job: enabled"
}
]
},
"http_status": "400 Bad Request",
"http_status_code": 400
}
}
What could I be doing wrong?
07-11-2017 11:22 AM
Just noticed that I should use Put instead of Post. Am using Put now and is getting a different error now.
07-11-2017 11:48 AM
The API is private. Use the Metadata Update snap to toggle a job enabled status, see https://docs-snaplogic.atlassian.net/wiki/display/SD/SnapLogic+Update, section “Enable/Disable a Task using SnapLogic Update”
07-11-2017 12:16 PM
@akidave, perfect. Should have read the document before this post. I am trying with the Metadata now.