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
v-xida-msft
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
v-xida-msft
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.
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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (4,005)