GET response with limited number of records

I’m doing a GET of an API where in the table there are more than 300 records, when there is a return, only 10 records appear. Where can I change this parameter to return all the information in the table?

Hello there,
You need to add a parameter to increase the limit if it’s available, please check the docs of the API.


Are you using a Airtable API?

2 Likes

(upload://us2aviV1V4NYsjdpOnLp8ZbUdUc.png)

This is a test:

var template = `

<style type="text/css">

    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}

    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}

    .tftable tr {background-color:#ffffff;}

    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}

    .tftable tr:hover {background-color:#e0ffff;}

</style>



<table class="tftable" border="1">

    <tr>

        <th>Matricula</th>

        <th>Nome</th>

    </tr>

    {{#each response.content}}

    <tr>

        <td>{{enrolment}}</td>

        <td>{{name}}</td>

    </tr>

    {{/each}}

</table>

`;

pm.visualizer.set(template, {

response: pm.response.json()

});

I only have the return of these 10 records

Print3

Add a size parameter in the params tab and give it an integer value like this.

1 Like

Found an easier way :

SELECT * FROM TABLE OFFSET 0 ROWS FETCH FIRST 300 ROWS ONLY

@pardeshisweety

That is a SQL query, so unless the API in question allows you to post a SQL type query (which some do), it doesn’t seem relevant to this question.

For example, the SalesForce API allows you do do this (which can be used for setup and tear down scripts).

Limiting or forcing an API to return x number of results will be down to the individual API and what the API will accept.

A well designed API if working with large data sets should allow you to control this in the request without jumping through hoops. I can’t see how a SQL query is easier than a query parameter called size.