cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
benjammin502
Level: Powered On

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 Staff prabir
Power Automate Staff

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 Staff prabir
Power Automate Staff

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
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 404 members 5,848 guests
Please welcome our newest community members: