Endpoint: /sites/{siteId}/connection-profiles/{connectionProfileID}
NOTE: Available as of EFT 8.1.0
(GET) GET Details for specific connection profile, (PATCH) update details for a specific connection profile, (DELETE) remove a specific connection profile.
-
GET
-
PATCH
-
DELETE
Method & URL
GET https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles
GET Body Sample
Copy
###GET Details for specific connection profile####
###You can enter the Connection profile ID below or pass the value from a previous request###
##@ConnectionProfileID = 31334739-2f41-4561-9d27-22e17c9b9362
GET https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles/{{ConnectionProfileID}} HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
GET Response Body Sample
Copy
HTTP/1.1 200 OK Date: Thu, 04 Aug 2022 16:11:35 GMT Location:
/admin/v2/sites/76882fc7-3f55-4040-ae5f-2e645c12647b/connection-profiles/
c9ea36ec-8a9e-440f-8c21-920eb3927732 Content-Type: application/vnd.api+json
ETag: "A50CA65F" Content-Length: 1289 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" } } }
GET PowerShell Sample
Copy
###Returns the deatails of the specified connection profile ###
Write-Output "Details of Connection Profile $profileId"
Write-Output "------------------------------------"
#$ConnectionProfileID = "Enter site ID"
$CPlist = Invoke-RestMethod -Uri
"$baseURL/v2/sites/$siteID/connection-Profiles/$ConnectionProfileID"
-Method 'GET' -Headers $authHeader
Write-Output $CPlist | ConvertTo-Json -Depth 25
Method & URL
PATCH https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles/{[ConnectionProfileID}}
PATCH Body Sample
Copy
### Update a Connection Profile ####
###You can enter the Connection profile ID below or pass the value from a previous request###
##@ConnectionProfileID = 31334739-2f41-4561-9d27-22e17c9b9362
PATCH https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles/{{ConnectionProfileID}}
HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
{
"data": {
"type": "connectionProfile",
"attributes": {
"name": "Patch Connection Profile",
"description": "Patch Connection Profile",
"testPath": "/",
"connectionSettings": {
"protocol": "FTPSAuthTLS",
"host": "192.168.1.210",
"port": 21,
"user": "AFAR",
"password": "pass",
"autoLogin": false
}
}
}
}
PATCH Response Body Sample
Copy
HTTP/1.1 200 OK Date: Thu, 04 Aug 2022 18:33:38 GMT Location:
/admin/v2/sites/76882fc7-3f55-4040-ae5f-2e645c12647b/connection-profiles/
c9ea36ec-8a9e-440f-8c21-920eb3927732 Content-Type: application/vnd.api+json ETag: "624A277A"
Content-Length: 1408 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": "Patch Connection Profile", "description": "Patch Connection Profile",
"connectionSettings": { "protocol": "FTPSAuthTLS", "user": "AFAR", "password":
"wweZ1iVXRYBbX80z2T3JHg==", "autoLogin": false, "testPath": "/", "host": "192.168.1.210",
"port": 21, "SSLCertificate": { "certPath": "C:\\Users\\administrator.TEST\\Desktop\\AFAR SSL\\SSL Cert
User AFAR.crt", "keyPath": "C:\\Users\\administrator.TEST\\Desktop\\AFAR SSL\\SSL Cert User AFAR.key",
"passphrase": "xamYEctkRdBRCxu0F5XqoQ==" }, "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": "UTF8", "timeStamp": {
"preserveLocal": false, "preserveRemote": false } } } }, "links": { "self":
"/admin/v2/sites/76882fc7-3f55-4040-ae5f-2e645c12647b/connection-profiles/c9ea36ec-8a9e-440f-8c21-920eb3927732"
} } }
PATCH PowerShell Sample
Copy
####Added 8/4/2022
### PATCH Connection Profile###
### User must obtain the SiteID and Connection Profile ID ###
Write-Output "PATCH Site Connection Profile"
Write-Output "------------------------------"
$update =
'{
"data": {
"type": "connectionProfile",
"attributes": {
"name": "PS_Patch Connection Profile",
"description": "PS_Patch Connection Profile",
"testPath": "/",
"connectionSettings": {
"protocol": "FTPSAuthTLS",
"host": "192.168.1.210",
"port": 21,
"user": "AFAR",
"password": "pass",
"autoLogin": false
}
}
}
}'
$update = $update | ConvertFrom-Json
$update = $update | ConvertTo-Json -Depth 9
$patchReturn = Invoke-RestMethod -Uri
"$baseURL/v2/sites/$siteID/connection-Profiles/$ConnectionProfileID"
-Method 'PATCH' -Headers $authHeader -Body $update
Method & URL
DELETE https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles/{{ConnectionProfileID}}
DELETE Body Sample
Copy
### DELETE specific connection profile####
DELETE https://{{host}}/admin/v2/sites/{{Siteid}}/connection-Profiles/
{{ConnectionProfileID}} HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
DELETE Response Body Sample
Copy
HTTP/1.1 204 No Content Date: Thu, 04 Aug 2022 18:52:32 GMT Content-Length: 0
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
DELETE PowerShell Sample
Copy
####Added 8/4/2022 ###
###### DELETE Connection Profile######
Write-Output "### DELETE specific Connection Profile###"
Write-Output "-----------------------------------------"
$profileName = "PowerShell Example"
$Delete_Profile = Invoke-RestMethod -Uri
"$baseURL/v2/sites/$siteID/connection-Profiles/$ConnectionProfileID"
-Method 'DELETE' -Headers $authHeader