RSD File Customization
Ask questions about customizing RSD files to get data from REST APIs using TimeXtender
- 10 Topics
- 51 Replies
Hi! I have asked a similar question like this before. I am trying to request an API token and use that token inside an API get. I do this because a token is only valid for 23 hours. I need to give the POST a few paramters: A client ID, Client Secret, grant type and a customer ID to identify who I am.The API documentation says it uses OAUTH2.0 but I have not gotten it to work. I right now have the following code which returns the warning: The view "REST"."json" has no columns.The view is ignoredBelow my code: <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="API" desc="Generated schema file." xmlns:other=http://apiscript.com/ns?v1> <!-- You can modify the name, type, and column size here. --> <attr name="categoryName" xs:type="string" readonly="false" other:xPath="/json/catego
We have a REST API that we are calling and setting up pagination on, so we are using an rsd file. We need to pass a calculated date (milliseconds since 1970) to the API call. I think we might need to reference a stored date of our last data extraction and then calculate the proper date to pass to the REST API. I am thinking we might do that in TX, but I am unclear how we can then pass a TX variable value in to the rsd file so we can put it into the query string of the API call. Any pointers that can be provided would be appreciated. Thanks!
Hi, To make sure my API will always function without manually changing the API token each period, I want to request the token and inject it into an API GET header. To do this, I need to know how to write the proper XML that can do the following: API URL: example.company.com/api/LoginRequired body: EMAIL: firstname.lastname@example.orgPASSWORD: examplepassword123How do I write the poper XML inside a DSD file to request the token using the body parameters (not in the header), I cannot find the proper documentation. Thanks in advance!
Hi, I need to extract data from an API which take dates as input values, [from date] and [to date]. And I need to extract data from this API each day. Is it possible to pass dynamic dates to the API connection based on todays date? I can't figure out how to do this. cheers, Sturla
Although I'm following the steps explained on this page (https://legacysupport.timextender.com/hc/en-us/articles/360034695651-Connect-to-a-REST-API), I can't figure out what's going wrong.Situation: I have a REST API, with two endpoints: one for fetching all locations (locationId) and one for fetching all reviews per location. I need the locationId from the first request, iterate trough all locationId's and request the reviews per location. First request is working perfectly, REST.json is loaded with all locations. For the second request, I've edited the RSD file, with an input parameter and filter (I know, the URL is mentioned twice, don't know which one is correct):Then I added a dynamic filter:However, no results. Does anyone know what I'm doing wrong? Can someone point me in the right direction? Thanks in advance!
HiThis is a somewhat similar question asked by Sturla SvendsenThe API I am using only returns data when fromDate and toDate are populated in the URL params.When setting up the Data Source (CData) I won't be able to fetch anything without these dates.I have tried creating the datasource with hard coded dates in the Edit-window in DH and altering the RSD-file the way that Thomas Lind informed Sturla about in the post linked above.However, when I delete the URL params in the Edit-window, and rely solely on the already created RSD-file, the connection won't work (401 as the url is invalid).When I try to add data selction rules and execute, it states the the input fields (that are written in the api:info-secion of the RSD-file) are unknown.I really could use an complete answer as to how to connect to an API with dynamic dates in the URL params.The guides/documentation found on this webpage is fragmented and doesn't work with the use case above.Thank you Kenneth
I'm trying to get data from a REST api. The challenge is that the response is nested (JSON format).I did split up the seperate fields by editing the RSD file, adding something after the xPath...The result looks better than before but still all my answers are comma seperated in 1 field/row combination instead of 1 field 4 rows for example. It looks like this now:How can I make sure I only get 1 anwser per value per row? (So line 1, field q_position should be seperated to 4 rows with value 1,2,3 and 4)
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.