Skip to main content

I am tring to use incoming webhook for spotinst however when i try to test my team channel via curl :

curl -H 'Content-Type: application/json' -d "{"text":"testing"}" my-incoming-webhook-url I get

{"status":"OK"}%


And also I get the testing in in my group but when we try the real message which is send by spotinst i get error for ex.

curl -X POST -H "Content-Type: application/json" -d '{

"subject": "spotinst:notification",

"message": "{"accountId":"act-account-id","resourceId":"smi-smi-id","organizationName":" organization.","trigger_policies":"[spot-Instance Launch Issues]","accountName":"account name","resourceName":"resourcename","title":"Stateful Resume Completed","message":"Stateful resume action completed successfully. Instance Id: instanceid. Instance Type : c5.4xlarge. Lifecycle: SPOT."}"

}' my-incoming-webhook-url

ERROR:


{"status":"error","message":"Your request was accepted, however a post was not generated","error":"Invalid Custom payload: no supported fields","validation":[]}%



Where did you learn the syntax {"subject": "..."...}?

Here is the example of valid json keys

{
"activity": "Force Alerts",
"iconUri": "https://example.com/force.png",
"title": "1 force alert",
"text": "Be mindful of the force"

Hi Phong Vu !!

Actually the logs are send in the same syntax as I mention above by Spotinst with whom we have tie up to manage our spot servers , their json format is supported by other glip channels like slack etc but not by RC.


You have to convert it to the RingCentral Team Messaging (GLIP) syntax.

What do you mean ". by other Glip channels like Slack"? Glip is Glip and Slack is Slack.


Reply