Skip to content

Instantly share code, notes, and snippets.

View YMA-MDL's full-sized avatar
🎯
Focusing

Yoann Maingon YMA-MDL

🎯
Focusing
View GitHub Profile
<AML>
<Item action="edit" type="ItemType" id="8B0779BD0C174C0A875E37F7D78B9B57">
<Relationships>
<Item action="add" type="Property">
<data_type>foreign</data_type>
<name>foreigntest2</name>
<data_source >DF1F9AA824E045FCA06794B7CDEFB345</data_source>
<foreign_property type="Property">B8CBB2ED30B041EDB4278C58CD73FD86</foreign_property>
</Item>
</Relationships>
// retrieve the document name
String documentName = this.getProperty("name");
// retrieve the document id
String documentID = this.getID();
// create the POST web request
var httpWebRequest = (HttpWebRequest) WebRequest.Create("https://hooks.slack.com/services/XXXXX/XXXXX/XXXXXXXXXX");
httpWebRequest.ContentType = "text/json";
httpWebRequest.Method = "POST";
var httpWebRequest = (HttpWebRequest) WebRequest.Create("https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXX");
httpWebRequest.ContentType = "text/json";
httpWebRequest.Method = "POST";
using(var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) {
string json = "{\"text\":\"test message from Aras Innovator to Slack\"," +
"\"username\":\"Innovator\"}";
streamWriter.Write(json);
streamWriter.Flush();