Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save CoditCompany/3ff98262a9218ce9dcfd80bbe3a8792a to your computer and use it in GitHub Desktop.

Select an option

Save CoditCompany/3ff98262a9218ce9dcfd80bbe3a8792a to your computer and use it in GitHub Desktop.
This code view shows how to create a LA referring to a static API Connection
{
"$connections": {
"value": {
"FirstAPI": {
"connectionId": "/subscriptions/<subscriptionId>/resourceGroups/LogicApps_DynAPIConn/providers/Microsoft.Web/connections/FirstAPI",
"connectionName": "FirstAPI",
"id": "/subscriptions/<subscriptionId>/providers/Microsoft.Web/locations/northeurope/managedApis/ftp"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Create_file": {
"inputs": {
"body": "@triggerBody()",
"host": {
"connection": {
"name": "@parameters('$connections')['FirstAPI']['connectionId']"
}
},
"method": "post",
"path": "/datasets/default/files",
"queries": {
"folderPath": "@{triggerOutputs()['headers']['Folder']}",
"name": "@{triggerOutputs()['headers']['FileName']}"
}
},
"runAfter": {},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"inputs": {
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment