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

Field
Required
Data Type
Description

uid

string

UID of the object to update

Examples

Delete

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

Response

Parameters

Field
Data Type
Description

data

Object

Object containing operation information

meta

Object

Empty object

info

Object

Object containing operation information

Delete Data Operation Information Parameters

Field
Data Type
Description

uid

string

UID of the deleted object

resource

string

Table name where object was deleted

Info Parameters

Field
Data Type
Description

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.