Database APIs

This is a general example of Deskree REST APIs. You can download it as a postman collection from the API Docs page of your project.

base_url is equal to https://YOUR_PROJECT_ID.api.deskree.com/api/v1/

Get list of all rows in TABLE_NAME

GET base_url/TABLE_NAME

Get data from the database table

Query Parameters

Headers

{
    "data": [
        {
            "uid": "iaijasdiadsi14in",
            "attributes": {
                "name": "T-Shirt",
                "price": 10,
                "category": {
                    "uid": "n10234b901489bwduih1dw91",
                    "name": "clothing"
                },
                "createdAt": "2022-08-22T16:04:49-04:00",
                "updatedAt": "2022-08-22T16:04:51-04:00"
            }
        }
    ],
    "meta": {
        "total": 1,
        "page": 1,
        "limit": 1,
        "includesCount": 1
    }
}

Get row by UID from TABLE_NAME

GET base_url/TABLE_NAME/ROW_UID

Get data from the database table by UID

Query Parameters

Headers

{
    "data": {
        "name": "T-Shirt",
        "price": 10,
        "category": {
            "uid": "n10234b901489bwduih1dw91",
            "name": "clothing"
        },
        "createdAt": "2022-08-22T16:04:49-04:00",
        "updatedAt": "2022-08-22T16:04:51-04:00"
    },
    "meta": {
        "total": 1,
        "page": 1,
        "limit": 1,
        "includesCount": 1
    }
}Get data from the database table by UID

Create a new row in TABLE_NAME

POST base_url/TABLE_NAME

Create an object in the database

Query Parameters

Headers

{
    "data": {
        "uid": "tTvKpi6E7N68Xv8RJOug"
        "name": "Hat",
        "price": 12,
        "image": "",
        "createdAt": "2022-08-22T16:04:49-04:00",
        "updatedAt": "2022-08-22T16:04:51-04:00"
    },
    "meta": {
        "total": 1,
        "page": 1,
        "limit": 1,
        "includesCount": 0
    },
    "info": {
        "action": "post",
        "webhooksTriggered": 0
    }
}

Update row by UID in TABLE_NAME

PATCH base_url/TABLE_NAME/ROW_UID

Query Parameters

Headers

{
    "data": {
        "uid": "tTvKpi6E7N68Xv8RJOug"
        "name": "Hat",
        "price": 12,
        "image": "",
        "createdAt": "2022-08-22T16:04:49-04:00",
        "updatedAt": "2022-08-22T16:04:51-04:00"
    },
    "meta": {
        "total": 1,
        "page": 1,
        "limit": 1,
        "includesCount": 0
    },
    "info": {
        "action": "patch",
        "webhooksTriggered": 0
    }
}

Delete row by UID in TABLE_NAME

DELETE base_url/TABLE_NAME/ROW_UID

Delete an object in the database. Note: If you delete an object the associated file will automatically be deleted in storage as well.

Headers

{
    "data": {
        "uid": "E9s6pTHnFdzilQ6rTD3Z",
        "resource": "tests"
    },
    "meta": {},
    "info": {
        "action": "delete",
        "webhooksTriggered": 0
    }
}

Where object

Note that UID cannot be used in the attribute field. If you want to get an item by UID, you can use the Get by UID endpoint instead.

GET Response Structure

Parameters

Database Object Parameters

Metadata Parameters

POST, PATCH, and DELETE Response Structure

Parameters

Metadata Parameters

Info Parameters

Helpful Resources

Last updated

Copyright © 2023 Deskree Technologies Inc.