Blog

How to Delete Objects with REST Console

by on September 19, 2019

How to Delete Objects with REST Console

Backendless provides a powerful and convenient tool for working with Backendless services through REST API (read all about our REST APIs in the documentation here). In case you need to quickly test a REST API’s functionality, another tool may come in handy for you – the Backendless REST Console.

The REST Console can be found by going into your Backendless Console, going to the Data section, and selecting the REST Console tab.

Now let’s take a look at how to use the Backendless REST Console to delete a data object. To do this, we need an objectId for the object that we want to delete. If you don’t already know an object’s ID that you want to delete, then you can find or create an object in the Data Browser.

So let’s see how it works.

Creating an Object

First, go to the Data section of your Backendless Console and create the “Table” table. (You can skip this step if you already have a table you’d like to use.)

Create a Table in Backendless Console

Then create an object. In this instance, it doesn’t matter what attributes the object has since we are just going to delete it. Backendless will automatically give the object an ID.

Create an Object in Backendless Data Browser

Created Object in Backendless Data Browser

Copy the objectId of the newly created object and go to the REST Console tab. In the ObjectId field, paste the copied objectId. Please note that the REST Console works in the context of the selected table.

Deleting an Object

Paste ObjectID in Backendless REST Console

Now we press the Delete button and the console executes the REST API for us. We receive the time of removal of our object in the Response Body.

Object Deleted Response in Backendless REST Console

We can then verify that the object was deleted by checking the Data Browser. You should see that the object with the ID we copied is no longer in the table.

That’s all there is to it. You can read more about the REST Console on the Backendless Database feature page.

Thanks for reading and Happy Coding!

Leave a Reply