Get data for binding and unbound text components

<< Click to Display Table of Contents >>

Current:  System Integration > WebAPI 

Get data for binding and unbound text components

Previous pageReturn to chapter overviewNext page

Supported version: 8.5.1 and later

Request address

http://ip:port/bi/api?action=getScalarDatas&token=xxxx

Request message

Request parameter

required parameter :xmlData(required)

<?xml version="1.0" encoding="utf-8"?>

<info>

  <dbpath>text</dbpath>

  <elements>

      <element>

            <name>text1</name>

      </element>

     <element>

          <name>text2</name>

     </element>

     <element>

            <name>text3</name>

     </element>

  </elements>

  <params>

        <param name="a">332</param>

  </params>

</info>

parametric description

Parameter is node information:

1) dbpath(required):The path of the dashboard

2) name(required):Name of text component

3) params(optional): Some parameters can be passed inside to control the query.Type is the type of the parameter,There are mainly the following: string、boolean、float、double、char、byte、short、int、long  、time、dateTime。If the parameter has multiple values, separate it with a comma, ",".

4) The parameter format for the date type is as follows:

The format of date is"yyyy-MM-dd"

The format of datetime is "yyyy-MM-dd HH:mm:ss"

The format of time is "HH:mm:ss"

Sample

function getScalarDatas() {

        var xml = getXml();

        $.post("http://" + ip + ":" + port + "/" + project + "/api?action=getScalarDatas&token=xxxx",

           {xmlData : xml},

           function(result) {

           writeXml(result);

        });

     }

Response message

Response result

Successful operation:

<info>

    <elem name="text1" value="4321"/>

    <elem name="text2" value="8980038"/>

    <elem name="text3" value="no bingding data"/>

</info>

 

Result description

The response result information is xml. direct parse.

Level return type, different values represent different return status 1 indicates success, 6 indicates failure.