Update object

Updating an object is actually saving over the old object.

To change an object, send a PUT request to the object URL. 

In the following example we will change the "car_year" of the Car with the id - kEG7VgTLul


In the Header we will add 3 parameters:

1. X-Parse-Application-Id: your application Id

2. X-Parse-Session-Token: your session token 

3. Content-Type: application/json 




In the body we will pass the JSON-encoded data.

Keys that are not specified will not change.




The response body we will get:

{

    "updatedAt": "2021-03-14T04:16:55.299Z",

    "objectId": "kEG7VgTLul"

}


Now we can go to the Database and check the record that we've changed.


Counters 

We can use a numeric field as a counter using the following JSON:


"car_year": {"__op":"Increment", "amount":"1"}             


Updating a pointer

In our example we will add a pointer called "car_color" pointing to "Colors" table.  

To update a pointer we need to pass the pointer in the following JSON:


"car_year": "2025","car_color": {"__type":"Pointer", "className":"Colors", "objectId":"zLs0Fsu7vT"}


About Simbla

Trying to create a website for their own business, Simbla's founders recognized, over the years, a lack of excellent, simple tools available on the market. Therefore, in 2013 Simbla was founded, for the purpose of providing a smart and easy website building solution for all types of businesses. Simbla's founders have more than 15 years of experience with web-based platforms and website building. We are helping SMB's to create a web presence and to evolve easily into a highly competitive market.

In our vision Simbla creates a new environment where websites are meant for everybody!

Social

all rights reserved to simbla inc

2016