Open henhuy opened 3 years ago
Just saw this issue.
This is where the response is built up, and yes, the ID is not part of it:
I think this would be good to have? But I'm a bit afraid that this is a big change to the API? What do you think about this?
In the example, there is a key data
which is not present yet in the response.
IMO adding an entry data
holding the resulting ID, would only add value and cannot break anything.
Right, I wonder where that key came from :D It probably got kicked out accidentally (or on purpose - without documentation of course). I will discuss this in the next OEP-DEV round. I vote for implementing it.
Good point. I think at some point we shoud create a v1 of the API and streamline things like this.
I would assume that in this case an array with all new IDs is returned. But I'm not as familiar with how other apis do this either. Maybe I can find a "best practice", otherwise we can decide here what we want and then just document that decision.
BTW: I added this not "yet very helpful" open api documentation to our oeplatform docs. So we could just start updating the documentation and show it there. Currently, to show changes in the documentation, you have to manually generate the open api schema.
When running insert command from here: https://oep-data-interface.readthedocs.io/en/latest/api/how_to.html#insert-data data gets inserted and I get Response Code 201 But I cannot find resulting ID in response?
results.json()
returns{'description': [['id', 20, None, 8, None, None, None]], 'rowcount': 1}
but no key data, as shown in example: