BookmarkSubscribeRSS Feed
k4minou
Obsidian | Level 7

Hey everyone 👋

 

Quick context: I built https://pypi.org/project/kstlib/, a Python toolkit I use daily. One of its features lets you define REST API endpoints in YAML and call them without dealing with auth headers, signatures, or boilerplate code.

Since I work with SAS Viya daily, I created viyapi: a YAML collection of ~1250 Viya REST endpoints that plugs into kstlib.

 

Instead of this:

curl -X GET "https://your-viya-server.com/files/files?limit=10" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Accept: application/vnd.sas.collection+json"

(and depending on your setup, this can get even more verbose...)

 

You get this:

kstlib rapi files.files-list limit=10

 

A few things to keep in mind:
- Paths and methods come straight from the SAS docs
- Query params are mostly complete
- Body schemas were AI-generated — they might have errors here and there
- I've tested the GET endpoints I use daily, but with 1200+ endpoints, I can't validate everything on my own

 

If you work with Viya APIs and find this useful, or if you spot something that needs fixing, contributions are welcome. Every bit helps!

 

👉 https://github.com/KaminoU/viyapi

 

Happy coding 🙂

Capture d’écran 2026-02-02 101837.png

Capture d’écran 2026-02-02 102439.png

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 125 views
  • 0 likes
  • 1 in conversation