Using Chrome dev tools to get SharePoint API calls in JSON

When working with Power Automate I wanted an easy way to get the JSON version of an API call.

When looking at a normal API link in a webpage you get XML'MarkyList')/items

To be able to see the output in JSON we can use Chrome Dev Tools to call the same page and pass in the apporpriate header to turn it into JSON

fetch(location.href, {
  method: 'GET',
  headers: {
    'Accept': "application/json;odata=verbose"
.then(res => res.text())

And from this you can get the output quickly from the console

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s