
```json
{
"version": "v1",
"resource": "customer",
"status": "success",
"paginator": {
"count": 25,
"currentPage": 1,
"lastPage": 2,
"perPage": 25,
"total": 50,
"nextPageUrl": "http://oc-scheduler.local/api/scheduler/customers?page=2"
},
"data": [
{
"id": 1,
"erp_number": "67261537",
"company": null,
"name": "Keven Emmerich",
"email": "keith.lakin@adams.com",
"phone": null,
"fax": null,
"address": null,
"postal_code": null,
"city": null,
"country": null,
"unit": null,
"floor": null,
"alternate_phone": null
},
{
"id": 2,
"erp_number": "46316763",
"company": null,
"name": "Guy Predovic",
"email": "ljaskolski@cassin.biz",
"phone": null,
"fax": null,
"address": null,
"postal_code": null,
"city": null,
"country": null,
"unit": null,
"floor": null,
"alternate_phone": null
}
]
}
```
9 Answers, 1 is accepted

it returns me the following error in the console:
VM4468:1 Uncaught SyntaxError: Unexpected token :
at m (index.js:2)
at Function.globalEval (index.js:2)
at text script (index.js:2)
at Ut (index.js:2)
at k (index.js:2)
at XMLHttpRequest.<anonymous> (index.js:2)

it returns me this error
VM4468:1 Uncaught SyntaxError: Unexpected token :
at m (index.js:2)
at Function.globalEval (index.js:2)
at text script (index.js:2)
at Ut (index.js:2)
at k (index.js:2)
at XMLHttpRequest.<anonymous> (index.js:2)

it gives me this error
Uncaught SyntaxError: Unexpected token :
at m (index.js:2)
at Function.globalEval (index.js:2)
at text script (index.js:2)
at Ut (index.js:2)
at k (index.js:2)
at XMLHttpRequest.<anonymous> (index.js:2)

Uncaught SyntaxError: Unexpected token :
at m (index.js:2)
at Function.globalEval (index.js:2)
at text script (index.js:2)
at Ut (index.js:2)
at k (index.js:2)
at XMLHttpRequest.<anonymous> (index.js:2)
You can get data from a remote service with the Kendo UI DataSource. See the Create DataSource for Remote Services section of the documentation, which contains more information on how the DataSource can be configured in such scenarios. For all DataSource configuration options, methods and events refer to the API documentation.
If you are using the DataSource by itself (it is not used by another Kendo UI widget), after configuring it and initializing it, you can call its fetch API method as demonstrated in the example you can find in the method's documentation. Calling this method will read the data from the remote service.
The DataSource sends jQuery.ajax() requests to the remote endpoint, so if you are able to read the data with a standard jQuery.ajax() request, you should be able to do the same with the Kendo UI DataSource.
Regards,
Ivan Danchev
Progress Telerik

Hi Ivan,
thanks, I read the documentation and I find anywhere stated how to my array of data which is embedded inside my response. The Kendo DS suppose that it will receive the data which is not always the case. In my case, I setup paginator for example. so my response is of type:
{
"current_page":1,
"data" : [
{ "id":1, "company":" " },
{ "id":2, "company":"fsdf fds" },
]
}
How do I bind the data into the Kendo Data please?
The DataSource sends a request to the service and receives the data. From there on another widget can be used to visualize that data. That being said, could you elaborate more on your scenario:
- Does the request to the service fail? (you can check that by handling the error event of the DataSource)
- Do you use another widget to display the data received by the DataSource, for example a Grid?
- Once the data is received, do you operate with it in any way? If so, how? And at which point does the exception get thrown?
Regards,
Ivan Danchev
Progress Telerik

Thanks for your message
I am using a simple grid.
to get a sense of the returned my my REST API, please refer to my previous message, it is in there.
All the API does not return JUST the data array like in your examples, in my there are other embedded data and I change them as it is an external service. My guess is that somewhere there is a way to handle this scenario with KendoUI. Thank you
Since you are using a Grid to display the data you can use the dataSource's schema.data option to get the dataItems from the response's "data" field. Here's a dojo example, in which a Grid properly displays your data.
Regards,
Ivan Danchev
Progress Telerik