0

update records

It is possible to update a record with the function http() ?

Robert

6 replies

null
    • Mconneen
    • 5 yrs ago
    • Reported - view

    Assuming you are using the Ninox Cloud version .. See the following:

    https://ninoxdb.de/en/manual/api/http-calls

    • CISOFT_Sarl
    • 5 yrs ago
    • Reported - view

    Hello Mconneen,

    Yes i use version cloud. and i write this code and the response is : Unauthorized

     

    My code :


    let myKey := "XXXXXXXXXXXX";

    let myTeam := "YYYYYYYYYYY";
    let my := this;

    let myURL := "https://api.ninoxdb.de/v1/teams";

    let myAction := "GET";
    DebugDashboard := "";

    let response := do as server
          http(myAction, myURL, {
             Authorization: "Bear " + myKey
          }, {
             'Content-Type': "application/json"
             })
    end;

    if response.error then
         alert(response.error)
    else
        DebugDashboard := text(response.result);
    end

    • CISOFT_Sarl
    • 5 yrs ago
    • Reported - view

    This code is only to find the keys of my teams.

    • Mconneen
    • 5 yrs ago
    • Reported - view

    Authorization: "Bear "   should be Authorization: "Bearer "

    • Mconneen
    • 5 yrs ago
    • Reported - view

    See EN Webinar 36_Document_Database_Structure as an example. 

    • CISOFT_Sarl
    • 5 yrs ago
    • Reported - view

    Extra thanks Mconneen. i have missed on authorization.

Content aside

  • 5 yrs agoLast active
  • 6Replies
  • 1587Views