Update General Settings

Updates the description, name, icon, revision and color theme of an App.

This API updates the pre-live settings.
After using this API, use the following API to deploy the settings to the live App:
Deploy App Settings

MethodPUT
URLhttps://{subdomain}.kintone.com/k/v1/preview/app/settings.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/preview/app/settings.json
Authentication Password Authentication, API Token Authentication, Session Authentication
Content-Typeapplication/json

Contents

Permissions

  • App Management Permissions are needed.

Request Parameters

Parameters that are ignored will not be updated.

Parameter Value Required Description
app String Yes The App ID.
name String The App name. The maximum character limit is 64.
description String The App description. The maximum character limit is 10,000. HTML tags can be used.
icon Object An object containing information of the App icon.
icon.type String Conditional The icon type. Specify one of the following:
  • FILE: An uploaded image.
  • PRESET: A preset icon within Kintone.
Required, if the "icon" parameter will be set.
icon.key String Conditional The key identifier of the icon.
Required, if the "icon.type" parameter is set as "PRESET".
Preset icons have key identifiers that can be obtained using the following API:
Get General Settings
icon.file Object Conditional An object containing information of uploaded icon files.
Required, if the "icon.type" parameter is set as "FILE".
icon.file.fileKey String Conditional The fileKey of the icon.
To attach a file, specify the fileKey responded when using the following API:
Upload File
The maximum file size limit is 800KB.
Required, if the "icon.type" parameter is set as "FILE".
theme String The Color theme.
The following can be specified:
  • WHITE
  • RED
  • BLUE
  • GREEN
  • YELLOW
  • BLACK
titleField Object The record title.
titleField.selectionMode String Conditional The option of "The field to be used as the record title" settings.
  • AUTO: The "Set automatically" option.
  • MANUAL: The "Set manually" option.
. Required if titleField is specified.
titleField.code String Conditional The field code of the field used as the title of the record. Required, if MANUAL is set for the titleField.selectionMode parameter.
enableThumbnails Boolean The Show thumbnails setting.
enableBulkDeletion Boolean The Enable bulk deletion of records setting.
enableComments Boolean The Enable comments setting.
enableDuplicateRecord Boolean The Enable the feature to "duplicate record" setting.
numberPrecision Object The Precision of numbers and calculations setting.
numberPrecision.digits String or Integer The Total Number of Digits setting.
numberPrecision.decimalPlaces String or Integer The Number of Decimal Places to Round setting.
numberPrecision.roundingMode String The Rounding setting
  • HALF_EVEN: Round to nearest even number
  • UP: Round up
  • DOWN: Round down
firstMonthOfFiscalYear String or Integer The First month of Fiscal Year setting. Specify the number of the month.
revision Integer or String Specify the revision number of the settings that will be deployed.
The request will fail if the revision number is not the latest revision.
The revision will not be checked if this parameter is ignored, or -1 is specified.

Sample Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
var body = {
  'app': 1,
  'name': 'APP_NAME',
  'description': 'Here is app description.',
  'icon': {
    'type': 'PRESET',
    'key': 'APP72'
  },
  'theme': 'WHITE',
  'titleField': {
    'selectionMode': 'MANUAL',
    'code': 'RecordNumber'
  },
  'enableThumbnails': true,
  'enableBulkDeletion': true,
  'enableComments': true,
  'enableDuplicateRecord': true,
  'numberPrecision': {
    'digits': 16,
    'decimalPlaces': 4,
    'roundingMode': 'HALF_EVEN'
  },
  'firstMonthOfFiscalYear': 4
};

kintone.api(kintone.api.url('/k/v1/preview/app/settings.json', true), 'PUT', body, function(resp) {
  // success
  console.log(resp);
}, function(error) {
  // error
  console.log(error);
});

XMLHttpRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var body = {
  'app': 1,
  'name': 'APP_NAME',
  'description': 'Here is app description.',
  'icon': {
    'type': 'PRESET',
    'key': 'APP72'
  },
  'theme': 'WHITE',
  'titleField': {
    'selectionMode': 'MANUAL',
    'code': 'RecordNumber'
  },
  'enableThumbnails': true,
  'enableBulkDeletion': true,
  'enableComments': true,
  'enableDuplicateRecord': true,
  'numberPrecision': {
    'digits': 16,
    'decimalPlaces': 4,
    'roundingMode': 'HALF_EVEN'
  },
  'firstMonthOfFiscalYear': 4,
  // CSRF TOKEN: used for all APIs that have an HTTP method of POST, PUT and DELETE on Kintone.
  '__REQUEST_TOKEN__': kintone.getRequestToken()
};
var url = 'https://{subdomain}.kintone.com/k/v1/preview/app/settings.json';

var xhr = new XMLHttpRequest();
xhr.open('PUT', url);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onload = function() {
  if (xhr.status === 200) {
    // success
    console.log(JSON.parse(xhr.responseText));
  } else {
    // error
    console.log(JSON.parse(xhr.responseText));
  }
};
xhr.send(JSON.stringify(body));

Response Parameters

Parameter Type Description
revision String The revision number of the App settings.

Sample Response

1
2
3
{
  "revision": "2"
}