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

Subscribe multiple components through API

Balamurugan Pasumpon October 27, 2023

How to pass multiple components in curl to update for a subscriber? I am able to update a single component (component_ids[]="xxxx") or all components (exclude component_ids)

 

curl https://api.statuspage.io/v1/pages/{page_id}/subscribers/{subscriber_id} \
  -H "Authorization: OAuth your-api-key-goes-here" \
  -X PATCH \
  -d "component_ids[]=your-id"

 

1 answer

1 accepted

0 votes
Answer accepted
Egor
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 31, 2023

Hey Balamurugan, 
Thanks for reaching out to Atlassian Community. 

Here's a working example from my lab that should help you:


curl -L -X PATCH 'https://api.statuspage.io/v1/pages/yourpageid/subscribers/yoursubid' -H 'Authorization: yourapikey' -H 'Content-Type: application/json' --data-raw '{
"component_ids": [
"xr3tmgfjj3k5", "t06mlw5gnz7f", "rkg1l8330g82"
]
}'

Please let me know if you got any further questions. 

Best Regards,
Egor

Balamurugan Pasumpon November 1, 2023

It works. Thank you @Egor 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events