skip to main content
Quick Start: Accessing REST data sources using HTTP header authentication : Creating an input REST File : Sample input REST file
  

Try DataDirect Drivers Now

Sample input REST file

The following is a sample input REST file that demonstrates GET requests, a POST requests, and a request configured for paging:
{
// a simple GET request without parameters to sample:
"countries":"http://mysite.com/country",

// A GET request with a parameter in the path:
"states":"http://mysite.com/states/get/{countryCode:USA}/all",

// A GET request with parameters as arguments
"timeseries":"https://www.mysite.com/times/query?interval=5min&symbol=USA&function=TIME_WEEKLY",

// A POST with parameters in the body
"countries2": {
"#path": "http://mysite.com/country",
"#post": {
"start_date":"2018-08-31",
"end_date":"2018-09-01",
"departments":"[engineering,marketing,sales]",
"tags":"[blue,green,red]"
}
},

// A GET with paging configured
"products": {
"#path": "http://mysite.com/products",
"#maximumPageSize":1000,
"#firstRowNumber":1,
"#pageSizeParameter":"maxResults",
"#rowOffsetParameter":"startAt"
},
}