Delete Data with the Command Line Tool
This article introduces how to delete data from Kintone using cli-kintone .
This section introduces the required Kintone Apps and settings.
Prepare Sample Apps
For this tutorial, a Kintone App with record data is needed. Feel free to use any created App. If there is no other app, use the Customer Database App or the Expense Report App made in the Export Data with the Command Line Tool article.
Set the API Token
Go to the App Settings, click API Token, and update the existing API Token created in the Export Data with the Command Line Tool article. Make sure to check the Delete Records option, and take note of the API token, as it is needed in the later steps.
Prepare Data as CSV
To delete specific records, specify the Record number to be deleted in the CSV file.
The first row of the CSV file must be a header, with the field code of the Record number field. The second row must contain either the record numbers to be deleted, or the App Code containing the record numbers to be deleted.
Records deleted with the
record delete command can not be recovered.
To delete records, specify the
record delete command.
In addition, specify the Kintone domain, App ID and API Token via the
--api-token options, and the CSV file via the
--base-url: The subdomain to retrieve records from. (ex: https://www.example.kintone.com )
--app: The App ID to retrieve records from. (ex: 123)
--api-token: API token copied from Initial Setup
--file-path: The file path of a CSV file with information to update or add records.
When the command is run, a message to confirm the deletion will be output.
To begin deletion, enter "Y" and submit via the
Enter key. In order to cancel the operation, input "N" instead.
-y option is passed with the command, the specified records will be deleted without confirmation.
Delete all records
To delete all records, run the command without passing the