API: Programmatically changing row order in grid views?

In the Airtable UI, you can manually rearrange the order of rows in grid views by dragging them up and down. This row order is view-specific. Is it possible to reorder the rows in a grid view like this via the API?

@Roland_Crosby Welcome to the community forum!

The Airtable API does not allow you to modify the base/table/view schema. Could you elaborate on why programmatically managing the row order in a grid view is important to your use-case?

Hi Giovanni, thanks for getting back to me. We use sorted records in Airtable grid views to maintain stack-ranked lists of items by priority. Unfortunately, there’s no way to persist or extract these orderings outside of a single grid view. My initial goal was to use the API to copy the ordering of one manually-sorted grid view to other grid views.

I guess if records are always returned from the API in the order in which they appear in the UI, I could add a numeric field, iterate over the manually-ordered records in the API result for the grid view I want, and put the order in that numeric field…but that feels awfully hacky.