Solved

Updating record with foreign keys using ODATA

  • 22 February 2023
  • 1 reply
  • 69 views

Userlevel 1
Badge +1

Hi for a external application we would like to update records using the ODATA API. but we’ve noticed that updating foreign keys returns a `403 Forbidden`, but mutating the normal columns update fine.

We’ve tried this using a PATCH/POST request and a STAGED record, both fail in the end. curiously the STAGED record only adds the non-key values to the STAGED record even when u try to pot a key in, it does not accept it.

We currently work around this using a subroutine, but would be alot better if we could just mutate the record directly instead of writing subroutines for every table we need.

 

Using a patch:

Using a POST request
Using a staged record, adding the key values in the initial post request results in only 1 column being added instead of 5

 

icon

Best answer by Erwin Ekkel 23 February 2023, 08:51

View original

This topic has been closed for comments

1 reply

Userlevel 6
Badge +16

What rights does the user have on these columns, and are they editable in subject? The api follows the same rules as the gui so if the column is not editable in the GUI then it's not editable in Odata/API.