sort_attribute and sort_order for alerts list | Nutanix Community
Skip to main content

i have created script using payload to run for listing alerts for last 24hrs and in pyload i was defined sort_attribute and sort_order  as below given
 

def prepare_payload():

    return json.dumps({

        "kind": "alert",

        "offset": 0,

        "length": 10,

        “sort_attribute”: “creation_time”,

        “sort_order”: “DESCENDING”

    })

 

when am running script like this getting error as BAD request

let me know what to use here to get recent created alerts.