API Updates for July 2015

API Updates

This is the first announcement for the Kintone API updates - please check the 2nd announcement here.

Kintone will be holding a scheduled maintenance update on July 10th 2015.
APIs will be added and changed in this update, as well as updates on regular Kintone features.

The Kintone Developer Program team has updated all Kintone API documents that need changes due to this maintenance.
These changes will take effect on Kintone and will be available for use after the scheduled maintenance has finished.

The upcoming API updates are as below.

Kintone JavaScript API

New features

Spec changes

  • You will be able to add an X-HTTP-Method-Override header to the Kintone REST API request header.
    This header is used to work around the Request URI Too Large error.

Bug fixes

  • If all of the below conditions match, an error page is displayed and the API that was run does not return anything:
  • If the below operations are run on the When Updating Business Processes event, the status is updated and errors are not shown:
    • An event object is returned after overwriting a field with no editing permissions.
    • An event object is returned after the type property of a field is deleted.
    • An event object is returned after a field code that does not exist is specified.
  • On the When Updating Business Processes event, if the error property is set on a field in the event object and it is returned, an error occurs and the status cannot be updated.
    (After the fix, the error property will be ignored, and the status will be updated)
  • On the When Updating Business Processes event, if the error property is set on a field in the event object and it is returned, an error occurs and the status cannot be updated.
    (After the fix, the error property will be ignored, and the status will be updated)
  • During an edit of a record, if a deleted option has been specified as the value of a Drop-down field, an error occurs.
    (After the fix, deleted options can be specified as the value, like the browser interface)
  • If the Get Related Records Target API is run on the Plug-in settings page, an error occurs and nothing is returned.
    (After the fix, a value will be returned)

Kintone REST API

New features

  • New APIs
    • Update Status
      This API updates the "Status" of an app or multiple apps. The "Business Process" feature must be enabled for the apps to work with this API.

Spec changes

  • Get App
    Localized names will be included in the name search.
  • Get Records
    The max number of records that can be retrieved will be raised from 100 to 500. Also, a "totalCount" parameter will be added as a request parameter, that can retrieve the total count of records that match the query conditions for the Get Records API.

Bug fixes

  • When adding users to a User selection field with the Add Record(s) or Update Record(s) API, the order in which the users are set is not definite.
    After the update, the API will add those users in the order stated in the JSON.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    
    // Example of adding users in the following order: user2, user1, user3
    var reqObj = {
      app: 1,
      record: {
        user_field: {
          value: [
            {code: 'user2'},
            {code: 'user1'},
            {code: 'user3'}
          ]
        }
      }
    };
    kintone.api('/k/v1/record', 'POST', reqObj, function(resp) {
      alert('Success!');
    }, function(resp) {
      alert('Failed!');
    }
    );
    

Error message changes

  • There were a number of returned error messages that were hard to decipher. After the update, these error messages will change, and will display more relative information.

    • Error displayed for the Get Records API, when a Field group is specified for the filter condition.

      • Before

        1
        2
        3
        4
        5
        
        {
          "message": "Illegal request.",
          "id": "1505999166-791854049",
          "code": "CB_IL02"
        }
        
      • After

        1
        2
        3
        4
        5
        
        {
          "message": "The field type of field Field_group cannot be used in the filter condition.",
          "id": "1505999166-791940118",
          "code": "GAIA_IQ13"
        }
        
    • Error displayed for the Get Records API, when a Category is specified for the filter condition.

      • Before

        1
        2
        3
        4
        5
        
        {
          "message": "The operator = is not available for the field type of the field Categories.",
          "id": "1505999166-791549884",
          "code": "GAIA_IQ03"
        }
        
      • After

        1
        2
        3
        4
        5
        
        {
          "message": "The field type of field Categories cannot be used in the filter condition.",
          "id": "1505999166-791627595",
          "code": "GAIA_IQ13"
        }
        
    • Error displayed for the Get Records API, when a Datasource App Field of a Related Records field is specified for the sort condition.

      • Before

        1
        2
        3
        4
        5
        
        {
          "message": "Specified field (Related_Records.Single_line_text) not found.",
          "id": "1505999166-792277049",
          "code": "GAIA_IQ11"
        }
        
      • After

        1
        2
        3
        4
        5
        
        {
          "message": "The Related Records field cannot be used to sort records.",
          "id": "1505999166-792638768",
          "code": "GAIA_IS03"
        }
        
    • Error displayed for the Get Records API, when a Table is specified for the sort condition.

      • Before

        1
        2
        3
        4
        5
        
        {
          "message": "Specified field (Table) not found.",
          "id": "1505999166-790575854",
          "code": "GAIA_IQ11"
        }
        
      • After

        1
        2
        3
        4
        5
        
        {
          "message": "Field Table cannot be used in the sort condition.",
          "id": "1505999166-790645083",
          "code": "GAIA_IS02"
        }
        
    • Error displayed for the Get Records API, when a Status is specified for the filter condition using the = or != operators for an app with the Process Management feature disabled.

      • Before

        1
        2
        3
        4
        5
        
        {
          "message": "Illegal request.",
          "id": "1505999166-789642870",
          "code": "CB_IL02"
        }
        
      • After

        1
        2
        3
        4
        5
        
        {
          "message": "Status is unavailable in this application.",
          "id": "1505999166-789694249",
          "code": "GAIA_ST02"
        }
        
    • Error displayed for the Update Records API, when null is specified for the records property.

      • Before

        1
        2
        3
        4
        5
        
        {
          "message": "Illegal request.",
          "id": "1505999166-788693805",
          "code": "CB_IL02"
        }
        
      • After

         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        
        {
          "message": "Missing or invalid input.",
          "id": "1505999166-788910122",
          "errors": {
            "records": {
              "messages": ["Required field."]
            }
          },
          "code": "CB_VA01"
        }
        
    • Error displayed for the Update Records API, when an empty array is specified for the records property.

      • Before

        1
        2
        3
        4
        5
        
        {
          "message": "Illegal request.",
          "id": "1505999166-788523239",
          "code": "CB_IL02"
        }
        
      • After *No error will occur

        1
        2
        3
        
        {
          "records": []
        }
        

    *6/12 Added the contents below:

    • Error displayed for the Get Records API, when a Table is specified for the filter condition.
      • Before

        1
        2
        3
        4
        5
        
        {
          "message": "Specified field (Table) not found.",
          "id": "1505999166-422009611",
          "code": "GAIA_IQ11"
        }
        
      • After

        1
        2
        3
        4
        5
        
        {
          "message": "The field type of field Table cannot be used in the filter condition.",
          "id": "1505999166-421790746",
          "code": "GAIA_IQ13"
        }