1
votes

I am attempting to use the Azure Rest API to update a Scheduled Job. I've successfully been able to get a list of the of the Jobs properties, so I know the authentication is working. I'm basing this on their example here:

https://msdn.microsoft.com/en-us/library/azure/dn528934.aspx

Here is what I see in Fiddler when preforming the PATCH request.

REQUEST:

PATCH https://management.azure.com/subscriptions/[[mysub]]/resourceGroups/CS-WebJobs-NorthCentralUS-scheduler/providers/Microsoft.Scheduler/jobCollections/WebJobs-NorthCentralUS/jobs/[[myjob]]?api-version=2016-01-01 HTTP/1.1
Authorization: Bearer 
[[my token here]]
Content-Type: application/json; charset=utf-8
Host: management.azure.com
Content-Length: 20
Expect: 100-continue

{"state":"disabled"}

RESPONSE:

{"error":{"code":"BadRequest","message":"Malformed Job Object"}}

Based on their example the JSON passed should work.

Any idea what's going on here? I'm hoping its something simple.

1

1 Answers

2
votes

Try the following payload:

{ "properties": { "state": "disabled" } }