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
Flow Staff prabir
Flow 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

2 REPLIES 2
Flow Staff prabir
Flow 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

Highlighted
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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 189 members 4,445 guests
Please welcome our newest community members: