For any new created table, all the APIs to interact with it are auto-generated and become ready to use.
Two type of endpoints are created:
REST
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/
Note that the Users table is a special table and does not allow POST or DELETE requests since account creation/removal is handled by . For more information, view our .
If you receive 412 error, it means that an index needs to be created for your query. Deskree handles this process automatically. For more information, visit the page.
How to sort response results: what parameter to sort by
Must be used with sorted[param] parameter
sorted[how]
asc | desc
How to sort response results: ascending vs descending
Must be used with sorted[param] parameter
page
Number
Page number to navigate to if the response is paginated
limit
Number
Number of results per page if the response is paginated
Default: 50
includes
Array of string
An array of columns with one-to-one or one-to-many references that you would like to include in your response.
For one-to-one reference the value will be returned as an object containing the includes in place of the reference value.
For one-to-many reference the value will be returned as an array of objects containing the includes in place of the reference value.
Headers
Name
Type
Description
Authorization
Bearer
idToken of your user returned from any sign-up or a sign-in request from
{"errors": [ {"code":"500","title":"Internal Server Error","detail":"Error processing your request" } ]}
{"errors": [ {"code":"403","title":"Forbidden","detail":"Token is not valid" } ]}
Get row by UID from TABLE_NAME
GETbase_url/TABLE_NAME/ROW_UID
Get data from the database table by UID
Query Parameters
Name
Type
Description
includes
Array of strings
An array of columns with one-to-one or one-to-many references that you would like to include in your response.
For one-to-one reference the value will be returned as an object containing the includes in place of the reference value.
For one-to-many reference the value will be returned as an array of objects containing the includes in place of the reference value.
Headers
Name
Type
Description
Authorization
Bearer
YOUR_TOKEN
{"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
{"errors": [ {"code":"500","title":"Internal Server Error","detail":"Error processing your request" } ]}
{"errors": [ {"code":"403","title":"Forbidden","detail":"Token is not valid" } ]}
{"data":null,"errors": [ {"code":"404","title":"Not found","detail":"Requested object not found" } ]}
Create a new row in TABLE_NAME
POSTbase_url/TABLE_NAME
Create an object in the database
Query Parameters
Name
Type
Description
skipFileExceptions
Boolean
If set to true will skip file upload exceptions in the back end and will return 200 even if there is an error during downloading/uploading of files.
Total number of items in with the given UID
Always equal to 1
page
number
Current page number
Always equal to 1
limit
number
Current limit per page
Always equal to 1
includesCount
number
Number of additional requests for the includes operations
Always equal to 0
Info Parameters
Field
Data Type
Description
action
string
Operation name
webhooksTriggered
number
Number of webhooks triggered by the operation
GraphQL
GraphQL always uses the POST method and the same endpoint to make requests. Here, we are going to imagine we have a products table under a project, and we are going to create, read, update, and delete a product from this table using GraphQL.
The beauty of GraphQL is that you can fetch only the necessary information just by changing the query structure. Here's another example of how to fetch a single product by UID, and this time let's just fetch the name and price properties of it:
Now, let's update the previous product price, and return the product's uid, name, and price. To modify a product, we need to specify which product to update, and the new value we want to set. To do so, we can have a body mutation as follows:
Note that the Users table is a special table and does not allow Creation or Deletion directly via GraphQL requests since account creation/removal is handled by . For more information, view our .