Endpoint: /sites/{siteid}/users/{userid}/as2inbound

Returns and updates user inbound AS2 parameters

Method & URL

GET https://[server URL]:[port]/admin/v2/sites/{siteId}/users/{userid}/as2inbound

GET Body Sample

Copy
# @name usersList
GET https://{{host}}/admin/v2/sites/{{Siteid}}/users HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###

@Usersid = {{usersList.response.body.$.data[0].id}}
###
GET https://{{host}}/admin/v2/sites/{{Siteid}}/users/{{Usersid}}/as2inbound HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###

GET Response Body Sample

Copy
{ "data": { "attributes": { }, "relationships": { "transactionFailedCommand": { "data": null }, 
"transactionSuccessCommand": { "data": null } }, "type": "AS2Inbound" } }

GET PowerShell Sample

Copy
$userid = $userList.data[0].id

# get users
Write-Output "Specific User AS2inbound information"
Write-Output "-----"
$userList = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/users/$userid/as2inbound" 
-Method 'GET' -Headers $authHeader
Write-Output $userList | ConvertTo-Json
foreach ($user in $userList.data)
{
    Write-Output ("User $($user.id): $($user.attributes.loginName)")
}

Method & URL

PATCH https://[server URL]:[port]/admin/v2/sites/{siteId}/users/{userid}/as2inbound

PATCH Body Sample

Copy
###
PATCH https://{{host}}/admin/v2/sites/{{Siteid}}/users/{{Usersid}}/as2inbound HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}

{
  "data": {
    "type": "AS2Inbound",
    "attributes": {
      "myId": "AS2_1",
      "partnerId": "AS2_2"
    }
  }
}

PATCH Response Body Sample

Copy
{
  "data": {
    "attributes": {
      "allowedEncryptionAlgorithms": [
      ],
      "allowedSignatureAlgorithms": [
      ],
      "authenticationType": "usernamePassword",
      "contentCollision": "reject",
      "doNotSend100Continue": false,
      "folderToMoveDataTo": "",
      "mdnSendAttemptDelaySeconds": 30,
      "mdnSendAttemptRetries": 3,
      "mdnSendAttemptTimeoutSeconds": 60,
      "micAlgorithm": "asRequestedOrSHA256",
      "myId": "AS2_1",
      "partnerCertificateFilePath": "",
      "partnerId": "AS2_2",
      "rejectIdMismatch": true,
      "rejectMessageIdCollision": true,
      "rejectNotEncrypted": true,
      "rejectNotSigned": true,
      "rejectPartnerIdMismatch": true,
      "renameFilesTo": "",
      "transactionFailedCommandSettings": {
      },
      "transactionFailedEmail": {
      },
      "transactionSuccessCommandSettings": {
      },
      "transactionSuccessEmail": {
      }
    },
    "relationships": {
    },
    "type": "AS2Inbound"
  }
}

PATCH PowerShell Sample

Copy
$update = 
'{
  "data": {
    "type": "AS2Inbound",
    "attributes": {
      "myId": "AS2_1",
      "partnerId": "AS2_4",
      "partnerCertificateFilePath": "C:\\Users\\DYelacic1951\\Desktop\\certs\\ssl.crt"
    }
  }
}'
$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 10
# update / patch
Write-Output "Update User specific as2inbound information"
Write-Output "-----"
$as2InboundList = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/users/$userid/as2inbound" 
-Method 'PATCH' -Headers $authHeader -Body $update
Write-Output $as2InboundList | ConvertTo-Json
foreach ($user in $as2InboundList.data)
{
    Write-Output ("User $($user.id): $($user.attributes.loginName)")
}