BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
uncle_ho
Fluorite | Level 6

Hello

 

Have any of you figured out how to get a hierarchical list with an API/URL call?

 

Like lists with this url? 

svi-datahub/admin/lists?name=OBJECTNAME

 

Example:

On the Viya Admin page (Manage Investigate and Search), on the "Data Object" tab and the "Reference Data" sub tab, I have created a list named "regions"  which contains a list of districts.

 

If I enter the url into the browser "homepage/svi-datahub/admin/lists?name=regions, the list "regions" is returned as json.

 

So, now I try to get a hierarchical list as json via an API call. This hierarchical list has been created in "Reference Data" sub-tab, tab Hierarchies.

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ

So when you call svi-datahub/admin/lists?name=regions the items in the response are your districts which could be retrieved using svi-datahub/admin/lists?name=district_name. Would you be able to read the response from the first call and then iterate through those?

 

Edit: To answer your question, I don't think there is a separate API call that will return a flat response.

--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

4 REPLIES 4
rudfaden
Lapis Lazuli | Level 10
Your question barly makes senese. Please rewrite it with a minimal working example.
uncle_ho
Fluorite | Level 6
No worries, I have updated the query.
gwootton
SAS Super FREQ

So when you call svi-datahub/admin/lists?name=regions the items in the response are your districts which could be retrieved using svi-datahub/admin/lists?name=district_name. Would you be able to read the response from the first call and then iterate through those?

 

Edit: To answer your question, I don't think there is a separate API call that will return a flat response.

--
Greg Wootton | Principal Systems Technical Support Engineer
uncle_ho
Fluorite | Level 6

Thanks much, that helped .../svi-datahub/admin/lists?name=region_districts_sub_lev did the trick.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

Discussion stats
  • 4 replies
  • 915 views
  • 2 likes
  • 3 in conversation