Forum Discussion

Jeff_Batchelor's avatar
10 months ago

PowerShell to Get Alerts through API with ticketid

I am trying to utilize the PowerShell cmdlets from PowerShell gallery to pull back alerts from our portal from a specific time windows and include the ##externalticketid## field. In Python it says t...
  • LMjosephBrett's avatar
    10 months ago

    Hey y’all, so the old V1 documentation does include this still. 

    However, it looks like the v2 and v3 swagger docs have been corrected to remove the “customColumns” being available as a parameter.  This is due to performance impacts that parameter had on the “alert/alerts” api endpoint.  Instead, if you need to pull custom columns you will need to make the API call to “alert/alerts/{ID}” where it is still a valid parameter. 

    https://www.logicmonitor.com/swagger-ui-master/api-v3/dist/#/Alerts/getAlertById 

    The URL encoding does remain the same as what is described in the v1 article:

    %2523%2523externalticketid%2523%2523