Discussions

 View Only
  • 1.  Quickbase REST Api in Quickbase Webhooks

    Posted 08-03-2022 10:53
    Greetings, 

    To start, I am aware that I could use QB Actions to solve this. Also, I tested all inside the Rest API documentation and was able to post a record successfully. 

    I want to use QB Rest API inside QB Webhooks. I have two headers, the Authorization: "QB-USER-TOKEN [user token]" and QB-Realm-Hostname "thing.quickbase.com" filled out properly. The Endpoint is the generic https://api.quickbase.com/v1/records. Method: POST and FORMAT is JSON. 

    Body : 
    {
    "to": "ImagineHere",
    "data": [
    {
    "6": {
    "value": "[Issue Type]"
    },
    "7": {
    "value": "[Description]"
    },
    "8": {
    "value": "Test Record"
    }
    }],

    "fieldsToReturn": "3"

    }


    I keep getting 400 - bad requests with no description. If I could get some assistance I would be most appreciative. 

    My intent is to manually create a record in table A and have the webhook insert into table B. If I can get this to work I can make it work cross apps, too. (Again, I know about the QB actions). Look at this as more practice than anything. 

    Thank you in advance.

    ------------------------------
    _____________
    Blake Taylor
    Quickbase Developer
    ------------------------------


  • 2.  RE: Quickbase REST Api in Quickbase Webhooks

    Posted 08-03-2022 20:29

    Can you check 
    https://developer.quickbase.com/operation/upsert

    PS This is of interest to me , what's your syntax for Authorisation and QuickBase-realm-hostname 

      "fieldsToReturn": [
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13
      ]
    }


    ------------------------------
    Prashant Maheshwari
    ------------------------------



  • 3.  RE: Quickbase REST Api in Quickbase Webhooks

    Posted 21 days ago
    For future use of anyone who happens across this issue, I found I couldn't have line breaks in the values the JSON was setting. Once I fixed that the web hook started working.

    ------------------------------
    Kurt Wagner
    ------------------------------