From 99026f4e05752b24244cfd7a26ddfbc5650b76a0 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 13 Apr 2022 03:31:15 -0400 Subject: [PATCH] Update keys and excludeKeys to use arrays (#820) --- _includes/rest/queries.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_includes/rest/queries.md b/_includes/rest/queries.md index a2acbb84c..12a4f1e4b 100644 --- a/_includes/rest/queries.md +++ b/_includes/rest/queries.md @@ -412,7 +412,9 @@ print result -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`): +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`): + +* On Parse Server <5.0.0 pass a comma-delimited string, e.g. `"score,playerName"` instead of an array for `keys` and `excludeKeys`.

@@ -426,7 +428,7 @@ curl -X GET \
 

 import json,httplib,urllib
 connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
-params = urllib.urlencode({"keys":"score,playerName"})
+params = urllib.urlencode({"keys":"[score,playerName]"})
 connection.connect()
 connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
        "X-Parse-Application-Id": "${APPLICATION_ID}",