API Updates for December 2015

API Updates

On December 11th 2015, Kintone will be updated.
Kintone will be implementing a global standard library to speed up their services.
Due to this library change, the following changes will be made to the Kintone API.

The Kintone December update has been suspended to January.
The updates on this page will therefore be applied on the January update.

Kintone REST API

Spec changes

  • The JSON structure will follow RFC4627 standards. JSON structures that do not follow the RFC4627 standard will give a response such as:

    1
    2
    3
    4
    5
    
    {
      "message": "Invalid JSON string.",
      "id": "1505999166-1126250715",
      "code": "CB_IJ01"
    }
    
    • Sample JSON strings which will result in an error:

       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      
      // a. Inclusion of an extra "," at the end
      { "ids": [1, 2], }
      
      // b. Surrounding the key or value with single quotes
      { 'ids': [1, 2], 'size':'1' }
      
      //c. Inclusion of comments that use /**/ and //
      { "ids" : [1, 2] /* comment */ }
      
      //d. Inclusion of a new line
      { "message": "This is a
      Line Feed Sample" }
      

      The above samples will run correctly when written as follows:

       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      
      // a. Remove the extra "," at the end
      { "ids": [1, 2] }
      
      // b. Surround the key or value with double quotes
      { "ids": [1, 2], "size":"1" }
      
      // c. Remove comments that use /**/ and //
      { "ids": [1, 2] }
      
      // d. Line Feed characters \n
      { "message": "This is a \n Line Feed Sample" }
      
  • Only lower case letters for REST API URLs will be accepted. For example after the December update, if a GETmethod for /k/v1/apps.json is called, a 404 error will be returned (currently, 200 is returned).
    To avoid error responses, state the url with lower case letters, such as /k/v1/apps.json.

  • When the user's language settings is set to "Use Web browser settings" and there is no Accept-Language header, the language of the responded message (such as errors from API calls) will be in the language set in the "Localization" settings in the Administration settings.
    Before the update, messages will only be responded in Japanese.

    • *After the December update, a new feature will be implemented into the Administrator settings that allows Administrators to set the "language" (English, Japanese, Simplified Chinese) of the "Localization" settings.
    • *The "language" settings of the "Localization" for customers who sign up through kintone.com (External link) will automatically be set to "English"
  • Specs for Date Formats will be changed.

    • Before the update:
      Field Type Format Details
      Date When retrieving data:
      YYYY-MM-DDTHH:MM:SSZ
      The "T" between the "YYYY-MM-DD" and the "HH:MM:SS" is a fixed value.
      The "Z" after the "HH:MM:SS" is a fixed value.
      The "Z" denotes that the retrieved time is in UTC time zone.
      The Get Record List API responds with Date and time in UTC time zone.
      As an example, 22nd January 2015 07:00 PST will be "2015-01-22T15:00:00Z".
      When adding/updating data:
      YYYY-MM-DDTHH:MM:SS±HH:MM or
      YYYY-MM-DDTHH:MM:SSZ
      The "T" between the "YYYY-MM-DD" and the "HH:MM:SS" is a fixed value.
      The "Z" after the "HH:MM:SS" is a fixed value.
      The "±HH:MM" is the time difference with UTC.
      As an example, 22nd January 2015 07:23 PST will be "2015-01-22T15:07:00-08:00" or "2015-01-22T23:07:00Z"
    • After the update
      Field Type Format Details
      Date When retrieving data:
      YYYY-MM-DDTHH:MM:SSZ
      The "T" between the "YYYY-MM-DD" and the "HH:MM:SS" is a fixed value.
      The "Z" after the "HH:MM:SS" is a fixed value.
      The "Z" denotes that the retrieved time is in UTC time zone.
      The Get Record List API responds with Date and time in UTC time zone.
      As an example, 22nd January 2015 07:00 PST will be "2015-01-22T15:00:00Z".
      If the string from "T" is omitted, the time will be treated as UTC.
      When adding/updating data:
      YYYY-MM-DDTHH:MM:SS±HH:MM or
      YYYY-MM-DDTHH:MM:SSZ
      The "T" between the "YYYY-MM-DD" and the "HH:MM:SS" is a fixed value.
      The "Z" after the "HH:MM:SS" is a fixed value.
      The "±HH:MM" is the time difference with UTC.
      As an example, 22nd January 2015 07:23 PST will be "2015-01-22T15:07:00-08:00" or "2015-01-22T23:07:00Z"
      If the string from "T" is omitted, the time will be treated as UTC.

Bug fixes

  • When the app parameter is included in the URL, and is also included in the body, the parameter in the URL takes priority.
    After the update, the app stated in the body will take priority.
    • For example, let's say the Add Record API was used with app=1 in the URL parameter, and the body included the following:

      1
      2
      3
      4
      5
      6
      
      {
        "app": 2,
        "record": {
          "score": { "value": 123 }
        }
      }
      
      • Before the December update, a record with a field value score=123 would be added into app=1.
      • After the update, the contents of the body will take priority, and a field value score=123 would be added into app=2.
  • The Get Record API gives an error if an app includes a related records field, where the settings for "Filter" has been set to "contains" or "does not contain".
    After the update, the API will retrieve the record information without any errors.

Error message changes

  • The error shown when the query in a Kintone REST API uses a notation for a related records field, against a field that is not a related records field.
    • Before: Specified field (fieldname) not found.
    • After: The query in field "(fieldname)" is not valid. The query can be used only in the Related Records field.
  • The error shown when more than 101 ids are specified for the Delete Records API.
    • Before: Illegal request
    • After: Between 1 and 100 records can be deleted at one time. *If more than 257 records are specified, "Illegal request" will be returned

Kintone JavaScript API

Error message changes