Hi Everyone!
Fun evening - spending it with GeoEvent Server v10.8. 😁
I am struggling with a few things. I have a developer who figured out how to post a message to a MS Teams channel through a python script. He is sending this message HTTP Post :
{
"contentType": "application/vnd.microsoft.card.hero",
"content": {
"title": "Seattle Center Monorail",
"text": "The Seattle Center Monorail is an elevated train line between Seattle Center (near the Space Needle) and downtown Seattle. It was built for the 1962 World's Fair. Its original two trains, completed in 1961, are still in service.",
"buttons": [
{
"type": "openUrl",
"title": "Official website",
"value": "https://www.seattlemonorail.com"
}
]
}
}
I was thinking (yea - my bad) that I could just compact this down to one line and use it as a template to calculate my own data into this format... and then calculate into a single string field!
SO - I compacted it and slapped two single quotes around it to see if I could throw it into an HTTP Text output...
'{"contentType":"application/vnd.microsoft.card.hero","content":{"title":"Seattle Center Monorail","text":"The Seattle Center Monorail is an elevated train line between Seattle Center (near the Space Needle) and downtown Seattle. It was built for the 1962 World's Fair. Its original two trains, completed in 1961, are still in service.","buttons":[{"type":"openUrl","title":"Official website","value":"https://www.seattlemonorail.com"}]}}'
I put it into a field calculator and asked it to put it all into a STRING formatted field:
Processor "Fill Text Field" : Field Calculator validation failed: Unable to parse character at position 334: ':'
Yea - so I think this relates to another lesson that @RJSunderman sent me last week on literal quotes and ambiguity of opening and closing quotes. I was doing some more in-depth reading about it just before starting this - and my mind just liquified when docs.oracle.com said:
Warning:
The rules for using quotes within message format patterns unfortunately have shown to be somewhat confusing.
Really?
Well - I began to think about what I was trying to do. Just check if I could send a String in a HTTP Text....
output...
To an incoming webhook...
Wait. I set up an HTTP Push JSON to an External Website. :see_no_evil_monkey:
I think it's time to see if I am barking up the wrong tree. WHAT DO YOU THINK? Am I completely wasting my time here because what I am trying to accomplish is not in the cards with OOTB GeoEvent Server?
Thank you for reading this far - and for your honesty!
--Adam