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

published API does not return data as documented and needed

Roy Speier January 16, 2024

calling the API to return a list of component groups.

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

api-info page from https://manage.statuspage.ioc provided the your-api-key-goes-here

The data returned was NOT a list of component groups, the data looked like it contained information specific to the UI elements on the page, as included in the output were several element values, such as

"favicon_logo", "transactional_logo", "normal_url", "retina_url", "hero_cover", "email_logo" and "twitter_logo"
I'm looking to retrieve the list of current component groups. I'd REALLY like an API that would retrieve the data for a specific component group, specified by name in the query API call. That API call doesn't currently exist so I need to use the API to get the list of component groups and iterate over this list looking for a matching group name. This approach should work but only if the API call to fetch the list of component groups works as documented.

I can provide the full response (after redacting any sensitive info if any) from the API call to retrieve the component group list if needed.

1 answer

0 votes
Kevin Paulovkin
Contributor
January 16, 2024

Are you looking for a list of Components in your instance or Component Groups? If you don't have any Component groups created, perhaps that's the issue?

When I run this API against my instance, it works fine and returns a Response similar to example seen below. Includes the name of each component group along with list of components underneath.

Component-groups.PNG

Roy Speier January 16, 2024

I'm looking for a list of Component Groups - even better would be an API that returns a component group by name but that API is not available

Roy Speier January 16, 2024

I found the source of my error - I thought I was executing this:

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

but somehow I lost the component-groups at the end of the URL and then when I added it I originally spelled component-groups as component_groups

running the API as I listed above succeeds returns the desired list of component groups!

Like Kevin Paulovkin likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events