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 Deploy App Settings API to deploy the settings to the live App.

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
AuthenticationAPI Token Authentication , Password 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 Get General Settings API .)
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 Upload File API.
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
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

JavaScript (using Kintone REST API Request )

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
var body = {
  'app': 1,
  'name': 'APP_NAME',
  'description': 'Here is app description.',
  'icon': {
    'type': 'PRESET',
    'key': 'APP72'
  },
  'theme': 'WHITE'
};

kintone.api(kintone.api.url('/k/v1/preview/app/settings', 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
var body = {
  'app': 1,
  'name': 'APP_NAME',
  'description': 'Here is app description.',
  'icon': {
    'type': 'PRESET',
    'key': 'APP72'
  },
  'theme': 'WHITE',
  // 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"
}