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
Pyrite | Level 9
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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Discussion stats
  • 4 replies
  • 739 views
  • 2 likes
  • 3 in conversation