Web API Edition | ComponentOne
Services / Data Engine Services / Analyses
In This Topic
    Analyses
    In This Topic

    Analyses service provides API to create an analysis according to the specified data source key. Your client application sends an HTTP request to the service application for using the Analysis API to create an analysis with data source.

    Analysis Service Request Schema

    To create an analysis with data source, you need to use POST method. Data source information specified in the request URL, as:

    POST:http://<host>[:port]/api/dataengine/{datasourcekey}/analyses

    Data source information can be specified in the request URL, as follows

    URL Parameters

    Analysis service includes the following parameters.

    Parameter Description
    datasourcekey Used to specify the data source you want to analyze.
    View Definition Used to specify the view definition.
    For example:
    
    {
      fields:[
       {"binding":"Active","dataType":3},
       {"binding":"Country","dataType":1},
       {"binding":"Date","dataType":4},
       {"binding":"Discount","dataType":2},
       {"binding":"Downloads","dataType":2},
       {"binding":"ID","dataType":2},
       {"binding":"Product","dataType":1},
       {"binding":"Sales","dataType":2}
      ],
      rowFields:{items:["Product"]},
      columnFields:{items:["Country"]},
      valueFields:{items:["Sales"]}
    }
    

    Response Messages

    HTTP Status Code Reason
    201 An IAnalysis object is returned to specify the analysis result information. IAnalysis object includes the status and the result data. When the executingStatus is “Completed”, the result data is an array which stands for the aggregated result data.

    Otherwise, the result data is always null. Location in response header shows the url to access the analysis instance.
    404 {datasource} is invalid.

    For more information on Data Engine Services, see WebApiExplorer demo.