Created
September 21, 2017 14:24
-
-
Save jdmills-edu/c309855370a9fdf34ac2ea99d3876e0c to your computer and use it in GitHub Desktop.
A PowerShell script that authenticates to the Team Dynamix API and returns a JSON Web Token. A prerequisite for any further queries to the TDX API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = "https://yourdomain.teamdynamix.com/TDWebApi/api" | |
$action = "/auth/loginadmin" | |
$endpoint = $url+$action | |
$request = '{ | |
"BEID": "YourTDXAPIBEID", | |
"WebServicesKey": "YourWebServicesKey" | |
}' | |
$jwt = Invoke-RestMethod -Method Post -Uri $endpoint -Body $request -ContentType "application/json; charset=utf-8" | |
return $jwt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment