Rollbase REST API - Forum - Rollbase - Progress Community

Rollbase REST API

 Forum

Rollbase REST API

  • We are currently developing a frontend-application (js) using the REST API and are facing numerous problems.

    First of all, your documentation is awful, lacking and sometimes even wrong, or everything at once. It only contains happy cases, and limited of those also.

    Second, none of the API endpoints are consistent with eachother. What is default and behaviour of selectQuery, cannot be used for getRecord, or anywhere else. Some place output codes, some raw values, some formatted values, arrays are splitted by comma, and some by pipe, etc.

    Third, even changing output from XML to JSON results in other results. On getRecord, changing from XML to JSON suddenly changes from lookup record names being outputted, to an array of object IDs being outputted. We see that the SOAP API atleast has a "useIds" attribute to control this.

    <?xml version="1.0" encoding="UTF-8" ?>
    <resp status="ok">
        <data  id="342171445" objName="complaint4">
            <field name="R160819019">FOO123 - Test-artikkel | I DID THIS | OOPS I DID IT AGAIN|BAR 456 - Tort og svie</field>
        </data>
    </resp>
    {
        "objName": "complaint4",
        "R160819019": [
            342171453,
            342171454
        ]
    }

    Fourth, currency outputted via selectQuery and with JSON breaks the JSON output.
    E.g: select unitprice from complaintpart outputs:

    [
        [
            12,
            13
        ],
        [
            1700
        ],
        [
            2,
            554
        ],
        [
            1,
            1234
        ],
        [
            1000000000
        ]
    ]

    Fifth, many of the APIs follow worst-practice to every aspect.

    We are running v4.4.0 on-premise installation. If any of theese is addressed in newer versions, please tell us as we could find no specifics for these major issues. It is very obvious that these areas has not been in focus for development nor testing.

    I know this has been a very negatively charged post, but I see no other choice than to address this to you guys so that you can take action and fix it for future users. All this has been a massive time consumer for our project raising the overall time to develop by as much as 60% so far, and we still keep hitting problems.

    Do you have any plans to fix your REST API?





  • I checked the various responses from selectQuery and getRecord with xml and json. Here are the outcomes

    Field type
    selectQuery (json)
    selectQuery (xml)
    getRecord (json)
    getRecord (xml)
    Lookup (one to many) null null ID Name
    Lookup (many to one) ID ID ID Name
    Currency decimal with comma, breaks json ok integer value, e.g. 1,00 = 100 integer value, e.g. 1,00 = 100
    Formula error error ok ok
    File upload gibberish gibberish name of file ok (name of file, type and content base64)
    Email Address ok ok ok ok
    Document template id? id? template name? template name?
    Date/Time Wed Feb 14 2018 08:06:05 (CEST) Wed Feb 14 08:06:05 CET 2018 Wed Feb 14 08:06:05 CET 2018 2018-02-14T07:06:05Z
    Date Wed Feb 14 2018 Wed Feb 14 00:00:00 CET 2018 Wed Feb 14 2018 2018-02-14
    Checkbox 0/1 0/1 true/false true/false
    Group of checkboxes string representation of ids of values, splitted by comma "," string representation of ids of values, splitted by comma "," code of values, splitted with pipe "|" code of values, splitted with pipe "|"
    Integer ok ok ok ok
    Organization data → e.g. departmentId ID ID Name Name
    Picklist → e.g. deliverymethod ID ID Name - "Direct" Name - "Direct"
    Process → e.g. process ID ID Name - "Standard" Name - "Standard"
    Radio buttons → e.g. shortage ID ID Code - "MAN" Code - "MAN"
    Record lock 0/1 0/1 true/false true/false
    Record name ok ok ok ok
    Related field → e.g. Baseenhet (regnr) ok ok ok ok
    Status ID ID Code - "63" Code - "63"
    Template text error error Raw string HTML encoded string
    Text ok ok ok ok
    Text area ok ok ok ok
    Time numeric: 10800000 numeric(?): 10800000 string: "03:00" string(?): "03:00"
    User link ID ID Name Name
    Workflow actions error error missing field missing field

  • Here is some results from trying different datatypes on different endpoints

    Field type
    selectQuery (json)
    selectQuery (xml)
    getRecord (json)
    getRecord (xml)
    Checkbox 0/1 0/1 true/false true/false
    Currency decimal with comma, breaks json ok integer value, e.g. 1,00 = 100 integer value, e.g. 1,00 = 100
    Date Wed Feb 14 2018 Wed Feb 14 00:00:00 CET 2018 Wed Feb 14 2018 2018-02-14
    Date/Time Wed Feb 14 2018 08:06:05 (CEST) Wed Feb 14 08:06:05 CET 2018 Wed Feb 14 08:06:05 CET 2018 2018-02-14T07:06:05Z
    Document template id? id? template navn? template navn?
    Email Address
    ok ok ok ok
    File upload

    (separated with \n, changed to line break for readability)

    #Thu Nov 26 07:02:04 CST 2015
    fileSize=243794
    origFileName=20141130_210026.jpeg
    contentType=image/jpeg
    fileName=az_4542211430328568468.jpeg

    (separated with whitespace, , changed to line break for readability)

    &#35;Thu Nov 26 07:02:04 CST 2015 
    fileSize=243794
    origFileName=20141130_210026.jpeg
    contentType=image/jpeg
    fileName=az_4542211430328568468.jpeg
    20141130_210026.jpeg
    <File 
    contentType="image/jpeg"
    origFileName="20141130_210026.jpeg">

    (base-64 encodet data)

    </File>
    Formula error error ok ok
    Group of checkboxes string representation of ids of values, splitted by comma "," string representation of ids of values, splitted by comma "," code of values, splitted with pipe "|" code of values, splitted with pipe "|"
    Integer ok ok ok ok
    Lookup (many to one) ID ID ID Name
    Lookup (one to many) null null ID Name
    Organization data → e.g. departmentId ID ID Name Name
    Picklist → e.g. deliverymethod ID ID Name - "Direct" Name - "Direct"
    Process → e.g. process ID ID Name - "Standard" Name - "Standard"
    Radio buttons → e.g. shortage ID ID Code - "MAN" Code - "MAN"
    Record lock 0/1 0/1 true/false true/false
    Record name ok ok ok ok
    Related field → e.g. Baseenhet (regnr) ok ok ok ok
    Status ID ID Code - "63" Code - "63"
    Template text error error Raw string HTML encoded string
    Text ok ok ok ok
    Text area ok ok ok ok
    Time numeric: 10800000 numeric(?): 10800000 string: "03:00" string(?): "03:00"
    User link ID ID Name Name
  • Hi Filip,

    Sorry for the delayed response. Thanks for the detailed analysis.

    As you pointed out, our APIs currently have following issues

    a. Limited Documentation

            1. Samples for many scenarios

             2. Error handling

             3. Input/Output formats for many field types

             4. Supported Field Types

    b. Consistency

            1. selectQuery Vs other APIs

            2. Date Fields

            3. Binary data (File and Image fields)

            4. Arrays

            5. Relationship Fields

            6. ID Vs Code Vs Display Name

            7. JSON Vs REST

    c. Permission Model - API and UI access control differs in some cases  

    d. Bugs

    Short Term Plan

    We are working on improving documentation and fixing bugs and permission model issues.

    So please file any bug you find through Tech Support - we will prioritize them as early as possible.

    Long Term Plan

    The biggest issue is consistency and we are unable to fix them because most if not all of those changes will break backward compatibility. So we are working a new set of APIs - Rollbase REST 2.0

    This would adhere to REST principles, will be standards based and support JSON only as data format.

    This would address all your concerns related to documentation, samples, will have a visual REST testing tool built into the product (something like Chrome POSTMAN). All APIs would be consistent including selectQuery which would be built on standard SQL parser.

    Hope this helps

  • This would help for all future uses, and are very welcome! Thank you for your answer :)