Skip to content

Instantly share code, notes, and snippets.

@Kevin-Bronsdijk
Last active March 29, 2016 03:58
Show Gist options
  • Save Kevin-Bronsdijk/e8ad8c7fba312f2515ae to your computer and use it in GitHub Desktop.
Save Kevin-Bronsdijk/e8ad8c7fba312f2515ae to your computer and use it in GitHub Desktop.
{
"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2015-08-01-preview/workflowdefinition.json#",
"actions":{
"Http":{
"conditions":[
{
"dependsOn":"Values_GetJsonString"
}
],
"foreach":"@Json(body('Values_GetJsonString')).employees",
"inputs":{
"body":"@triggerBody()['firstName']",
"method":"POST",
"uri":"http://requestb.in/17jmsnu1"
},
"type":"Http"
},
"Values_GetJsonString":{
"conditions":[
],
"inputs":{
"method":"get",
"uri":"https://{mywebservice}.azurewebsites.net:443/api/Values/GetJsonString"
},
"metadata":{
"apiDefinitionUrl":"https://{mywebservice}.azurewebsites.net/swagger/docs/v1",
"swaggerSource":"website"
},
"type":"Http"
}
},
"contentVersion":"1.0.0.0",
"outputs":{
},
"parameters":{
},
"triggers":{
"manual":{
"inputs":{
"schema":{
"properties":{
},
"required":[
],
"type":"object"
}
},
"type":"Manual"
}
}
}
public HttpResponseMessage GetJsonString()
{
var resp = new HttpResponseMessage(HttpStatusCode.OK)
{
Content = new StringContent(Generic.JsonString, Encoding.UTF8, "text/plain")
};
return resp;
}
"Http": {
"conditions": [
{
"dependsOn": "Values_GetJsonString"
}
],
"foreach": "@Json(body('Values_GetJsonString')).employees",
"inputs": {
"body": "@triggerBody()['firstName']",
"method": "POST",
"uri": "http://requestb.in/17jmsnu1"
},
"type": "Http"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment