I am trying to get a list of all models in the viya model studio through the API. I have connected, and created a couple of models through the API. These models are show in SAS model studio just like the models created in the model studio GUI. But I can't find the correct html to retrieve a list of all models.
I can get a list projects in /Model Repositories/DMRepository using the following request:
//sas-server/modelRepository/models/
These are a handfull of models registered to model studio, not a complete list of all models.
Note that this is not the path in the documentation (mlPipelineAutomation/projects), which returns a 403 Forbidden response
But I cant get a list of all individual models, e.g. those created through the API, but not yet registered to model manager\model repository, by navigating in browser to //sas-server/analyticsGateway/projects
I have tried a get request to:
analyticsGateway/projects
but get a 403 access denied though python. However, the models I created in from the API seem to be stored in my user folder. But the URI for the procjects point to analyticsGateway/projects/&id, an &id that I cannot find when navigating to analyticsGateway/projects in browser.
I can't find anything in the documentation with regards to obtaining anything other than "get all available automation projects."
Is it possible to get a list of all created models, the same list shat is shown in model studio? Or do I have to register a model to model repository to get an id and e.g. delete the model?
Hi @Ullsokk,
I'm glad you were able to come up with a solution. A word of caution. While there is nothing preventing you from using the API, it is not publicly documented on developer.sas.com.
I did confirm that this enhancement has been identified and will be part of a future release.
Join us for SAS Community Trivia
SAS Bowl XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl
Hi @Ullsokk,
I tried this out on my own and spoke to a developer about the API. Currently, there is no API endpoint that returns all Model Studio models. I verified that the /modelRepository/models/ API only returns registered models. There are ideas about creating such an API, but there is not ETA on the functionality.
Thanks,
Joe
Join us for SAS Community Trivia
SAS Bowl XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl
What about returning all (in particular user defined) pipeline templates? Would that be possible to find through the api?
Hi @Ullsokk,
I'm glad you were able to come up with a solution. A word of caution. While there is nothing preventing you from using the API, it is not publicly documented on developer.sas.com.
I did confirm that this enhancement has been identified and will be part of a future release.
Join us for SAS Community Trivia
SAS Bowl XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.