Forum Discussion

SK's avatar
SK
Icon for Participant rankParticipant
5 months ago

Device discovery by org in api call

Looking for a way to filter on devices by a particular org     Tried using the following method  SL1stacksite.net/api/device?limit=10&searchspec?organization=xx  
  • jamesramsden's avatar
    5 months ago

    /api/device?limit=100&organization=XX

     

     

    Python example:

    import requests

     

    url = "https://XYZ/api/device?limit=100&organization=XX"

     

    payload = {}

    headers = {

      'Pragma': 'no-cache',

      'Accept': 'application/json',

      'Cache-Control': 'no-cache',

      'Authorization': 'Basic XYZ'

    }

     

    response = requests.request("GET", url, headers=headers, data=payload)

     

    print(response.text)