DNS API Powershell example

Support Wissensdatenbank

Du bist hier:

In the following section you will find a simple example of using the DNS API in PowerShell:

$username = ""
$password = ""
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))

$url = 'https://api.firestorm.ch/dns/v1/zones'
$result = Invoke-RestMethod -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -uri $url

Write-Host $result

Complete the two variables ‘username’ and ‘password’ with the correct access data for logging into the administration interface.
Before using the API, it must be activated in the administration interface (under Account > Customer profile).

War dieser Artikel hilfreich?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Wie können wir diesen Artikel verbessern?
Please submit the reason for your vote so that we can improve the article.
Brauchst du Hilfe?
Related Post