Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get a list of active maintenances by component-id through API

vikas.gupta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2022

Hi,
I want to get the list of active maintenance for the specific component-id thought API call. for Example: 
If I schedule 3 incidents in the difference of start time by 5 min using three different component id, then all 3 will go in progress after some time and then I want to list one of them via API call. How I can do that. I got this 

curl https://api.statuspage.io/v1/pages/{page_id}/incidents/active_maintenance \
  -H "Authorization: OAuth your-api-key-goes-here" \
  -X GET

but it lists all 3 that are in active state. I want to list only one of them according to component ID.

1 answer

0 votes
Ashish Shetty J
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 15, 2022

Hi Vikas,

Thanks for reaching out to the Statuspage team.
Unfortunately, we do not currently have a query parameter for the active maintenance API endpoint that may allow us to narrow the result by components.

The only available query parameters for this endpoint are page and per_page as mentioned in the API documentation

I'm afraid the only workaround to achieve this at the moment would be to filter the results on the client side by making changes to the script.

Thanks,
Ashish

vikas.gupta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2022

The per_page option is not helpful in this place, but I have written a python script that works well for me. But again query parameter will definitely be the perfect requirement here. 

Anyways,

Thank you, Ashish. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events