I am using a REST API (CData source) to get source data. Since I need to include a CSR_NONCE value in the header (unique key value), the REST api is set up as a POST. Is it possible to specify that you want to do a POST rather than GET in a CData source?
Page 1 / 1
Hi Mirjam
Yes you can do a post statement in the RSD file. Though there normally is not an general way to do it. If you want help to set it up please write to me at support@timextender.com
Hi,
I have moreless the same question but instead for the JSON CData driver. This is the endpoint and result from the Postman client:
I only need the fields ‘id’ & ‘name’ so I created the attached RSD file. How to make this file compatible with POST?
I think you should remove some of that sensitive personal data.
Oeps, that blur wasn't stored in the picture. Is there a way to edit this post? The Edit button is not available under the three dots...
@westdorp Edit should be possible on your own post:
Unfortunately it is not possible
You can only edit for a limited amount of time.
Hi @westdorp I changed the image and reuploaded it. Is it acceptable now?
Also I recently made a file doing a Post call to authenticate and get an access_token, which were then used to do the real get call for the data.
<api:script xmlns:api="http://apiscript.com/ns?v1" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <!-- See Column Definitions to specify column behavior and use XPaths to extract column values from JSON. --> <api:info title="Tasks" desc="Generated schema file." xmlns:other="http://apiscript.com/ns?v1"> <!-- You can modify the name, type, and column size here. --> <attr name="Id" xs:type="string" readonly="false" other:xPath="/json/Id" /> <attr name="Name" xs:type="string" readonly="false" other:xPath="/json/Name" /> </api:info>
<!-- The GET method corresponds to SELECT. Here you can override the default processing of the SELECT statement. The results of processing are pushed to the schema's output. See SELECT Execution for more information. --> <api:script method="GET"> <api:set attr="temp.access_token" value=""/> <api:set attr="method" value="POST" /> <api:set attr="URI" value=""AuthURI]"/> <api:set attr="Header:Name#1" value="Authorization"/> <api:set attr="Header:Value#1" value="Basic ***********"/> <api:set attr="JSONPath" value="$"/>
<!-- The GET method corresponds to SELECT. Here you can override the default processing of the SELECT statement. The results of processing are pushed to the schema's output. See SELECT Execution for more information. --> <api:script method="GET"> <api:set attr="method" value="POST" />