API REST - GET/API/LIST/{table} - How to get all records from a table?

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
lfernandes
User
Posts: 77

API REST - GET/API/LIST/{table} - How to get all records from a table?

Post by lfernandes »

I am applying the Code Example of REST API to list the table records, however the return is limited to the project configuration that sets the number of records per page. I would like to understand how I can get all records of the table

    let object = "<Table>", // Replace <Table> by actual table name

    $.get("/api/list/" + object + "/" , function(res) { // Get response from View page API
        if (res && res.success) {
            let row = res[object];
            alert(JSON.stringify(row)); // Show output JSON
        } else {
            alert(res.failureMessage);
        }
    });

MichaelG
User
Posts: 1110

Post by MichaelG »

Check the recperpage parameter for the list page API action.


lfernandes
User
Posts: 77

Post by lfernandes »

Ok Michael! However, you can exemplify how to apply this parameter to the API action on the list, with the objective of returning all records in the table


MichaelG
User
Posts: 1110

Post by MichaelG »

Assuming you have enabled the Page sizes (records) = all option, you can use the recperpage=all option to list all records of the table.


Post Reply