Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include more information about create and update response body #663

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion _includes/rest/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ The response body is a JSON object containing the `objectId` and the `createdAt`
}
```

The response body also includes any field that was modified using `beforeSave` and `afterSave` triggers.
TomWFox marked this conversation as resolved.
Show resolved Hide resolved

## Retrieving Objects

Once you've created an object, you can retrieve its contents by sending a GET request to the object URL returned in the location header. For example, to retrieve the object we created above:
Expand Down Expand Up @@ -223,14 +225,16 @@ print result
</code></pre>
</div>

The response body is a JSON object containing just an `updatedAt` field with the timestamp of the update.
The response body is a JSON object containing, by default, an `updatedAt` field with the timestamp of the update.

```json
{
"updatedAt": "2011-08-21T18:02:52.248Z"
}
```

The response body also includes any field that was modified using `beforeSave` and `afterSave` triggers.
TomWFox marked this conversation as resolved.
Show resolved Hide resolved

### Counters

To help with storing counter-type data, Parse provides the ability to atomically increment (or decrement) any number field. So, we can increment the score field like so:
Expand Down