nb api resource destroy

Delete records from a selected resource. Use --filter-by-tk or --filter to locate records.

Usage

nb api resource destroy --resource <resource> [flags]

Parameters

ParameterTypeDescription
--resourcestringResource name, required
--data-sourcestringData source key, default main
--source-idstringSource record ID for association resources
--filter-by-tkstringPrimary key value; composite or multiple keys can be passed as a JSON array
--filterstringFilter conditions as a JSON object

Also supports common connection parameters from nb api resource.

Examples

nb api resource destroy --resource users --filter-by-tk 1
nb api resource destroy --resource posts --filter '{"status":"archived"}'