Add Preview App

Creates a preview App.
The Deploy App Settings API must be used on the created preview App for the App to become live.

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

Contents

Permissions

  • Permission to create Apps in the Default App Group is needed.
  • API Tokens cannot be used with this API.

Request Parameters

Parameter Value Required Description
name String Required The App name.
The maximum length is 64 characters.
space Integer The Space ID of where the App will be created.
thread Integer The Thread ID of the thread in the Space where the App will be created.
*It is recommended to ignore this parameter so that Apps are created in the default thread. There is currently no helpful reason to create Apps in threads other than the default thread, as there are no visual representations in Kintone of Apps being related to threads. There are only visual representations of Apps being related to Spaces.

The following fields are automatically created with the preview App. These fields will be created in the language set in the user settings of the Kintone user used in the authentication.

  • Record number
  • Created by
  • Updated by
  • Created datetime
  • Updated datetime
  • Status
  • Assignee
  • Category

If the user language setting is set to "Use Web browser settings", the settings set in the Accept-Language header will be used. If there is no Accept-Language header, the language set in the "Localization" settings in the System Administrator's menu will be used.

Sample Request

JavaScript (using Kintone REST API Request)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
var body = {
  'name': 'APP_NAME',
  'space': 10,
  'thread': 11
};

kintone.api(kintone.api.url('/k/v1/preview/app.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
var body = {
  'name': 'APP_NAME',
  'space': 10,
  'thread': 11,
  // 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.json';
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

Parameter Type Description
app String The App ID of the created preview App.
revision String The revision number of the App settings.

Sample Response

1
2
3
4
{
  "app": "23",
  "revision": "1"
}