Endpoint:/sites/{siteId}/awe-tasks

NOTE: Available as of EFT 8.1.0

(GET) Returns advanced workflow task list from specified site and (POST) creates advanced workflow task for specified site

  • GET

  • POST

Method & URL

GET https://{{host}}/admin/v2/sites/{{SiteId}}/awe-tasks

GET Body Sample

Copy
### GET AWE TASKS ###
GET https://{{host}}/admin/v2/sites/{{Siteid}}/awe-tasks HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###

GET Response Body Sample

Copy
{"data":[
{"id":"0f340ef3-3628-5844-bb6b-c659252b6b44","type":"aweTask","attributes":
{"name":"Sample - Date Format Functions","created":"2022-08-01","description":""},
"relationships":{"aweFolder":{"data":{"id":"00000000-0000-0000-0000-000000000000",
"name":"<root>"}}},"links":{"self":
"/admin/v2/sites/b65892e9-399d-4447-a3b1-477c08f0abca/awe-tasks/0f340ef3-3628-5844-bb6b-c659252b6b44"}},
{"id":"92ac1ba6-5fcc-5b85-b5da-e1b3c4d4a300","type":"aweTask","attributes":
{"name":"Sample - Environment Variables","created":"2022-08-01","description":""},"relationships":
{"aweFolder":{"data":{"id":"00000000-0000-0000-0000-000000000000","name":"<root>"}}},"links":
{"self":"/admin/v2/sites/b65892e9-399d-4447-a3b1-477c08f0abca/awe-tasks/
92ac1ba6-5fcc-5b85-b5da-e1b3c4d4a300"}},{"id":"432c99b4-fcf3-5472-981d-416946a9b95a","type":
"aweTask","attributes":{"name":"Sample - Excel Actions","created":"2022-08-01","description":""},
"relationships":{"aweFolder":{"data":{"id":"00000000-0000-0000-0000-000000000000","name":"<root>"}}},
"links":{"self":"/admin/v2/sites/b65892e9-399d-4447-a3b1-477c08f0abca/awe-tasks/432c99b4-fcf3-5472-
981d-416946a9b95a"}},{"id":"df5f43bb-1f34-57be-9e59-75bd272ba408","type":"aweTask","attributes":
{"name":"Sample - ssf"

GET PowerShell Sample

Copy
# get awe-tasks
Write-Output "AWE-TASKS"
Write-Output "-----"
$aweList = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/awe-tasks" 
-Method 'GET' -Headers $authHeader
Write-Output $aweList | ConvertTo-Json
foreach ($awetask in $aweList.data)
{
    Write-Output ("Task ID $($aweTask.id): Name -> $($aweTask.attributes.name)")
}

Method & URL

POST https://{{host}}/admin/v2/sites/{{Siteid}}/awe-tasks

POST Body Sample

Copy
POST https://{{host}}/admin/v2/sites/{{Siteid}}/awe-tasks HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}

{
  "data": {
    "type": "aweTask",
    "attributes": {     
    "code":"PEFNVEFTSz4NCjxBTVRBU0tIRUFEPg0KICAgIDxUQVNLSU5GTyBUQVN...
      "name": "MyNewAWEScript",
      "created": "2022-03-31",
      "description": "Hello, world!",
      "useTimeout": true,
      "timeout": 10,
      "logLevel": "Verbose",
      "retainSuccessfulLogs": false,
      "retainFailedLogs": true
    }
  }
}

POST Response Body Sample

Copy
{"data":
{"id":"8405b064-aa9a-46b8-b0b5-4c60eb3d3e09","type":"aweTask","attributes":
{"name":"MyNewAWEScript","created":"2022-08-01","description":"Hello, world!",
"useTimeout":true,"timeout":10,"logLevel":"Verbose","logDirectory":"",
"retainSuccessfulLogs":false,"retainFailedLogs":true,"code":
"PEFNVEFTSz4NCjxBTVRBU0tIRUFEPg0KICAgIDxUQVNLSU5GTyBUQVNLVkVSU0lPTj0iMTAuNy4xMDA...

POST PowerShell Sample

Copy
##POST SITE AWE TASKS
Write-Output "Site AWE TASK POST"
Write-Output "-----"
$update = 
'{
  "data": {
    "type": "aweTask",
    "attributes": {     
    "code":"PEFNVEFTSz4NCjxBTVRBU0tIRUFEPg0KICAgIDxUQVNLSU5GTyBUQVNLVkVSU0lPTj0iMTAuNy4xM...
    "name": "MyNewAWEScript",
      "created": "2022-03-31",
      "description": "Hello, world!",
      "useTimeout": true,
      "timeout": 10,
      "logLevel": "Verbose",
      "retainSuccessfulLogs": false,
      "retainFailedLogs": true
    }
  }
}'
$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 10
$postAWETASKReturn = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/awe-tasks" 
-Method 'POST' -Headers $authHeader -Body $update
Write-Output $postAWETASKReturn | ConvertTo-Json