Deploy App Settings

Updates the settings of a pre-live App to the live App.

Using this API gives the same results as when users click on "Update App" or "Discard Changes" on the App's settings page.

If multiple apps are specified in this API, and one of the updates to an App fails, all of the specified Apps will rollback to the state before this API was run.

If the record/field permissions of Apps are changed, the updated settings will be applied to the concerned records/fields sequentially, within each App.

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

Contents

Permissions

  • App Management Permissions are needed.

Request Parameters

Parameter Value Required Description
apps Array Yes The list of Apps to deploy the pre-live settings to the live Apps. The Maximum limit is 300.
If Apps are being deployed to Guest Spaces, Apps can only be deployed to the same Guest Space.
apps[].app Integer or String Yes The App ID.
apps[].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.
revert Boolean or String Specify true to cancel all changes made to the pre-live settings. The pre-live settings will be reverted back to the current settings of the live app.

Sample Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
var body = {
  'apps': [
    {
      'app': 1,
      'revision': 57
    },
    {
      'app': 1001,
      'revision': 22
    }
  ],
  'revert': true
};

kintone.api(kintone.api.url('/k/v1/preview/app/deploy.json', true), 'POST', 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
var url = 'https://{subdomain}.kintone.com/k/v1/preview/app/deploy.json';
var body = {
  'apps': [
    {
      'app': 1,
      'revision': 57
    },
    {
      'app': 1001,
      'revision': 22
    }
  ],
  'revert': true,
  // CSRF TOKEN: used for all APIs that have an HTTP method of POST, PUT and DELETE on Kintone.
  '__REQUEST_TOKEN__': kintone.getRequestToken()
};
var xhr = new XMLHttpRequest();
xhr.open('POST', 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

This API has no responses.

Sample Response

This API has no responses.

Limitations

If APIs to change the App's settings are run while deploying (or cancelling), an error will be returned.