Using APIs Released in Data Service (POST x-www-form-urlencoded Request)

  • Last update: July 04, 2025
  • iconNote:
    This document applies to FineDataLink of V4.2.6.2 and later versions.

    Overview

    This document describes how to fetch data using APIs published in Data Service in FineDataLink where Request Method is set to POST (x-www-form-urlencoded).

    iconNote:
    If you need to use APIs in your system to fetch data, see Overview of API-Based Data Fetching.

    API Documents

    The published APIs are described as follows.

    Request Description:

    Request Domain Name

    The FineDataLink server address used in the published API

    Example: http://192.168.101.211:10636/webroot

    If you need to customize the access path of the Web container, contact our technical support to obtain the solution by sending an email to international@fanruan.com or clicking the help.png icon in the lower right corner at https://help.fanruan.com/finedatalink-en/.

    Request URL

    The address of the API is published in Data Service

    Example: http://192.168.101.211:10636/webroot/service/publish/72d0c1a3-06d3-41fe-b2b5-3dd323fc6654/Doc_493

    iconNote:
    You can directly copy the API path on the App List page.

    The API URL : request domain name App ID + API path

    Prefix of the App pathBound App IDAPI Path

    Example: service/publish

    For details, see Binding an API to an Application.

    The App ID to which the API is bound

    Example: 72d0c1a3-06d3-41fe-b2b5-3dd323fc6654

    For details, see Binding an API to an Application.

    Custom path name Example: Doc_493

    For details about how to obtain the Request URL, see Overview of API Release.

    Request Method

    POST

    ContentType

    x-www-form-urlencoded

    POST Request Body Parameters:

    ParameterTypeMandatoryDescriptionRemark

    pageNum

    Numeric

    Enabled by default

    Pagination parameter

    pageNum represents the number of pages, and you can set its value.

    If Pagination Query is not enabled, you do not need to fill these parameters in Body.

    pageSize

    Numeric

    Enabled by default

    pageSize represents the number of data records per page, and you can set its value.

    iconNote:
    The maximum number of data records per page in a single API call is 10,000.

    returnTotalNum

    Boolean

    Disabled by default (can be enabled)

    Whether to return the total number of data records

    params

    String, numberic, or boolean

    No

    Custom Parameter

    If you set a custom parameter when publishing the API, but this parameter is not passed in the request, an error code will be returned.

    /

    Request example:

    2-1.png

    iconNote:
    The area in the figure is a custom parameter you set in the published API.

    Parameters of the return parameter:

    Name
    TypeDescriptionRemark

    output

    object

    Returns the data fetched using the API.

    /

    code

    int

    Error code. For details, see the "API Response Code Description" section.

    /

    message

    string

    Returns success if the API call is successful.

    Specific reasons for failure will be displayed in message. For details, see the "API Response Code Description" section.

    /

    totalNum

    int

    Returns the total number of fetched data records.

    If Pagination Query is not enabled, these parameters will not be present in the return data after you call the API.

    pageSize

    int

    Returns the number of fetched data records per page.

    pageNum

    int

    Returns the page number, indicating the page from which the data fetching starts.

    rowCount

    int

    Returns the number of data records on the current page.

    It is related to the pageNum value. For example, there are 12 data records in total. The pageNum value passed in is 2, and the pageSize value is 10. The system will query the data from the second page, and the returned value of rowCount will be 2.

    Response example:

    2-2.png

    Testing the API

    Obtaining the API Address

    Select the API you need to use on the Service List page and click b.png in Authorized App to copy the path, thus obtaining the complete API UR. For example, thtp://192.168.101.211:10636/webroot/service/publish/72d0c1a3-06d3-41fe-b2b5-3dd323fc6654/Doc_493, as shown in the following figure.

    3.1.png

    Obtaining API Authentication

    If you have enabled authentication, you need to copy the AppCode on the App List page, as shown in the following figure.

    3.2.png

    iconNote:
    If the blacklist and whitelist are set, ensure that information can be communicated between the environment where the API is used and the environment where the API is published.

    Setting API Basic Information

    Open a data fetching software. Select POST as the request method, and input the copied API path. Click Authorization and select API Key as the authorization type. Input Authorization as Key, enter AppCode a970c48a-7d44-44ce-968c-be9ad12ea5b7 as Value, and set Add to to Headers, as shown in the following figure.

    iconNote:

    1. The copied path defaults to IP address:port number/webroot. If you have configured the direct access to FineDataLink through IP address in Tomcat, you need to delete the webroot part from the copied URL.

    2. The parameter value is in the format of AppCode + space + APPCode value. The AppCode in the following figure is an example.

    3.3-1.png

    Select x-www-form-urlencoded in Body and enter key values, as shown in the following figure.

    The example retrieves data from North China, so the value of the custom parameter is directly set as North China. Set pageSize to 10 so that the data is limited to 10 entries per page. Data fetching will start from the first page and all data will be fetched at once.

    3.3-2.png

    Click Send and the response is displayed, as shown in the following figure. 

    493.png

    API Response Code Description

    For details about API return value, see Data Service Error Code.

    附件列表


    主题: Data Service
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy