How to get active alerts from Akamai using PowerShell?

45 views Asked by At

I am new to Akamai and trying to get the active alerts using Akamai API using PowerShell but getting error.

I am having below details.

client_secret
host
access_token
client_token 

Error:

Invoke-RestMethod : {
  "type": "https://problems.luna.akamaiapis.net/-/pep-authn/request-error",
  "title": "Bad request",
  "status": 400,
  "detail": "Invalid timestamp",
}

I have tried below code

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "client_token=xyz;access_token=xyz;")

$response = Invoke-RestMethod 'https://hosturl/alerts/v2/alert-firings/active' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
0

There are 0 answers