Endpoint: /sites/{siteId}/connection-profiles
NOTE: Available as of EFT 8.1.0
(GET) Returns connection profiles list from the specified site, (POST) create a connection profile for a site.
-
GET
-
POST
Method & URL
GET https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles
GET Body Sample
Copy
### GET a list of current connection profiles####
GET https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###
GET Response Body Sample
Copy
HTTP/1.1 200 OK Date: Thu, 04 Aug 2022 14:17:24 GMT
Location: /admin/v2/sites/76882fc7-3f55-4040-ae5f-2e645c12647b/connection-profiles
ontent-Type: application/vnd.api+json Content-Length: 1383
Cache-Control: no-cache, no-store, must-revalidate Expires: -1
X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval' data:;
Referrer-Policy: no-referrer { "data": [ { "id": "c9ea36ec-8a9e-440f-8c21-920eb3927732",
"type": "connectionProfile", "attributes": { "type": "Protocol", "name": "POST REQUEST
Create connection Profile", "description": "Connection Profile Details", "connectionSettings": {
"protocol": "FTPSAuthTLS", "user": "AFAR", "password": "UpKUJq1sD4Yfb1Hz8ZFiRw==",
"autoLogin": true, "testPath": "\test", "host": "192.168.1.210", "port": 21,
"SSLCertificate": { "certPath": "", "keyPath": "", "passphrase": "UpKUJq1sD4Yfb1Hz8ZFiRw==" },
"trustedPubKey": "", "proxy": { "use": false, "type": "FTP", "hostName": "", "username": "",
"password": "UpKUJq1sD4Yfb1Hz8ZFiRw==", "port": 21, "subType": 0, "separator": "@",
"customCommands": [] }, "socks": { "use": false, "type": "None", "hostName": "", "port": 1080,
"auth": false, "username": "", "password": "UpKUJq1sD4Yfb1Hz8ZFiRw==" }, "advanced": {
"numberOfConnectionRetries": 0, "delayBetweenRetries": 30, "maxConcurrentThreads": 1,
"connectionTimeout": 30, "port": { "mode": "AUTO", "min": 0, "max": 65535 },
"validateFileIntegrity": false, "ASCIIFileExts": [ "TXT", "INF", "HTML", "HTM" ],
"homeIP": "0.0.0.0", "clearCommandChannel": false, "clearDataChannel": false,
"transferEncoding": "AutoDetect", "timeStamp": { "preserveLocal": false,
"preserveRemote": false } } } }, "links": { "self":
"/admin/v2/sites/76882fc7-3f55-4040-ae5f-2e645c12647b/connection-profiles/
c9ea36ec-8a9e-440f-8c21-920eb3927732" } } ], "links": { "self":
"/admin/v2/sites/76882fc7-3f55-4040-ae5f-2e645c12647b/connection-profiles" } }
GET PowerShell Sample
Copy
#####################################
###GET list of Connection Profiles###
Write-Output "GET list of Connection Profiles"
Write-Output "-------------------------------"
#$siteID = "Enter site ID"
$CPlist = Invoke-RestMethod -Uri
"$baseURL/v2/sites/$siteID/connection-Profiles"
-Method 'GET' -Headers $authHeader
Write-Output $CPlist | ConvertTo-Json -Depth 25
$profileId = $CPList.data[0].id
Method & URL
POST https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles
POST Body Sample
Copy
### Create a Connection Profile ###
POST https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles/ HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
{
"data": {
"type": "connectionProfile",
"attributes": {
"name": "POST REQUEST Create connection Profile",
"description": "Connection Profile Details",
"testPath": "\test",
"connectionSettings": {
"protocol": "FTPSAuthTLS",
"host": "192.168.1.210",
"port": 21,
"user": "AFAR",
"password": "",
"autoLogin": true,
"certSettings": {
"certPath": "C:\\Users\\Administrator\\Desktop\\AFAR SSL\\SSL Cert User AFAR.crt",
"keyPath": "C:\\Users\\Administrator\\Desktop\\AFAR SSL\\SSL Cert User AFAR.key",
"passphrase": "xamYEctkRdBRCxu0F5XqoQ=="
}
}
}
}
POST Response Body Sample
Copy
HTTP/1.1 201 Created Date: Thu, 04 Aug 2022 15:51:07 GMT
Location: /admin/v2/sites/76882fc7-3f55-4040-ae5f-2e645c12647b/
connection-profiles/92e9f684-5b87-47d3-816b-19644e639ae2
Content-Type: application/vnd.api+json ETag: "24708EE" Content-Length: 1290
Cache-Control: no-cache, no-store, must-revalidate Expires: -1
X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval' data:;
Referrer-Policy: no-referrer { "data": { "id": "92e9f684-5b87-47d3-816b-19644e639ae2", "type":
"connectionProfile", "attributes": { "type": "Protocol", "name": "POSTq REQUEST
Create connection Profile", "description": "Connection Profile Details", "connectionSettings":
{ "protocol": "FTPSAuthTLS", "user": "AFAR", "password": "UpKUJq1sD4Yfb1Hz8ZFiRw==",
"autoLogin": true, "testPath": "\test", "host": "192.168.1.210", "port": 21, "SSLCertificate":
{ "certPath": "", "keyPath": "", "passphrase": "UpKUJq1sD4Yfb1Hz8ZFiRw==" },
"trustedPubKey": "", "proxy": { "use": false, "type": "FTP", "hostName": "", "username": "",
"password": "UpKUJq1sD4Yfb1Hz8ZFiRw==", "port": 21, "subType": 0, "separator": "@",
"customCommands": [] }, "socks": { "use": false, "type": "None", "hostName": "",
"port": 1080, "auth": false, "username": "", "password": "UpKUJq1sD4Yfb1Hz8ZFiRw==" },
"advanced": { "numberOfConnectionRetries": 0, "delayBetweenRetries": 30, "maxConcurrentThreads": 1,
"connectionTimeout": 30, "port": { "mode": "AUTO", "min": 0, "max": 65535 },
"validateFileIntegrity": false, "ASCIIFileExts": [ "TXT", "INF", "HTML", "HTM" ], "homeIP": "0.0.0.0",
"clearCommandChannel": false, "clearDataChannel": false, "transferEncoding": "AutoDetect",
"timeStamp": { "preserveLocal": false, "preserveRemote": false } } } }, "links":
{ "self": "/admin/v2/sites/76882fc7-3f55-4040-ae5f-2e645c12647b/connection-profiles/
92e9f684-5b87-47d3-816b-19644e639ae2" } } }
POST PowerShell Sample
Copy
###############################################
###POST Create New Connection Profile###
Write-Output " Create New Connection Profile"
Write-Output "------------------------------"
$update =
'{
"data": {
"id": "",
"type": "connectionProfile",
"attributes": {
"name": "PS REQUEST Create connection Profile",
"description": "Connection Profile Details",
"testPath": "\test",
"connectionSettings": {
"protocol": "FTPSAuthTLS",
"host": "192.168.1.210",
"port": 21,
"user": "AFAR",
"password": "",
"autoLogin": true,
"certSettings": {
"certPath": "C:\\Users\\Administrator\\Desktop\\AFAR SSL\\SSL Cert User AFAR.crt",
"keyPath": "C:\\Users\\Administrator\\Desktop\\AFAR SSL\\SSL Cert User AFAR.key",
"passphrase": "xamYEctkRdBRCxu0F5XqoQ=="
}
}
}
}
}'
$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 25
$patchReturn = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/connection-Profiles"
-Method 'POST' -Headers $authHeader -Body $update