Using APIs Released in Data Service (POST Application/JSON Request)

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

    Overview

    This document explains how to retrieve data from APIs published in Data Service in FineDataLink, where the request method is POST (application/JSON).

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

    API Document

    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 the technical support personnel to obtain the solution by sending an email to international@fanruan.com or clicking the  icon in the lower right corner at https://help.fanruan.com/finedatalink-en/.

    Request URL

    The address of the API published in Data Service

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

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

    An API URL is a sequential concatenation of Request domain nameApp path prefixApp ID, and API path.

    App Path PrefixBound App ID API Path

    Example: service/publish

    For details, see Binding an API to an Application.

    The App ID to which the API is bound

    Example: a970c48a-7d44-44ce-968c-be9ad12ea5b7 

    For details, see Binding an API to an Application.

    Custom path name, for example, Doc_489

    For details about how to obtain the request URL, see Function Description of Data Query API.

    Request MethodPOST
    ContentTypeapplication/json

    POST Request Body Parameters:

    ParameterTypeMandatoryDescriptionRemark
    pageNumNumericEnabled 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 input these parameters in Body.
    pageSizeNumericEnabled 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 100,000.
    returnTotalNumBooleanDisabled by default (can be enabled)

    returnTotalNum returns the total number of data records

    paramsString, numeric, or booleanNo

    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:

    {
        "area": "North China",
        "pageNum": 1
        "pageSize": 10,
        "returnTotalNum": true
    }
    iconNote:
    The area in the figure is a custom parameter you set in the published API.

    Returned Variable:

    NameTypeDescriptionRemark
    output objectReturns the data fetched using the API./
    codeintError code
    For details, see the "API Response Code Description" section.
    /
    messagestring

    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.

    /
    totalNumintReturns the total number of fetched data records.If Pagination Query is not enabled, these parameters will not appear in the API response data.
    pageSizeintReturns the number of fetched data records per page.
    pageNumintReturns 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:

    Testing the API

    Obtaining the API Address

    First, select the desired API from the API list. Copy the path from the Authorized App section to obtain the complete API address, for example, http://192.168.101.211:10636/webroot/service/publish/72d0c1a3-06d3-41fe-b2b5-3dd323fc6654/Doc_489, as shown in the following figure.

    Obtaining API Authentication

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

    iconNote:
    If the blocklist and allowlist are set, ensure network connectivity between the environment where the API is used and the environment where the API is published.

    Setting API Basic Information

    Open the data fetching software. Select POST as the request method, and paste the copied API URL. Click Authorization and select API Key as the authorization type. Input Authorization as Key, paste the value copied in the "Obtaining API Authentication" section in Value, and set Add to Header, as shown in the following figure.

    iconNote:

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

    2. The value of Value is a sequential concatenation of AppCode, space, and AppCode value. The AppCode in the following figure is an example.

    Next, select raw and then JSON in the Body section and input the JSON data, as shown in the following figure.

    The example retrieves data from North China, so the value of the custom parameter is set to 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.

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

    API Response Code Description

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



    附件列表


    主题: Data Service
    • 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