Skip to content

Conversation

scottdover
Copy link
Contributor

@scottdover scottdover commented Aug 29, 2025

TODOs:

  • Implement column sorting for REST connections
  • Implement column sorting for ITC/COM connections

@scottdover
Copy link
Contributor Author

Hey @scnwwu @smorrisj

I feel like the answer to this is obvious, but can we assume everyone with a REST connection has access to studio? And, is there a reason we shouldn't use a studio session for api calls/etc in the extension?

I'm looking into column sorting, and DataAccessApi.getRows doesn't provide a way to provide sorting information.

However, you can provide sorting data for one or more column in studio like this:

curl 'https://{studioUrl}/studio/sessions/{sessionId}/data/libraries/{library}/tables/{table}rows?start=0&limit=100&applyFormats=true&formatMissingValues=true' \
--data-raw '{
  "distinct": false,
  "filter": "",
  "sorts": [
    { "columnName": "COLUMN_TO_SORT", "sortOrder": "descending", "sortPriority": 0 }
  ]
}' \

This API call is what is used by the data viewer in studio.

Is there a reason we shouldn't use this?

@scnwwu
Copy link
Member

scnwwu commented Aug 30, 2025

Workbench goes through REST but no studio

@scnwwu
Copy link
Member

scnwwu commented Aug 30, 2025

Looks like getRowSet supports a sortBy, will it work?
https://developer.sas.com/rest-apis/compute/getRowSet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants