Help

Api Records are not coming in sequence please help

Topic Labels: API
1411 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Coding_Apps
4 - Data Explorer
4 - Data Explorer

When I am making api call results are not coming in sequence meand results should come like this 1,2,3,4 but results are coming like this 1,3,2,4 How I can fix this ?

1 Reply 1

Hey, you can add a sort param to your query.

There’s some detail in the API docs, but I’ll share here too:

The sort parameter overrides the sorting of the view specified in the view parameter. If neither the sort nor the view parameter is included, the order of records is arbitrary.

For example, to sort records by Task Name in descending order, send these two query parameters:

sort%5B0%5D%5Bfield%5D=Task%20Name
sort%5B0%5D%5Bdirection%5D=desc

For example, to sort records by Task Name in descending order, pass in:

[{field: "Task Name", direction: "desc"}]