Get data of a Datasource
Endpoint Name: getdatasourcebyname
Request type : POST
Authorization: Bearer token as header
Endpoint Details: The getdatasourcebynameendpoint will be used to get data of datasource.
Method
URL
POST
URL/access/klearstack/getdatasourcebyname
Request Body
Params
Values
Required
Description
company_name
string
Yes
Name of the company for which the user is logging in
datasource_name
string
Yes
Name of the datasource
page_index
string
Yes
Page number of Paginated data
items_per_page
string
Yes
Number or records per page is required (Max : 100)
Shell (cURL)
Request Body
curl --location "URL/access/klearstack/getdatasourcebyname" \
--header "Authorization: Bearer your_token_here" \
--form "company_name=Replace_Company_Name_Here" \
--form "datasource_name=Replace_Datasource_Name_Here" \
--form "page_index=Replace_Page_Index_Here" \
--form "items_per_page=Replace_Items_Per_Page_Here"Python
Request Body
Java (OkHttp)
Request Body
Node.js (Axios)
Request Body
JavaScript (XHR)
Request Body
API Response
Status code
Example Response
200
{
"DataSourceName": "vendor email",
"DataSourceType": "excel_or_csv",
"DataSourceStatus": "true",
"Total_fields": 596,
"Page_number": 1,
"fields": [
{
"name": "USER_FIRST_NAME",
"datatype": "string"
},
{
"name": "USER_LAST_NAME",
"datatype": "string"
},
{
"name": "email",
"datatype": "string"
},
],
"data": [
{
"_id": {
"$oid": "644ba49a6f4023afbca88c94"
},
"USER_FIRST_NAME": "Marti",
"USER_LAST_NAME": "URIB",
"email": "martin@colibriflowers.com"
},
{
"_id": {
"$oid": "644ba49a6f4023afbca88c95"
},
"USER_FIRST_NAME": "Ana Lucia",
"USER_LAST_NAME": "Andrade",
"email": "aandrade@equatoroses.com"
}
],
“release_version”:”7.8.9”
}
Last updated