Set the schema of a response in .json

Hello community, cordial greeting.

Subject: Integrate REST API.

API: Pixabay API
AppGyver’s response: Error:
The result was not an array. Maybe the data you’re looking for is inside one of the response object keys?

Status: -1

Resource settings for Get collection (GET)

Resource URL: https://pixabay.com/api/
Relative path: undefined

Note: I appreciate an alternative to solve the problem. In advance success in your projects.

Hello, you are using GETS o GET, seem to me you are using GET, look the diference between JSON data array.
[
{
“id”:123,
“nombre”:“jaime”,
“salario”:2500.00
},
{
“id”:124,
“nombre”:“juan”,
“salario”:1500.00
}
]

1 Like

Exploring on similar topics, I managed to find a very interesting discussion.

Important: Creating a schema manually to access the response in .json is the solution.

Bibliographic reference:

Thanks for your prompt response. I will study a solution based on your contribution. Successes.

Hi Edgar_Mauricio

your response array is under the key ‘hits’ .
so you can add in the ‘Response key path’ field the word hits … and it will work .

2 Likes

Hello, Iyad_Helwani.
Excellent answer, it worked 100%.

1 Like