Tables

Delete table rows

Deletes all rows matching the specified filter. Without any filter the request is rejected unless allowTruncate is set. Filters can be sent as a JSON body or, for backwards compatibility, as query string parameters.

Initial response returns job details JobResponse. The result of the asynchronous job can be fetched via /v2/storage/jobs/{id}. When the job completes, final result is DeleteRowsJobResult.

Parameters of job will be TableRowsDeleteJobParams.

delete/v2/storage/tables/{id}/rows

Request

Path parameters

idstring required

Table string id (e.g. in.c-main.orders).

Headers

contextstring nullable

Request body

changedSincestring nullable

Filtering by import date - the import timestamp is stored within each row. Accepts a unix timestamp or any date accepted by strtotime.

changedUntilstring nullable

Filtering by import date - the import timestamp is stored within each row. Accepts a unix timestamp or any date accepted by strtotime.

whereColumnstring nullable

Deprecated, use whereFilters instead. Column for deleting only matching rows.

whereValuesstring[] nullable

Deprecated, use whereFilters instead. Values for deleting only matching rows.

whereOperator'eq' | 'ne' nullable

Deprecated, use whereFilters instead. Operator for value comparison.

allowTruncateboolean

Confirms that you really want to delete all rows when no filter is specified.

Example request

{
  "changedSince": "-2 days",
  "changedUntil": "2013-02-12T15:19:21+00:00",
  "whereColumn": "id",
  "whereValues": [
    "12344"
  ],
  "whereFilters": [
    {
      "column": "id",
      "values": [
        "12344"
      ],
      "valuesByTableInWorkspace": {
        "workspaceId": 12345,
        "table": "ids_to_delete",
        "column": "id"
      }
    }
  ]
}

Response

Job accepted; returns job details.

idstring required

Job ID.

statusstring required

Current status of the job.

urlstring required

API detail URL for the job.

tableIdstring nullable required

ID of the table affected by the job.

operationNamestring required

Type of operation performed.

operationParamsobject required

Parameters for the operation.

createdTimestring date-time required

Job creation timestamp.

startTimestring date-time nullable required

Job start timestamp.

endTimestring date-time nullable required

Job end timestamp.

runIdstring nullable required

Run ID for the job.

Example response

{
  "id": "22077337",
  "status": "waiting",
  "url": "https://connection.keboola.com/v2/storage/jobs/22077337",
  "tableId": null,
  "operationName": "workspaceLoad",
  "operationParams": {
    "workspaceId": "78423",
    "preserve": false,
    "input": [
      {
        "source": "in.c-application-testing.cashier-data",
        "destination": "my-table"
      }
    ],
    "queue": "main_fast"
  },
  "createdTime": "2017-02-13T16:41:18+0100",
  "startTime": null,
  "endTime": null,
  "runId": null,
  "results": null,
  "creatorToken": {
    "id": "27978",
    "description": "john.doe@keboola.com"
  },
  "actor": {
    "type": "token",
    "id": "27978",
    "name": "john.doe@keboola.com",
    "adminId": 1234
  },
  "metrics": {
    "inCompressed": false,
    "inBytes": 0,
    "inBytesUncompressed": 0,
    "outCompressed": false,
    "outBytes": 0,
    "outBytesUncompressed": 0
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.