cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to use toggle endpoint to enable an ultra task

eguo
Former Employee

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?

3 REPLIES 3

eguo
Former Employee

Just noticed that I should use Put instead of Post. Am using Put now and is getting a different error now.

akidave
Employee
Employee

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”

eguo
Former Employee

@akidave, perfect. Should have read the document before this post. I am trying with the Metadata now.