From 50d3f2b1e9a1c148d3c54a398d4c882fac7ab27e Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 6 Mar 2021 10:28:56 -0500 Subject: [PATCH 1/3] Update keys and excludeKeys to use arrays Supports changes made in pending [PR](https://github.com/parse-community/parse-server/pull/7242). Can see [here](https://github.com/parse-community/parse-server/issues/7245) for further discussion. --- _includes/rest/queries.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/rest/queries.md b/_includes/rest/queries.md index a2acbb84c..b93c9ba6f 100644 --- a/_includes/rest/queries.md +++ b/_includes/rest/queries.md @@ -412,7 +412,7 @@ 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`):

@@ -426,7 +426,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}",

From 738f63f31664766698bfabb928eed5084c8078a0 Mon Sep 17 00:00:00 2001
From: Corey 
Date: Sat, 6 Mar 2021 14:06:44 -0500
Subject: [PATCH 2/3] add server compatibility

---
 _includes/rest/queries.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/_includes/rest/queries.md b/_includes/rest/queries.md
index b93c9ba6f..85f0a634d 100644
--- a/_includes/rest/queries.md
+++ b/_includes/rest/queries.md
@@ -414,6 +414,8 @@ print result
 
 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 <=4.5.0 pass a comma-delimited string, e.g. `"score,playerName"` instead of an array for `keys` and `excludeKeys`.
+
 

 curl -X GET \

From 56afe820a0ce79cc211af82ae46e145451c51dce Mon Sep 17 00:00:00 2001
From: Corey 
Date: Thu, 25 Nov 2021 13:56:44 -0800
Subject: [PATCH 3/3] Update queries.md

---
 _includes/rest/queries.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_includes/rest/queries.md b/_includes/rest/queries.md
index 85f0a634d..12a4f1e4b 100644
--- a/_includes/rest/queries.md
+++ b/_includes/rest/queries.md
@@ -414,7 +414,7 @@ print result
 
 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 <=4.5.0 pass a comma-delimited string, e.g. `"score,playerName"` instead of an array for `keys` and `excludeKeys`.
+* On Parse Server <5.0.0 pass a comma-delimited string, e.g. `"score,playerName"` instead of an array for `keys` and `excludeKeys`.