cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Would it be possible to parse an API response? To get specific fields only.

I am using GET from an API link and I only need 4 fields. Would it be possible to identify specific fields from an API response?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Anonymous,

 

Could you please share a screenshot of your flow's configuration?

Do you want to parse an HTTP response and get specific fields within your flow?

 

If you want to get specific fields from your API response, you should parse your API response into a JSON format firstly and then

get the specific fields from the JSON data.

 

If you want to parse an HTTP response into JSON format within your flow, I think the "Parse JSON" action could achieve your needs. More details about parsing HTTP response into a JSON data using the "Parse JSON" action, please check the following blog:

https://sergeluca.wordpress.com/2017/09/22/extend-microsoft-flow-with-the-microsoft-graph-and-0-code/

 

More details about the "Parse JSON" action, please check the following article:

https://flow.microsoft.com/en-us/blog/five-services-json-http/

 

If you want to get specific fields from the JSON data, I think the "Select" action could achieve your needs. I have made a test on my side, please take a try with the following workaround:8.JPG

Within "Select" action, From field set to following formula:

array(body('Parse_JSON'))

WIthin Map entry, type these fields (specific fields) that you want to get from above JSON data. The key set to field name and the value set to corresponding dynamic content from the "Parse JSON" action.

 

The flow works successfully as below:9.JPG

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @Anonymous,

 

Could you please share a screenshot of your flow's configuration?

Do you want to parse an HTTP response and get specific fields within your flow?

 

If you want to get specific fields from your API response, you should parse your API response into a JSON format firstly and then

get the specific fields from the JSON data.

 

If you want to parse an HTTP response into JSON format within your flow, I think the "Parse JSON" action could achieve your needs. More details about parsing HTTP response into a JSON data using the "Parse JSON" action, please check the following blog:

https://sergeluca.wordpress.com/2017/09/22/extend-microsoft-flow-with-the-microsoft-graph-and-0-code/

 

More details about the "Parse JSON" action, please check the following article:

https://flow.microsoft.com/en-us/blog/five-services-json-http/

 

If you want to get specific fields from the JSON data, I think the "Select" action could achieve your needs. I have made a test on my side, please take a try with the following workaround:8.JPG

Within "Select" action, From field set to following formula:

array(body('Parse_JSON'))

WIthin Map entry, type these fields (specific fields) that you want to get from above JSON data. The key set to field name and the value set to corresponding dynamic content from the "Parse JSON" action.

 

The flow works successfully as below:9.JPG

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Here is my Flow.

 

flow 1st part.pngflow 2nd part.png

 

Here is the result.

 

flow result.png

Anonymous
Not applicable

 

The fields I needed are inside an array. How can the fields inside an array be parsed? Thank you so much for the response. I really appreciate your help.

 

After parsing the fields. I will use a POST method to transfer the result to a table in a system.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (68,844)