Skip to content

Commit 99026f4

Browse files
authored
Update keys and excludeKeys to use arrays (parse-community#820)
1 parent c70c1b2 commit 99026f4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

_includes/rest/queries.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,9 @@ print result
412412
</code></pre>
413413
</div>
414414

415-
You can restrict the fields returned by passing `keys` or `excludeKeys` a comma-separated list. To retrieve documents that contain only the `score` and `playerName` fields (and also special built-in fields such as `objectId`, `createdAt`, and `updatedAt`):
415+
You can restrict the fields returned by passing `keys` or `excludeKeys` as an [array](#arrays). To retrieve documents that contain only the `score` and `playerName` fields (and also special built-in fields such as `objectId`, `createdAt`, and `updatedAt`):
416+
417+
* On Parse Server <5.0.0 pass a comma-delimited string, e.g. `"score,playerName"` instead of an array for `keys` and `excludeKeys`.
416418

417419
<div class="language-toggle">
418420
<pre><code class="bash">
@@ -426,7 +428,7 @@ curl -X GET \
426428
<pre><code class="python">
427429
import json,httplib,urllib
428430
connection = httplib.HTTPSConnection('<span class="custom-parse-server-url">YOUR.PARSE-SERVER.HERE</span>', 443)
429-
params = urllib.urlencode({"keys":"score,playerName"})
431+
params = urllib.urlencode({"keys":"[score,playerName]"})
430432
connection.connect()
431433
connection.request('GET', '<span class="custom-parse-server-mount">/parse/</span>classes/GameScore?%s' % params, '', {
432434
"X-Parse-Application-Id": "<span class="custom-parse-server-appid">${APPLICATION_ID}</span>",

0 commit comments

Comments
 (0)