Forum Discussion

aecorn's avatar
aecorn
Regular Visitor
4 years ago

"Drill down" into API-endpoints with dropdowns. API > Parameter > API > Parameter

So there is a huge API, with lots of data. It can be indexed into on several levels by adding /subtopic to the url.

So calling http://api-base-url/table gives you "main topics".
I want the user to then select from these, then retrieveing the subtopics from the list of maintopics:
http://api-base-url/table/maintopic
Then the user selects from the subtopic, the subitem they want from a list recieved from:
http://api-base-url/table/maintopic/subtopic
Then the user selects a table from the subtopic, based on the list from the previous step:
http://api-base-url/table/maintopic/subtopic/subitem
The table has an id, which then can be called directly:
http://api-base-url/table/00683

Meaning the api has about 4 levels, and I dont want to retrieve uneccessary parts of it, unless requested, and would like to split the "data-retreival" into 4 "parts" with user input inbetween. I would like the "bare-bones-file" to be very user-friendly.

I did the two first steps using lists->parameters and opening the file as a template, but this results in the second parameter not being populated, as I guess the template does not retrieve any "new data" after filling out the first parameter... I guess it is possible to fill out every parameter and close the parameter-edit-window inbetween, but this is not very "user-friendly"...

What is a good way to achieve this? Build a connector? Work with functions on the queries?

 

5 Replies

  • v-xiaotang's avatar
    v-xiaotang
    Icon for Community Support rankCommunity Support

    Hi aecorn 

    How about setting the subtopic as optional parameter?

     

    Best Regards,

    Community Support Team _ Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

    • aecorn's avatar
      aecorn
      Regular Visitor

      It would still force the users to manually open and set the "next level" for every parameter. Until a "real table" is reached. Thats quite a few clicks spent on opening and closing the parameter-window... Also there will be lots of "error-messages" of incomplete queries inbetween there, where only some of the paramters are set correctly.
      I could build a datamodel of the whole API first, then just navigate into that, but thats gonna be huge...

      • v-xiaotang's avatar
        v-xiaotang
        Icon for Community Support rankCommunity Support

        Hi aecorn 

        You can try this, I've test, it works fine

         

         

        Best Regards,

        Community Support Team _ Tang

        If this post helps, please consider Accept it as the solution to help the other members find it more quickly.