I'm trying to get routes via the API from a Check Point CMA (R80.40), with the following command:
curl -k --request POST 'https://CMAIP:443/web_api/v1/run-script' --header 'X-chkp-sid: SESSIONID' --header 'Content-Type: application/json' --data-raw '{"script-name": "Script Example: Show Routes", "script": "netstat -rnv", "targets": ["FW"]}'
However, one of the output shows an error:
"statusCode" : "failed",
"statusDescription" : "Connection failed for , Make sure that the machine is up and running, and that SIC has been established",
The machine is definitely up and running, and I'm not sure how to troubleshoot this issue. Some guidance would be much appreciated and thank you in advance!
Below is the full response:
{
"tasks" : [ {
"uid" : "98a39a99-7d86-4d4d-b995-77099af3b114",
"name" : *** - Script Example: Show Routes",
"type" : "CdmTaskNotification",
"domain" : {
"uid" : "1bef76ee-4451-204b-af0c-454d7ea1881f",
"name" : "***",
"domain-type" : "domain"
},
"task-id" : "0e65ace3-2b1d-4e1e-a49e-7f3d9ea9c50e",
"task-name" : "*** - Script Example: Show Routes",
"status" : "failed",
"progress-percentage" : 100,
"start-time" : {
"posix" : 1659960504467,
"iso-8601" : "2022-08-08T21:08+0900"
},
"last-update-time" : {
"posix" : 1659960528421,
"iso-8601" : "2022-08-08T21:08+0900"
},
"suppressed" : false,
"task-details" : [ {
"uid" : "7c20abe6-9a71-481d-a40e-d789ad3800d3",
"name" : null,
"domain" : {
"uid" : "1bef76ee-4451-204b-af0c-454d7ea1881f",
"name" : "***",
"domain-type" : "domain"
},
"color" : "black",
"statusCode" : "failed",
"statusDescription" : "Connection failed for , Make sure that the machine is up and running, and that SIC has been established",
"taskNotification" : "98a39a99-7d86-4d4d-b995-77099af3b114",
"gatewayId" : "052fd37d-02b5-4a98-af7f-6372ae7cf164",
"gatewayName" : "",
"transactionId" : 491755923,
"responseMessage" : "Q29ubmVjdGlvbiBmYWlsZWQgZm9yIApNYWtlIHN1cmUgdGhhdCB0aGUgbWFjaGluZSBpcyB1cCBhbmQgcnVubmluZywgYW5kIHRoYXQgU0lDIGhhcyBiZWVuIGVzdGFibGlzaGVk\n",
"responseError" : "",
"meta-info" : {
"validation-state" : "ok",
"last-modify-time" : {
"posix" : 1659960529872,
"iso-8601" : "2022-08-08T21:08+0900"
},
"last-modifier" : "***",
"creation-time" : {
"posix" : 1659960504598,
"iso-8601" : "2022-08-08T21:08+0900"
},
"creator" : "***"
},
"tags" : [ ],
"icon" : "General/globalsNa",
"comments" : "",
"display-name" : "",
"customFields" : null
} ],
"comments" : "Failed",
"color" : "black",
"icon" : "General/globalsNa",
"tags" : [ ],
"meta-info" : {
"lock" : "unlocked",
"validation-state" : "ok",
"last-modify-time" : {
"posix" : 1659960528451,
"iso-8601" : "2022-08-08T21:08+0900"
},
"last-modifier" : "***",
"creation-time" : {
"posix" : 1659960504524,
"iso-8601" : "2022-08-08T21:08+0900"
},
"creator" : "***"
},
"read-only" : false
} ]
}