-
|
I have a View called 'Quotes_V' i need to build a rest endpoint on the quotes View with parameters for "underlying", "option_type", "strike", "expiration_date" and the payload returned needs to be bid, ask (+ others) I am absolutely new to this so please excuse my ignorance : I got as far as building a simple config file with a key-fields like below : when i run the rest URL I use : and the payload that is retuned is correct :
my question is : does the rest url look right ? I thought the parameters to query the fields needed to be structured differently ? any guidance is much appreciated example in curl I am used to something like this ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi @xclaim494, the 'key-fields' can be thought of as "primary keys." Wouldn't the primary key in this case be https://learn.microsoft.com/en-us/azure/data-api-builder/rest#filter |
Beta Was this translation helpful? Give feedback.
-
|
Hi @xclaim494 , As mentioned above we add primary keys in the REST URL like Try running the DAB engine in Development mode and look for /swagger document. This will give you the idea on what URLs would be executed and with what parameters. For example: Please refer to this https://learn.microsoft.com/en-us/azure/data-api-builder/rest#put |
Beta Was this translation helpful? Give feedback.


Hi @xclaim494 , As mentioned above we add primary keys in the REST URL like
and the fields which need to be added go as request body like
Try running the DAB engine in Development mode and look for /swagger document. This will give you the idea on what URLs would be executed and with what parameters.
For example: Please refer to this https://learn.microsoft.com/en-us/azure/data-api-builder/rest#put
Here the primary key for Table Book is column ID which is 2001 and the other fields like title and pages go in the body when executing the POST or PUT command.