cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
benjammin502
Regular Visitor

Access "results" array from Send an HTTP Request to Sharepoint

Hi All,

 

Apologies if this has been posted before. I've done a search and haven't found the relevant information.

 

I need to access O365 Video VewCounts. This is a separate call to grab the ViewCount, as the O365 Video Connectors do not contain the ViewCounts. So a separate call is needed. I'm able to successfully execute the call with the Send an HTTP Request to Sharepoint, however, I am unable to figure out how to get to the "results" array of objects. I can get to the "d": object, but no further.

 

Here is what the connector/call returns (I've deleted some of the metadata as it contains sensitive information). I need to access the 6 properties located directly after the __metadata object. Any help would be greatly appreciated. Thanks.

 

{
  "d": {
    "results": [
      {
        "__metadata": {
          "id""",
          "uri""",
          "type""SP.Publishing.VideoItem"
        },
        "CreatedDate""2018-03-02T17:31:28Z",
        "Description""This video shows a new employee how to complete new hire documents in Docusign. [Audience: U.S.]",
        "Title""New Hire Electronic Documents [Canada, U.S.]",
        "ID""127a962e-25a9-484b-b8dd-c9fad1caeace",
        "VideoDurationInSeconds"107,
        "ViewCount"287
      }
    ]
  }
}

1 ACCEPTED SOLUTION

Accepted Solutions
Power Automate
Power Automate

Re: Access "results" array from Send an HTTP Request to Sharepoint

You can use the "parse json" aciton to get strongly typed responses. Click "Use sample payload to generate schema" to auto genereate the schema based on the json. Should look something like this.

 

Capture.PNG

View solution in original post

2 REPLIES 2
Power Automate
Power Automate

Re: Access "results" array from Send an HTTP Request to Sharepoint

You can use the "parse json" aciton to get strongly typed responses. Click "Use sample payload to generate schema" to auto genereate the schema based on the json. Should look something like this.

 

Capture.PNG

View solution in original post

benjammin502
Regular Visitor

Re: Access "results" array from Send an HTTP Request to Sharepoint

Amazing. Thank you so much. I'm new to Flow and did not realize I could paste in my JSON response to generate the necessary schema. This worked perfectly for my needs. Out of curiosity, is there a way you could also access the properties via bracket or dot notation? I figured this might be efficient if I only need to access 1 or 2 properties and save on adding more connectors.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,487)