delete()

Description

Delete an object in the database

If you delete an object the associated file will automatically be deleted in storage as well

Request

Parameters

FieldRequiredData TypeDescription

uid

string

UID of the object to update

Examples

Delete

const product = await client.database().from('products').delete("tTvKpi6E7N68Xv8RJOug")

Response

Parameters

FieldData TypeDescription

data

Object

Object containing operation information

meta

Object

Empty object

info

Object

Object containing operation information

Delete Data Operation Information Parameters

FieldData TypeDescription

uid

string

UID of the deleted object

resource

string

Table name where object was deleted

Info Parameters

FieldData TypeDescription

action

string

Operation name

webhooksTriggered

number

Number of webhooks triggered by the operation

Example

This is an example response to the Delete request example above.

{
    "data": {
        "uid": "tTvKpi6E7N68Xv8RJOug",
        "resource": "products"
    },
    "meta": {},
    "info": {
        "action": "delete",
        "webhooksTriggered": 0
    }
}

Last updated

Copyright © 2023 Deskree Technologies Inc.