Using APIs Released in Data Service (GET Request)

  • Last update: May 29, 2025
  • Overview

    Version

    FineDataLink Version
    Functional Change

    4.1

    Optimized API return codes. Updated the return parameter totalCount to totalNum.

    Application Scenario

    This document describes how to retrieve data from APIs published in Data Service in FineDataLink where Request Method is set to GET.

    API Description 

    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.pngicon in the lower right corner at https://help.fanruan.com/finedatalink-en/.

    Request URL

    The API path set in the published API

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

    iconNote:

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

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

    PrefixBound App IDAPI Path

    Example: http://192.168.101.211:10636/webroot/service/publish/

    The App ID  to which the API is bound

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

     

    Custom path name. Example: demo.

     2.png

    Request Method

    GET

    GET Query Params:

    Name
    TypeMandatory or NotDescription

    paging

    pageNum

    int

    Yes

    Pagination parameter

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

    pageSize

    int

    Yes

    pageSizerepresents 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.

    params

    object

    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:

    NameTypeDescription

    data

    object

    Returns the data fetched using the API.

    totalNum

    int

    Returns the total number of fetched data records.

    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.

    message

    string

    Returns success if the API call is successful.

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

    errCode

    int

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

    Response example:

    {
        "data": [
            {
                "REQUIRED_DATE": "2012-06-02",
                "DATA_ID": "6315aef1ee89a400086fcfd0",
                "EMPLOYEE_ID": "20",
                "ORDER_DATE": "2012-06-05",
                "CUSTOMER_ID": "ERNSH",
                "OWNER_REGION": "North China",
                "PAID": "No",
                "SUBMITTER": "Peach",
                "OWNER_CITY": "Zhangjiakou",
                "UPDATE_TIME": "2022-09-05 16:10:26.000",
                "OWNER_COUNTRY": "China",
                "SHIPPER": "2",
                "OWNER_POSTAL_CODE": "801070",
                "OWNER_ADDRESS": "No.25, Jidong Road",
                "OWNER_PROVINCE": "Hebei (Province)",
                "SUBMISSION_TIME": "2022-09-05 16:10:26.000",
                "FREIGHT": "258.64",
                "ORDER_ID": "11072",
                "SHIPPED_DATE": null,
                "OWNER_NAME": "Mr. Wong"
            }
        ],
        "totalNum": 355,
        "errCode": 0,
        "pageSize": 1,
        "rowCount": 1,
        "message": "success",
        "pageNum": 1
    }

    Testing the API

    Obtaining the API Address

    Select the API you need to use on the API List page and copy the path from the Authorized App to obtain the API URL. For example, http://192.168.101.211:10636/webroot/service/publish/72d0c1a3-06d3-41fe-b2b5-3dd323fc6654/demo, 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 GET 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:port/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

    Click Params and input the parameters, as shown in the following figure.

    In this example, when no parameters are specified, all data is fetched. Therefore, the area is not shown in the response. Set pageSize to 300 so that the data is limited to 300 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.

    3.3-3.png

    API Response Code Description

    When using API-published data, you can determine whether the API response is successful based on the message field.

    If message is success, the response is successful, as shown in the following figure.

    4-1.png

    If the API response fails, the system will return a status code for failure.

    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