Hi!
Can I somehow set a reason when killing jobs using POST http://mycommcell.com/webconsole/api/Job/123456/action/kill request?
Best answer by NikkyArt
View originalHi!
Can I somehow set a reason when killing jobs using POST http://mycommcell.com/webconsole/api/Job/123456/action/kill request?
Best answer by NikkyArt
View originaljust send POST request
http://WebConsoleHostName/webconsole/api/Job/{{jobId}}/action/kill
example POST request over use CURL for killing job
curl --location --request POST 'http://WebConsoleHostName/webconsole/api/Job/433/action/kill' \
--header 'Accept: application/json' \
--header 'Authtoken: QSDK token would be auto set after POST Login is called.' \
--data ''
additionals,
u can use POST request “MultiJob Operation” to set value “operationDescription” displayed in “Reason for job delay”
example
curl --location 'http://{hostname}}/webconsole/api/Jobs/MultiJobOperation' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authtoken: QSDK {token}} \
--data '{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": {jobid}
}
]
}
}'
additionals,
u can use POST request “MultiJob Operation” to set value “operationDescription” displayed in “Reason for job delay”
example
curl --location 'http://{hostname}}/webconsole/api/Jobs/MultiJobOperation' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authtoken: QSDK {token}} \
--data '{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": {jobid}
}
]
}
}'
FYI Looks like this is identical to the qoperation request.
The XML in the qoperation is identical to
<?xml version='1.0' encoding='UTF-8'?>
<JobManager_PerformMultiCellJobOpReq message="" operationDescription="">
<jobOpReq operationType="">
<jobs jobId="" />
<jobs jobId="" />
</jobOpReq>
</JobManager_PerformMultiCellJobOpReq>
The Json in the /MultiJoboperation api
{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": ""
}
]
}
}
So the api is identical to the operation identifier “JobManager_PerformMultiCellJobOpReq”
It would be cool to get a map between the two.
additionals,
u can use POST request “MultiJob Operation” to set value “operationDescription” displayed in “Reason for job delay”
example
curl --location 'http://{hostname}}/webconsole/api/Jobs/MultiJobOperation' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authtoken: QSDK {token}} \
--data '{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": {jobid}
}
]
}
}'
FYI Looks like this is identical to the qoperation request.
The XML in the qoperation is identical to
<?xml version='1.0' encoding='UTF-8'?>
<JobManager_PerformMultiCellJobOpReq message="" operationDescription="">
<jobOpReq operationType="">
<jobs jobId="" />
<jobs jobId="" />
</jobOpReq>
</JobManager_PerformMultiCellJobOpReq>
The Json in the /MultiJoboperation api
{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": ""
}
]
}
}
So the api is identical to the operation identifier “JobManager_PerformMultiCellJobOpReq”
It would be cool to get a map between the two.
yes, they are identical, but the question was about POST request via API ;)
The question was already answered.
This was an observation on an implicit question.
The question being since api endpoints may or may not be defined for operation how does one determine if one already exists?
And also if it doesn’t exist how do you accomplish unknown actions?
Not to worry.
I will elaborate in a seperate post.
additionals,
u can use POST request “MultiJob Operation” to set value “operationDescription” displayed in “Reason for job delay”
example
curl --location 'http://{hostname}}/webconsole/api/Jobs/MultiJobOperation' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authtoken: QSDK {token}} \
--data '{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": {jobid}
}
]
}
}'
FYI Looks like this is identical to the qoperation request.
The XML in the qoperation is identical to
<?xml version='1.0' encoding='UTF-8'?>
<JobManager_PerformMultiCellJobOpReq message="" operationDescription="">
<jobOpReq operationType="">
<jobs jobId="" />
<jobs jobId="" />
</jobOpReq>
</JobManager_PerformMultiCellJobOpReq>
The Json in the /MultiJoboperation api
{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": ""
}
]
}
}
So the api is identical to the operation identifier “JobManager_PerformMultiCellJobOpReq”
It would be cool to get a map between the two.
yes, they are identical, but the question was about POST request via API ;)
How did you find this api?
It’s not in Bol
additionals,
u can use POST request “MultiJob Operation” to set value “operationDescription” displayed in “Reason for job delay”
example
curl --location 'http://{hostname}}/webconsole/api/Jobs/MultiJobOperation' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authtoken: QSDK {token}} \
--data '{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": {jobid}
}
]
}
}'
FYI Looks like this is identical to the qoperation request.
The XML in the qoperation is identical to
<?xml version='1.0' encoding='UTF-8'?>
<JobManager_PerformMultiCellJobOpReq message="" operationDescription="">
<jobOpReq operationType="">
<jobs jobId="" />
<jobs jobId="" />
</jobOpReq>
</JobManager_PerformMultiCellJobOpReq>
The Json in the /MultiJoboperation api
{
"operationDescription": "Test Job KILL",
"message": " ALL_SELECTED_JOBS",
"jobOpReq": {
"operationType": "JOB_KILL",
"jobs": [
{
"jobId": ""
}
]
}
}
So the api is identical to the operation identifier “JobManager_PerformMultiCellJobOpReq”
It would be cool to get a map between the two.
yes, they are identical, but the question was about POST request via API ;)
How did you find this api?
It’s not in Bol
i have read the documentation - https://api.commvault.com
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.