Forum Discussion

QuickBaseAdmi10's avatar
QuickBaseAdmi10
Qrew Member
3 months ago

Pipelines | search records | make request api

Hello,

I have a table called Access that is populated via the access admin console. I am utilizing 4 fields from this table, [User ID] and [App ID] (used for data within the URL API_GetUserRole) and [Role ID] and [Role Name] (which is populated after the api runs). 
My pipeline that is doing this works (thanks to help from @SamuelTrachy with the jinja2), but is not optimized well.. Currently the pipeline is:
A. Search Records on the Access table
      for each A record found...
           B. Make Request (https://.....?a=API_GetUserRole.....)
           C. Update record A with role name and role id

As mentioned above, this works, however, I am just looking to see if there is a more efficient way to run this.

ps. I am confident with pipeline things, but am a rookie with API/ make request/ json/xml things. So I may need things dumbed down a bit when speaking about these things.

Thank you



------------------------------
QuickBase Administrator2
------------------------------

3 Replies

  • I do something similar with the realm info but instead of having it run off the access table - I have a series of Pipelines that search for production applications and run API_UserRoles which grabs all the users for a specific app and returns all user/role combinations. I then store that in a different table altogether to better track and report on users that may have multiple roles in the same app. 



    ------------------------------
    Chayce Duncan
    ------------------------------
    • QuickBaseAdmi10's avatar
      QuickBaseAdmi10
      Qrew Member

      Nice! If it's not too much trouble, would you be able to take screenshots of that pipeline and their respective steps so I can hopefully recreate it?
      I would make it easier and ask for the YAML, but I haven't had success with reading that language and recreating what it says quite yet - it's a bit hard to follow



      ------------------------------
      QuickBase Administrator2
      ------------------------------
      • ChayceDuncan's avatar
        ChayceDuncan
        Qrew Captain

        See attached. For my own process it ends up being (2) pipelines - the first is the loop that processes each app - and it send the JSON response to Pipeline (2) where it actually processes and loads the data. It's not the most clear and one day I may optimize it but you will notice that the actual user pipeline has 2 paths. Path one is for users that only have 1 role in the app - path two is for users that have multiple. In the majority event where people have only one role I put them into a bulk import to load together. For the other path where they have multiple roles I carve them out and do a jinja loop to import them right then given that the JSON format is different when QB passes it along. It wasn't ideal - but it was a reaction to an audit request and needed the most efficient way that needs to be revisited one day. 



        ------------------------------
        Chayce Duncan
        ------------------------------