Deploy App Settings

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

Using this API is the same as clicking on “Update App” in the Kintone App’s settings. Changes made to pre-live settings will not be deployed to the live app until this API is used.

This API can also be used to revert the pre-live settings back to the current live app settings. This would be the same as clicking on “Discard Changes” in the Kintone App’s settings.

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.

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
AuthenticationAPI Token Authentication , Password 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

JavaScript (using Kintone REST API 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', 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.