Unsolved
This post is more than 5 years old
2 Posts
1
3164
Updating firmware via REST API
Is it possible to create and/or schedule jobs using the REST API? I'm specifically looking to stage firmware updates, but any examples of creating jobs would be useful. I wasn't able to find anything in the documentation, although I have been able to retrieve a lot of the existing job information using "/api/JobService".
Thanks.
DELL-Rob C
2 Intern
2 Intern
•
2.8K Posts
1
May 1st, 2018 07:00
Hi Doug thanks for the post.
We are planning on a REST cookbook of some sorts, but that won't be out for a while yet. I'm assuming you found the REST API guide on the www.delltechenter.com/oment, but that's more of an API dump so has limited value.
I checked and was able to find this example below. But I'm afraid it does not come with much commentary or support. Hopefully there is some value :)
Rob
--
URI: /api/JobService/Jobs
HTTP Method: POST
JSON Payload:
{
"Id":0,
"JobName":"Firmware Update Task",
"JobDescription":"Firmware Task",
"StartTime":””,
"EndTime":””,
"Schedule":"startnow",
"State":"Disabled",
"UpdatedBy":null,
"JobType":{
"Id":5,
"Name":"Update_Task"
},
"Targets":[
{
"Id":1364,
"Data":"DCIM:INSTALLED#802__Diagnostics.Embedded.1:LC.Embedded.1;",
"TargetType":{
"Id":1000,
"Name":"SERVER"
}
}
],
"Params":[
{
"JobId": 2664,
"Key": "complianceReportId",
"Value": "6"
},
{
"JobId": 2664,
"Key": "repositoryId",
"Value": "12"
},
{
"JobId": 2664,
"Key": "catalogId",
"Value": "22"
},
{
"JobId": 2664,
"Key": "operationName",
"Value": "INSTALL_FIRMWARE"
},
{
"JobId": 2664,
"Key": "complianceUpdate",
"Value": "true"
},
{
"JobId": 2664,
"Key": "signVerify",
"Value": "true"
},
{
"JobId": 2664,
"Key": "stagingValue",
"Value": "false"
}
]
}
dougt42
2 Posts
0
May 7th, 2018 13:00
Thanks Rob! I was able to create a job using this. It fails almost immediately, so I'll need to play with the parameters, but this gives me something to work with.