Web API Core | ComponentOne
Services / Data Engine Services / DataEngine Client Application / Consuming Data Engine Service
In This Topic
    Consuming Data Engine Service
    In This Topic

    This section demonstrates how to call the Web API service through a client application and fetch the data that is stored in Data Engine services. The client sends a GET request to the service, which returns a response stream. The response stream is then saved in the JSON format.

    Get Fields

    In the following example, we use “complex” as an example. It is the registered key for the DataEngine data source. The service URL takes in the Data Source name, location of dataset or collection, and the corresponding fields that are associated with the dataset.

    Call the Service

    Use the following JavaScript to call the Web API service, and fetch data from the service application.

        $('#action-button').click(function() {
                type: 'GET',
                url: 'http://localhost:7383/api/dataengine/complex/fields',
                cache: false,
                dataType: 'json',
                processData: false,
                success: function (data, tx, xhr) {
                    // the field list and total row count will be obtained from result.data.
                    // the data format is like the following
                            "data": [
    Back to Top