Hi @Abhishek Nayak
if you want to call/use the AE's REST-endpoint you can use the command-line tool curl or PowerShell.
Here is a sample of a PowerShell script that queries data from Rally. The variables Rally_Url, Rally_Token and Rally_Query are set by a PromptSet of the Windows-JOBS.
function RallyQueryDefects( [Parameter(Mandatory=$true)][string] $URL, [Parameter(Mandatory=$true)][string] $APIKey, [Parameter(Mandatory=$true)][string] $Query)
{
$headers = @{
"zsessionid" = $APIKey
"Content-Type"="application/json"
}
$TotalResultCount = -1
$QueryEncoded = [uri]::EscapeUriString( $Query)
$URI = $URL + "/slm/webservice/v2.0/defect?query=" + $QueryEncoded.trim()
try {
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
$rc = Invoke-RestMethod -Uri $URI -Headers $headers
# Write-Host "rc:" $rc
$TotalResultCount = $rc.QueryResult.TotalResultCount
if ($TotalResultCount -eq 0) {
Write-Host "URI:" $URI
for ($i = 0; $i -lt $rc.QueryResult.Errors.Count; $i++) {
Write-Host "ERR: " $rc.QueryResult.Errors[$i]
}
for ($i = 0; $i -lt $rc.QueryResult.Warnings.Count; $i++) {
Write-Host "WRG:" $rc.QueryResult.Warnings[$i]
}
# Write-Host "rc.QueryResult:" $rc.QueryResult
}
}
catch {
Write-Host "ERROR" $_
}
Write-Host "TotalResultCount=" $TotalResultCount
}
RallyQueryDefects &RALLY_URL# &RALLY_TOKEN# '&RALLY_QUERY#'
Hope this helps
Michael
------------------------------
Michael K. Dolinek
Engineering Program Manager | Agile Operation Division
Broadcom Software
------------------------------
Original Message:
Sent: Jan 02, 2025 11:03 AM
From: Abhishek Nayak
Subject: Process to run /trigger post method rest api url without using rest service jobs in Automic
Hi Team,
We trying to automate the alerting system in automic through rest API calls, as we have already tried the get methods call its working for us, is there any such a way to call the post method API calls through the browser or command, as for post method calls we need to provide data as JSON format and all.
Please let us know if you are aware of such a thing, or if you have come across such a process with any written doc, please let us know about it.
Thanks,
Abhishek