RSD File Customization
Ask questions about customizing RSD files to get data from REST APIs using TimeXtender
- 17 Topics
- 88 Replies
Pagination and recursive query
Hi,I have problem with pagination and recursive queryI have rest api endpoint:https://api.procountor.com/api/invoiceswhich returns invoice headers as"id": 6591273,"partnerId": 1208831,"type": "PURCHASE_INVOICE","status": "PAID","invoiceNumber": 16...etc.pagination works fine, I get every invoice headers (thousands) when pagination is set like this in RSD-file:<api:set attr="EnablePaging" value="true"/><api:set attr="pagenumberparam" value="page" /><api:set attr="pagesizeparam" value="size" /><api:set attr="pagesize" value="100" />But the actual details of invoice comes from endpoint like this:https://api.procountor.com/api/invoices/6591273So, I have to iterate thru one by one every invoice id that I get from https://api.procountor.com/api/invoices I have followed instructions from herehttps://legacysupport.timextender.com/hc/en-us/articles/360052383191-Creating-and-using-RSD-files-for-CData-providers#one-nested-calland I can query invoices successfully, but the
Nested fields filtering in RSD file.
Hi,I have a problem with data catching from JSON file. The file looks like this:And I would like to get values from data field but only for en_US locale.I was trying to add filter in RSD file like below but it did not help:Can that type of filtering be used there?Greets, Aleksei
Using a nested REST API in combination with pagination (using the Graph API)
Hello everyone, I hope someone can help me with this.I am working on getting Azure AD Groups via the Graph API and then retrieving the members through a nested API call.I saw a post concerning a nested REST API call together with pagination in which one of the commenters (Gijs) had the exact same API which I am also using (commented by Gijs):https://support.timextender.com/rsd-file-customization-96/using-a-nested-rest-api-in-combination-with-paging-858However, the suggestion didn't work for my use-case as it only ‘expanded’ the nested values, but didn't paginate. I only got the members of the first 100 groups.I used the RSD-file from the commenter Gijs with the addition of two points:two additional rows to enable pagination; [memberout.userPrincipalName| allownull()] instead of [memberout.userPrincipalName] as I was getting a  error with this specific attribute.I've made them bold in the code down below.Would someone be able to give me some pointers to what I'm missing in the RSD
Pagination azure AD graph API with RSD
Hello,I am trying to extract data from azure AD. I am at the point where I can get data using the microsoft Graph API, and have it loaded into Timextender.The issue I am facing has to do with pagination. Microsoft graph API returns an url containing information of the next 'page’ of data. According to documentation I should adjust my RSD file as follows: <api:set attr="DataModel" value="DOCUMENT" /> <api:set attr="URI" value="https://graph.microsoft.com/v1.0/groups" /> <api:set attr="EnablePaging" value="true" /> <api:set attr="pageurlpath" value="/email@example.comLink" /> <api:set attr="RepeatElement" value="/json/value/" />This does not however loop over the pages, but still only gives me a top 100 of groups. I have a feeling maybe I need to escape either the @ or the . in the pageurlpath. Or am I missing something more obvious? Kind regards,Rutger
Passing multiple custom headers in a REST API RSD file
Hi all,I need to pass multiple custom headers in a RSD file:Host: xxxxx.cloud.xxxxx.com Authorization: Bearer dfdflejlflefdjeljfeoj Content-Length: 26Is this the correct way to do this? <api:set attr="Header:Name#1" value="Authorization" /> <api:set attr="Header:Value#1" value="Bearer dfdflejlflefdjeljfeoj" /> <api:set attr="Header:Name#2" value="Host" /> <api:set attr="Header:Value#2" value="xxxxx.cloud.xxxxx.com" /> <api:set attr="Header:Name#3" value="Content-Length" /> <api:set attr="Header:Value#3" value="26" />Greets, Rogier
SOAP API setup
Hi, I have some trouble setting up a SOAP API within the RSD file. The envelope returns data as follows : <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <getCertificateListByCompanyResponse xmlns="http://tempuri.org/"> <getCertificateListByCompanyResult xmlns:a="http://schemas.datacontract.org/2004/07/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:ObtainedCertificate> <a:CategoryName>text1</a:CategoryName> <a:CertificateCode>12345</a:CertificateCode> <a:CertificateID>12345</a:CertificateID> <a:CertificateName>text2</a:CertificateName> <a:CertificateNumber/> <a:DateAssigned>12345</a:DateAssigned> <a:DateExpire/> <a:DateObtained>12345</a:DateObtained> <a:Expired>false</a:Expired&g
Using a nested REST API in combination with paging
Hi, I am having some trouble in using the nested REST API in combination with paging. The extensive description on how to use the nested call in the RSD-file was very helpfull. The only thing I cannot get working is the paging at the first level.Two different cases, but I think the same underlying issue. In the first case the pageoffset is used as a parameter, in the other one it uses a pagetoken (the nextmarker in a blobstorage). In the output, I do see that paging is applied, but the problem is that it starts at the first page again. I seems that when using the input- and output files the correct information about the next page is not being picked up by the api-call.I have tried the call without nesting (so only on the first level) and without qualifiying the parameters and then the paging is working correctly, but when I switch to in and out again, I get false results.Does anybody recognize this isse and solved it somehow? Kind regards,Jacqueline Hofmeijer
API POST for a token to use in another API GET request
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
Pass TimeXtender variable value to CData REST provider rsd file
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!
REST API POST with custom body
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!
How to connect to REST/API endpoint with dynamic date input?
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
REST API request with paramaters (list) based on previous request
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!
REST API: Dynamic Dates, inputs and Data Selection Rules
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
Nested RSD REST API
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)
Login to the community
No account yet? Create an account
Login with SSOSSO login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.