I’m trying to make some changes to a script that curls the old API so it can use the new API. The script filters the fields for incident_number and ID. I’ve looked up the documentation and can’t seem to find the docs that will let get those two things as I only end up getting all the things. Below is an example of the two curl commands. I’ve tried a few things as stated in the docs but haven’t had much luck.
Curl Using the Old API
curl -X GET --header ‘Accept: application/json’ --header ‘Authorization: Token token=SuperSecretTOKEN’ ‘https://subdomain.pagerduty.com/api/v1/incidents?fields=incident_number,id’
Curl Using the New API
curl -X GET --header ‘Accept: application/vnd.pagerduty+json;version=2’ --header ‘Authorization: Token token=SuperSecretTOKEN’ ‘https://api.pagerduty.com/incidents’