Delete Form Fields

Deletes fields from a form of an App.
When deleting a Field group or Table, all fields within the Field group or Table will also be deleted.

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

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

Contents

Permissions

  • App Management Permissions are needed.

Request Parameters

Parameter Type Required Description
app Integer or String Yes The App ID.
fields Array Yes The list of field codes of the fields to delete.
Up to 100 field codes can be specified.
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.api()

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
var body = {
  'app': 1,
  'fields': [
    'Text__single_line_1',
    'Number'
  ]
};

kintone.api(kintone.api.url('/k/v1/preview/app/form/fields.json', true), 'DELETE', 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
var body = {
  'app': 1,
  'fields': [
    'Text__single_line_1',
    'Number'
  ],
  // 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/form/fields.json';
var xhr = new XMLHttpRequest();
xhr.open('DELETE', 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": "3"
}

Limitations

  • The following fields that are automatically populated when a record is created can be deleted from the form, but their data will not be deleted:

    • Record number
    • Created by
    • Updated by
    • Created datetime
    • Updated datetime
  • The following fields cannot be deleted:

    • Status
    • Assignee
    • Category