BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ullsokk
Pyrite | Level 9

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?

1 ACCEPTED SOLUTION

Accepted Solutions
joeFurbee
Community Manager

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 XL, SAS Innovate 2024 Recap
Wednesday, May 15, 2024, at 10 a.m. ET | #SASBowl

View solution in original post

4 REPLIES 4
joeFurbee
Community Manager

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 XL, SAS Innovate 2024 Recap
Wednesday, May 15, 2024, at 10 a.m. ET | #SASBowl

Ullsokk
Pyrite | Level 9

What about returning all (in particular user defined) pipeline templates? Would that be possible to find through the api? 

Ullsokk
Pyrite | Level 9
Figured it out, /analyticsGateway/pipelineTemplates/ gave a list that can be filtered by removing piplines created by sas
joeFurbee
Community Manager

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 XL, SAS Innovate 2024 Recap
Wednesday, May 15, 2024, at 10 a.m. ET | #SASBowl

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 912 views
  • 0 likes
  • 2 in conversation