diff --git a/_app/main.js b/_app/main.js
index e731e92d8..82705eb84 100644
--- a/_app/main.js
+++ b/_app/main.js
@@ -650,6 +650,9 @@ App.Views = {};
// deal with common-lang-blocks
this.toggleCommonLangBlocks();
+ // setup the server/mount path editor
+ this.setupServerFieldCustomization();
+
// add toggles to code blocks if necessary
if (this.platform === "ios" || this.platform === "osx" || this.platform === "macos") {
new App.Views.Docs.Toggle({
@@ -729,6 +732,123 @@ App.Views = {};
}
},
+ setupServerFieldCustomization: function setupServerFieldCustomization() {
+
+ if(!document.getElementById('parse-server-custom-url')) {
+ // no customization available on this page
+ return;
+ }
+
+ if (typeof(Storage) !== "undefined") {
+ // apply previous values from local storage
+ const _url = localStorage.getItem('parse-server-custom-url');
+ const _mount = localStorage.getItem('parse-server-custom-mount');
+ const _protocol = localStorage.getItem('parse-server-custom-protocol');
+ const _appId = localStorage.getItem('parse-server-custom-appid');
+ const _clientKey = localStorage.getItem('parse-server-custom-clientkey');
+
+ // set existing entries
+ if (_url) {
+ $(".custom-parse-server-url").html(_url);
+ $("#parse-server-custom-url").val(_url);
+ }
+ if (_mount) {
+ $(".custom-parse-server-mount").html(_mount);
+ $("#parse-server-custom-mount").val(_mount);
+ }
+ if (_protocol) {
+ $(".custom-parse-server-protocol").html(_protocol);
+ $("#parse-server-custom-protocol").val(_protocol);
+ }
+ if (_appId) {
+ $(".custom-parse-server-appid").html(_appId);
+ $("#parse-server-custom-appid").val(_appId);
+ }
+ if (_clientKey) {
+ $(".custom-parse-server-clientkey").html(_clientKey);
+ $("#parse-server-custom-clientkey").val(_clientKey);
+ }
+ }
+
+ // set url listener
+ $('#parse-server-custom-url').keyup(function() {
+ const url = $('#parse-server-custom-url').val();
+ if(!url.match(/^[-_a-z0-9\.]+(?::[0-9]+)?$/i)) {
+ // not a valid url
+ return;
+ }
+ $(".custom-parse-server-url").html(url);
+ if (typeof(Storage) !== "undefined") {
+ localStorage.setItem('parse-server-custom-url', url);
+ }
+ });
+
+ // set mount listener
+ $('#parse-server-custom-mount').keyup(function() {
+ var mount = $('#parse-server-custom-mount').val();
+ if(!mount.match(/^[-_a-z0-9\/]+$/i) && mount !== '') {
+ // not a valid mount path, and not empty
+ return;
+ }
+ if(!mount.match(/^\//)) {
+ // add leading slash
+ mount = '/'+mount;
+ }
+ if(!mount.match(/\/$/)) {
+ // add trailing slash
+ mount = mount+'/';
+ }
+ $(".custom-parse-server-mount").html(mount);
+ if (typeof(Storage) !== "undefined") {
+ localStorage.setItem('parse-server-custom-mount', mount);
+ }
+ });
+
+ // set protocol listener
+ $('#parse-server-custom-protocol').change(function() {
+ const protocol = $('#parse-server-custom-protocol').val();
+ if(!protocol.match(/^[a-z]+$/)) {
+ // not a valid protocol
+ return;
+ }
+ $(".custom-parse-server-protocol").html(protocol);
+ if (typeof(Storage) !== "undefined") {
+ localStorage.setItem('parse-server-custom-protocol', protocol);
+ }
+ });
+
+ // set appId listener
+ $('#parse-server-custom-appid').keyup(function() {
+ var appId = $('#parse-server-custom-appid').val();
+ if(!appId.match(/^[^\s]+$/i)) {
+ // not a valid appId
+ return;
+ }
+ // encode any html
+ appId = appId.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"');
+ $(".custom-parse-server-appid").html(appId);
+ if (typeof(Storage) !== "undefined") {
+ localStorage.setItem('parse-server-custom-appid', appId);
+ }
+ });
+
+ // set clientKey listener
+ $('#parse-server-custom-clientkey').keyup(function() {
+ var clientKey = $('#parse-server-custom-clientkey').val();
+ if(!clientKey.match(/^[^\s]+$/i)) {
+ // not a valid appId
+ return;
+ }
+ // encode any html
+ clientKey = clientKey.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"');
+ $(".custom-parse-server-clientkey").html(clientKey);
+ if (typeof(Storage) !== "undefined") {
+ localStorage.setItem('parse-server-custom-clientkey', clientKey);
+ }
+ });
+
+ },
+
// we recalculate the header heights for the TOC
// highlighting when the height of the content changes
handleToggleChange: function() {
@@ -753,7 +873,7 @@ $('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
-var platform = window.location.pathname.split('/')[2];
+var platform = window.location.pathname.split('/')[1];
if (platform) {
new App.Views.Docs.Main({
language: 'en',
diff --git a/_includes/android/push-notifications.md b/_includes/android/push-notifications.md
index c3b348aa6..3b4592fd9 100644
--- a/_includes/android/push-notifications.md
+++ b/_includes/android/push-notifications.md
@@ -480,7 +480,7 @@ curl -X GET \
-G \
--data-urlencode 'limit=1000' \
--data-urlencode 'where={ "city": "San Francisco", "deviceType": { "$in": [ "ios", "android", "winphone", "embedded" ] } }' \
-https://api.parse.com/1/installations
+https://YOUR.PARSE-SERVER.HERE/parse/installations
```
If you type the above into a console, you should be able to see the first 1,000 objects that match your query. Note that constraints are always ANDed, so if you want to further reduce the search scope, you can add a constraint that matches the specific installation for your device:
@@ -493,7 +493,7 @@ curl -X GET \
-G \
--data-urlencode 'limit=1' \
--data-urlencode 'where={ “objectId”: {YOUR_INSTALLATION_OBJECT_ID}, "city": "San Francisco", "deviceType": { "$in": [ "ios", "android", "winphone", "embedded" ] } }' \
-https://api.parse.com/1/installations
+https://YOUR.PARSE-SERVER.HERE/parse/installations
```
If the above query returns no results, it is likely that your installation does not meet the targeting criteria for your campaign.
diff --git a/_includes/arduino/other.md b/_includes/arduino/other.md
index c34e16308..465b0ba46 100644
--- a/_includes/arduino/other.md
+++ b/_includes/arduino/other.md
@@ -5,7 +5,7 @@ Because the Arduino SDK was designed to minimize memory footprint, it doesn't pr
For example, you could sign up a user from Arduino through a REST call:
```cpp
-ParseResponse response = Parse.sendRequest("POST", "/1/users", "{\"username\":\"cooldude6\",\"password\":\"p_n7!-e8\"}", "");
+ParseResponse response = Parse.sendRequest("POST", "/parse/users", "{\"username\":\"cooldude6\",\"password\":\"p_n7!-e8\"}", "");
```
In this case, the response will contain the objectId of the created user, assuming it was created successfully.
diff --git a/_includes/arduino/requests.md b/_includes/arduino/requests.md
index de44dafba..5fd2aa1d3 100644
--- a/_includes/arduino/requests.md
+++ b/_includes/arduino/requests.md
@@ -5,7 +5,7 @@ Because the Arduino SDK was designed to minimize memory footprint, it doesn't pr
For example, you could sign up a user from Arduino through a REST call:
```cpp
-ParseResponse response = Parse.sendRequest("POST", "/1/users", "{\"username\":\"cooldude6\",\"password\":\"p_n7!-e8\"}", "");
+ParseResponse response = Parse.sendRequest("POST", "/parse/users", "{\"username\":\"cooldude6\",\"password\":\"p_n7!-e8\"}", "");
```
In this case, the response will contain the objectId of the created user, assuming it was created successfully.
diff --git a/_includes/cloudcode/cloud-code.md b/_includes/cloudcode/cloud-code.md
index 2a5b0a5a2..7399dc882 100644
--- a/_includes/cloudcode/cloud-code.md
+++ b/_includes/cloudcode/cloud-code.md
@@ -98,7 +98,7 @@ curl -X POST \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{ "movie": "The Matrix" }' \
- https://api.parse.com/1/functions/averageStars
+ https://YOUR.PARSE-SERVER.HERE/parse/functions/averageStars
```
And finally, to call the same function from a JavaScript app:
diff --git a/_includes/common/security.md b/_includes/common/security.md
index d56a13a56..93997a894 100644
--- a/_includes/common/security.md
+++ b/_includes/common/security.md
@@ -456,9 +456,9 @@ There are some special classes in Parse that don't follow all of the same securi
|Delete|normal behavior [5]|master key only [7]|
|Add Field|normal behavior|normal behavior|
-1. Logging in, or `/1/login` in the REST API, does not respect the Get CLP on the user class. Login works just based on username and password, and cannot be disabled using CLPs.
+1. Logging in, or `/parse/login` in the REST API, does not respect the Get CLP on the user class. Login works just based on username and password, and cannot be disabled using CLPs.
-2. Retrieving the current user, or becoming a User based on a session token, which are both `/1/users/me` in the REST API, do not respect the Get CLP on the user class.
+2. Retrieving the current user, or becoming a User based on a session token, which are both `/parse/users/me` in the REST API, do not respect the Get CLP on the user class.
3. Read ACLs do not apply to the logged in user. For example, if all users have ACLs with Read disabled, then doing a find query over users will still return the logged in user. However, if the Find CLP is disabled, then trying to perform a find on users will still return an error.
diff --git a/_includes/common/server-customize.md b/_includes/common/server-customize.md
new file mode 100644
index 000000000..ffa3a030d
--- /dev/null
+++ b/_includes/common/server-customize.md
@@ -0,0 +1,24 @@
+# Your Configuration
+
+
+Customize our docs with your server configuration.
+
+Protocol:
+
+Domain:
+
+Mount Path:
+
+App Id:
+
+Client Key:
+
+
+- serverUrl: https://YOUR.PARSE-SERVER.HERE/parse/
+- appId: APPLICATION_ID
+- clientKey: CLIENT_KEY
\ No newline at end of file
diff --git a/_includes/embedded_c/cloud-code.md b/_includes/embedded_c/cloud-code.md
index 34a4b9f5f..28733ca8c 100644
--- a/_includes/embedded_c/cloud-code.md
+++ b/_includes/embedded_c/cloud-code.md
@@ -20,5 +20,5 @@ void myCloudFunctionCallback(ParseClient client, int error, int httpStatus, cons
// httpResponseBody holds the Cloud Function response
}
}
-parseSendRequest(client, "POST", "/1/functions/hello", "{\"value\":\"echo\"}", myCloudFunctionCallback);
+parseSendRequest(client, "POST", "/parse/functions/hello", "{\"value\":\"echo\"}", myCloudFunctionCallback);
```
diff --git a/_includes/embedded_c/requests.md b/_includes/embedded_c/requests.md
index 86a865f72..aa6972e4a 100644
--- a/_includes/embedded_c/requests.md
+++ b/_includes/embedded_c/requests.md
@@ -3,7 +3,7 @@
The main way you'll be interacting with Parse is through the `parseSendRequest` function, which sends a request to the REST API. For example, here's how to save an object with some data:
```cpp
-char data[] = "{ \"temperature\": 165 }"; parseSendRequest(client, "POST", "/1/classes/Temperature", data, NULL);
+char data[] = "{ \"temperature\": 165 }"; parseSendRequest(client, "POST", "/parse/classes/Temperature", data, NULL);
```
For some requests you will be interested in data returned for the request. In such a case you need to setup a callback and pass it to `parseSendRequest`.
@@ -15,7 +15,7 @@ void mySaveCallback(ParseClient client, int error, int httpStatus, const char* h
}
}
-parseSendRequest(client, "GET", "/1/classes/TestObject/gsMHOY3MAx", NULL, myCallback);
+parseSendRequest(client, "GET", "/parse/classes/TestObject/gsMHOY3MAx", NULL, myCallback);
```
Using this function, you have full access to the REST API to create objects, delete objects, send analytics events, and more. Take a look at the [REST API Guide]({{ site.baseUrl }}/rest/guide) to find out all the details.
diff --git a/_includes/ios/push-notifications.md b/_includes/ios/push-notifications.md
index 4ddc613fd..3a744cc4d 100644
--- a/_includes/ios/push-notifications.md
+++ b/_includes/ios/push-notifications.md
@@ -875,7 +875,7 @@ curl -X GET \
-G \
--data-urlencode 'limit=1000' \
--data-urlencode 'where={ "city": "San Francisco", "deviceType": { "$in": [ "ios", "android", "winphone", "embedded" ] } }' \
-https://api.parse.com/1/installations
+https://YOUR.PARSE-SERVER.HERE/parse/installations
If you type the above into a console, you should be able to see the first 1,000 objects that match your query. Note that constraints are always ANDed, so if you want to further reduce the search scope, you can add a constraint that matches the specific installation for your device:
@@ -888,7 +888,7 @@ curl -X GET \
-G \
--data-urlencode 'limit=1' \
--data-urlencode 'where={ “objectId”: {YOUR_INSTALLATION_OBJECT_ID}, "city": "San Francisco", "deviceType": { "$in": [ "ios", "android", "winphone", "embedded" ] } }' \
-https://api.parse.com/1/installations
+https://YOUR.PARSE-SERVER.HERE/parse/installations
If the above query returns no results, it is likely that your installation does not meet the targeting criteria for your campaign.
diff --git a/_includes/js/users.md b/_includes/js/users.md
index 0bb92c368..42afa0ad8 100644
--- a/_includes/js/users.md
+++ b/_includes/js/users.md
@@ -464,7 +464,7 @@ Parse then verifies that the provided `authData` is valid and checks to see if a
Status: 200 OK
-Location: https://api.parse.com/1/users/uMz0YZeAqc
+Location: https://YOUR.PARSE-SERVER.HERE/parse/users/uMz0YZeAqc
With a response body like:
@@ -492,7 +492,7 @@ If the user has never been linked with this account, you will instead receive a
Status: 201 Created
-Location: https://api.parse.com/1/users/uMz0YZeAqc
+Location: https://YOUR.PARSE-SERVER.HERE/parse/users/uMz0YZeAqc
The body of the response will contain the `objectId`, `createdAt`, `sessionToken`, and an automatically-generated unique `username`. For example:
diff --git a/_includes/rest/analytics.md b/_includes/rest/analytics.md
index 8e8980f45..117ca34f0 100644
--- a/_includes/rest/analytics.md
+++ b/_includes/rest/analytics.md
@@ -25,20 +25,20 @@ In the example below, the `at` parameter is optional. If omitted, the current se
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
}' \
- https://api.parse.com/1/events/AppOpened
+ https://YOUR.PARSE-SERVER.HERE/parse/events/AppOpened
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/events/AppOpened', json.dumps({
+connection.request('POST', '/parse/events/AppOpened', json.dumps({
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -57,7 +57,7 @@ Say your app offers search functionality for apartment listings, and you want to
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -67,20 +67,20 @@ curl -X POST \
"dayType": "weekday"
}
}' \
- https://api.parse.com/1/events/Search
+ https://YOUR.PARSE-SERVER.HERE/parse/events/Search
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/events/Search', json.dumps({
+connection.request('POST', '/parse/events/Search', json.dumps({
"dimensions": {
"priceRange": "1000-1500",
"source": "craigslist",
"dayType": "weekday"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -92,7 +92,7 @@ Parse Analytics can even be used as a lightweight error tracker — simply invok
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -100,18 +100,18 @@ curl -X POST \
"code": "404"
}
}' \
- https://api.parse.com/1/events/Error
+ https://YOUR.PARSE-SERVER.HERE/parse/events/Error
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/events/Error', json.dumps({
+connection.request('POST', '/parse/events/Error', json.dumps({
"dimensions": {
"code": "404"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -119,4 +119,4 @@ result = json.loads(connection.getresponse().read())
print result
-Note that Parse currently only stores the first eight dimension pairs per call to `/1/events/`.
+Note that Parse currently only stores the first eight dimension pairs per call to /parse/events/<eventName>
.
diff --git a/_includes/rest/cloud-code.md b/_includes/rest/cloud-code.md
index 4232d5b3c..843a34318 100644
--- a/_includes/rest/cloud-code.md
+++ b/_includes/rest/cloud-code.md
@@ -6,19 +6,19 @@ Cloud Functions can be called using the REST API. For example, to call the Cloud
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{}' \
- https://api.parse.com/1/functions/hello
+ https://YOUR.PARSE-SERVER.HERE/parse/functions/hello
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/functions/hello', json.dumps({
+connection.request('POST', '/parse/functions/hello', json.dumps({
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -36,20 +36,20 @@ Similarly, you can trigger a background job from the REST API. For example, to t
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"plan":"paid"}' \
- https://api.parse.com/1/jobs/userMigration
+ https://YOUR.PARSE-SERVER.HERE/parse/jobs/userMigration
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/jobs/userMigration', json.dumps({
+connection.request('POST', '/parse/jobs/userMigration', json.dumps({
"plan": "paid"
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
diff --git a/_includes/rest/config.md b/_includes/rest/config.md
index abf96fc03..ad19ce718 100644
--- a/_includes/rest/config.md
+++ b/_includes/rest/config.md
@@ -8,16 +8,16 @@ After that you will be able to fetch the config on the client by sending a `GET`
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
- https://api.parse.com/1/config
+ https://YOUR.PARSE-SERVER.HERE/parse/config
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/config', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/config', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -39,10 +39,10 @@ You can also update the config by sending a `PUT` request to config URL. Here is
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-d "{\"params\":{\"winningNumber\":43}}"
- https://api.parse.com/1/config
+ https://YOUR.PARSE-SERVER.HERE/parse/config
var request = require('request');
diff --git a/_includes/rest/files.md b/_includes/rest/files.md
index 027d5b83d..bdc956404 100644
--- a/_includes/rest/files.md
+++ b/_includes/rest/files.md
@@ -6,18 +6,18 @@ To upload a file to Parse, send a POST request to the files URL, postfixed with
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: text/plain" \
-d 'Hello, World!' \
- https://api.parse.com/1/files/hello.txt
+ https://YOUR.PARSE-SERVER.HERE/parse/files/hello.txt
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/files/hello.txt', 'Hello, World!', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('POST', '/parse/files/hello.txt', 'Hello, World!', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "text/plain"
})
@@ -45,18 +45,18 @@ To upload an image, the syntax is a little bit different. Here's an example that
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: image/jpeg" \
--data-binary '@myPicture.jpg' \
- https://api.parse.com/1/files/pic.jpg
+ https://YOUR.PARSE-SERVER.HERE/parse/files/pic.jpg
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/files/pic.jpg', open('myPicture.jpg', 'rb').read(), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('POST', '/parse/files/pic.jpg', open('myPicture.jpg', 'rb').read(), {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "image/jpeg"
})
@@ -70,7 +70,7 @@ After files are uploaded, you can associate them with Parse objects:
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -81,13 +81,13 @@ curl -X POST \
"__type": "File"
}
}' \
- https://api.parse.com/1/classes/PlayerProfile
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/PlayerProfile
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/classes/PlayerProfile', json.dumps({
+connection.request('POST', '/parse/classes/PlayerProfile', json.dumps({
"name": "Andrew",
"picture": {
"name": "...profile.png",
@@ -95,7 +95,7 @@ connection.request('POST', '/1/classes/PlayerProfile', json.dumps({
"__type": "File"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -112,16 +112,16 @@ Users holding the master key are allowed to delete files using the REST API. To
curl -X DELETE \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
- https://api.parse.com/1/files/...profile.png
+ https://YOUR.PARSE-SERVER.HERE/parse/files/...profile.png
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('DELETE', '/1/files/...profile.png', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('DELETE', '/parse/files/...profile.png', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}"
})
result = json.loads(connection.getresponse().read())
diff --git a/_includes/rest/geopoints.md b/_includes/rest/geopoints.md
index 57963e6cc..be51cf251 100644
--- a/_includes/rest/geopoints.md
+++ b/_includes/rest/geopoints.md
@@ -8,7 +8,7 @@ To associate a point with an object you will need to embed a `GeoPoint` data typ
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -18,20 +18,20 @@ curl -X POST \
"longitude": -30.0
}
}' \
- https://api.parse.com/1/classes/PlaceObject
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/PlaceObject
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/classes/PlaceObject', json.dumps({
+connection.request('POST', '/parse/classes/PlaceObject', json.dumps({
"location": {
"__type": "GeoPoint",
"latitude": 40.0,
"longitude": -30.0
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -45,7 +45,7 @@ Now that you have a bunch of objects with spatial coordinates, it would be nice
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'limit=10' \
@@ -58,11 +58,11 @@ curl -X GET \
}
}
}' \
- https://api.parse.com/1/classes/PlaceObject
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/PlaceObject
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"limit":10,"where":json.dumps({
"location": {
"$nearSphere": {
@@ -73,8 +73,8 @@ params = urllib.urlencode({"limit":10,"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/PlaceObject?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/PlaceObject?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -114,7 +114,7 @@ To limit the search to a maximum distance add a `$maxDistanceInMiles` (for miles
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={
@@ -127,11 +127,11 @@ curl -X GET \
"$maxDistanceInMiles": 10.0
}
}' \
- https://api.parse.com/1/classes/PlaceObject
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/PlaceObject
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"location": {
"$nearSphere": {
@@ -143,8 +143,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/PlaceObject?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/PlaceObject?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -155,7 +155,7 @@ It's also possible to query for the set of objects that are contained within a p
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={
@@ -176,11 +176,11 @@ curl -X GET \
}
}
}' \
- https://api.parse.com/1/classes/PizzaPlaceObject
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/PizzaPlaceObject
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"location": {
"$within": {
@@ -200,8 +200,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/PizzaPlaceObject?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/PizzaPlaceObject?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
diff --git a/_includes/rest/hooks.md b/_includes/rest/hooks.md
index 11c96d5df..a68403764 100644
--- a/_includes/rest/hooks.md
+++ b/_includes/rest/hooks.md
@@ -53,17 +53,17 @@ To fetch the list of all cloud functions you deployed or created, use:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
- https://api.parse.com/1/hooks/functions
+ https://YOUR.PARSE-SERVER.HERE/parse/hooks/functions
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/hooks/functions', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/hooks/functions', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -87,17 +87,17 @@ To fetch a single cloud function with a given name, use:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
- https://api.parse.com/1/hooks/functions/sendMessage
+ https://YOUR.PARSE-SERVER.HERE/parse/hooks/functions/sendMessage
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/hooks/functions/sendMessage', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/hooks/functions/sendMessage', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -120,17 +120,17 @@ The output is a json object with one key: "results" whose value is a list of clo
To fetch the list of all cloud triggers you deployed or created, use:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
- https://api.parse.com/1/hooks/triggers
+ https://YOUR.PARSE-SERVER.HERE/parse/hooks/triggers
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/hooks/triggers', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/hooks/triggers', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -161,17 +161,17 @@ The output is a json object with one key: "results" whose value is a list of clo
To fetch a single cloud trigger, use:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
- https://api.parse.com/1/hooks/triggers/Scores/beforeSave
+ https://YOUR.PARSE-SERVER.HERE/parse/hooks/triggers/Scores/beforeSave
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/hooks/triggers/Scores/beforeSave', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/hooks/triggers/Scores/beforeSave', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -204,29 +204,30 @@ To create cloud code functions or cloud code triggers you can modify your cloud
and perform a `parse deploy` the usual way.
## Create function webhook
-To create a new function webhook post to `/1/hooks/functions` with payload in the format
-
+To create a new function webhook post to /parse/hooks/functions
with payload in the format
+
+```json
{"functionName" : x, "url" : y}
-
+```
Post example,
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"functionName":"baz","url":"https://api.example.com/baz"}' \
- https://api.parse.com/1/hooks/functions
+ https://YOUR.PARSE-SERVER.HERE/parse/hooks/functions
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/hooks/functions', json.dumps(
+connection.request('POST', '/parse/hooks/functions', json.dumps(
{"functionName":"baz","url":"https://api.example.com/baz"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -246,20 +247,20 @@ If you try to create a function webhook and a cloud code function with the same
For example,
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"functionName":"bar","url":"https://api.example.com/bar"}' \
- https://api.parse.com/1/hooks/functions
+ https://YOUR.PARSE-SERVER.HERE/parse/hooks/functions
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/hooks/functions', json.dumps(
+connection.request('POST', '/parse/hooks/functions', json.dumps(
{"functionName":"bar","url":"https://api.example.com/bar"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -277,7 +278,7 @@ The output may look like this:
## Create trigger webhook
-To create a new function webhook post to `/1/hooks/triggers` with payload in the format
+To create a new function webhook post to /parse/hooks/triggers
with payload in the format
{"className": x, "triggerName": y, "url": z}
@@ -288,20 +289,20 @@ To create a new function webhook post to `/1/hooks/triggers` with payload in the
Post example,
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"className": "Game", "triggerName": "beforeSave", "url": "https://api.example.com/Game/beforeSave"}' \
-https://api.parse.com/1/hooks/triggers
+https://YOUR.PARSE-SERVER.HERE/parse/hooks/triggers
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/hooks/triggers', json.dumps(
+connection.request('POST', '/parse/hooks/triggers', json.dumps(
{"className": "Game", "triggerName": "beforeSave", "url": "https://api.example.com/Game/beforeSave"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -325,20 +326,20 @@ If you try to create a trigger webhook and a cloud code trigger with the same na
For example,
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"className": "Tournament", "triggerName": "beforeDelete", "url": "https://api.example.com/Scores/beforeDelete"}' \
-https://api.parse.com/1/hooks/triggers
+https://YOUR.PARSE-SERVER.HERE/parse/hooks/triggers
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/hooks/triggers', json.dumps(
+connection.request('POST', '/parse/hooks/triggers', json.dumps(
{"className": "Tournament", "triggerName": "beforeDelete", "url": "https://api.example.com/Scores/beforeDelete"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -362,20 +363,20 @@ To edit the url of a function webhook that was already created use the put metho
Put example,
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"url":"https://api.example.com/_baz"}' \
- https://api.parse.com/1/hooks/functions/baz
+ https://YOUR.PARSE-SERVER.HERE/parse/hooks/functions/baz
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/hooks/functions/baz', json.dumps(
+connection.request('PUT', '/parse/hooks/functions/baz', json.dumps(
{"url":"https://api.example.com/_baz"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -395,20 +396,20 @@ If you try to update a function webhook and a cloud code function with the same
For example,
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"url":"https://api.example.com/_bar"}' \
- https://api.parse.com/1/hooks/functions/bar
+ https://YOUR.PARSE-SERVER.HERE/parse/hooks/functions/bar
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/hooks/functions/bar', json.dumps(
+connection.request('PUT', '/parse/hooks/functions/bar', json.dumps(
{"url":"https://api.example.com/_bar"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -430,20 +431,20 @@ To edit the url of a trigger webhook that was already crated use the put method.
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"url": "https://api.example.com/Game/_beforeSave"}' \
-https://api.parse.com/1/hooks/triggers/Game/beforeSave
+https://YOUR.PARSE-SERVER.HERE/parse/hooks/triggers/Game/beforeSave
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/hooks/triggers/Game/beforeSave', json.dumps(
+connection.request('PUT', '/parse/hooks/triggers/Game/beforeSave', json.dumps(
{"url": "https://api.example.com/Game/_beforeSave"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -467,20 +468,20 @@ If you try to update a trigger webhook and a cloud code trigger with the same na
For example,
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"url": "https://api.example.com/Scores/beforeDelete"}' \
-https://api.parse.com/1/hooks/triggers/Tournament/beforeDelete
+https://YOUR.PARSE-SERVER.HERE/parse/hooks/triggers/Tournament/beforeDelete
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/hooks/triggers/Tournament/beforeDelete', json.dumps(
+connection.request('PUT', '/parse/hooks/triggers/Tournament/beforeDelete', json.dumps(
{"url": "https://api.example.com/Scores/beforeDelete"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -503,20 +504,20 @@ To delete a function webhook use the put method.
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{"__op": "Delete"}' \
-https://api.parse.com/1/hooks/functions/foo
+https://YOUR.PARSE-SERVER.HERE/parse/hooks/functions/foo
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/hooks/functions/foo', json.dumps(
+connection.request('PUT', '/parse/hooks/functions/foo', json.dumps(
{"__op": "Delete"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -534,20 +535,20 @@ Since the overriding webhook was just deleted, this cloud code function will be
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{ "__op": "Delete" }' \
-https://api.parse.com/1/hooks/functions/sendMessage
+https://YOUR.PARSE-SERVER.HERE/parse/hooks/functions/sendMessage
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/hooks/functions/sendMessage', json.dumps(
+connection.request('PUT', '/parse/hooks/functions/sendMessage', json.dumps(
{"__op": "Delete"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -565,20 +566,20 @@ To delete a trigger webhook use the put method.
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{ "__op": "Delete" }' \
-https://api.parse.com/1/hooks/triggers/Game/beforeSave
+https://YOUR.PARSE-SERVER.HERE/parse/hooks/triggers/Game/beforeSave
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/hooks/triggers/Game/beforeSave', json.dumps(
+connection.request('PUT', '/parse/hooks/triggers/Game/beforeSave', json.dumps(
{"__op": "Delete"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -596,20 +597,20 @@ Since the overriding webhook was just deleted, this cloud code trigger will be r
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{ "__op": "Delete" }' \
-https://api.parse.com/1/hooks/triggers/Tournament/beforeDelete
+https://YOUR.PARSE-SERVER.HERE/parse/hooks/triggers/Tournament/beforeDelete
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/hooks/triggers/Tournament/beforeDelete', json.dumps(
+connection.request('PUT', '/parse/hooks/triggers/Tournament/beforeDelete', json.dumps(
{"__op": "Delete"}
), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
diff --git a/_includes/rest/objects.md b/_includes/rest/objects.md
index 963d9dcb3..c213dc577 100644
--- a/_includes/rest/objects.md
+++ b/_includes/rest/objects.md
@@ -36,19 +36,19 @@ When you retrieve objects from Parse, some fields are automatically added: `crea
In the REST API, the class-level operations operate on a resource based on just the class name. For example, if the class name is `GameScore`, the class URL is:
-https://api.parse.com/1/classes/GameScore
+https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
Users have a special class-level url:
-https://api.parse.com/1/users
+https://YOUR.PARSE-SERVER.HERE/parse/users
The operations specific to a single object are available a nested URL. For example, operations specific to the `GameScore` above with `objectId` equal to `Ed1nuqPvcm` would use the object URL:
-https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
@@ -58,23 +58,23 @@ To create a new object on Parse, send a POST request to the class URL containing
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/classes/GameScore', json.dumps({
+connection.request('POST', '/parse/classes/GameScore', json.dumps({
"score": 1337,
"playerName": "Sean Plott",
"cheatMode": False
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -86,7 +86,7 @@ When the creation is successful, the HTTP response is a `201 Created` and the `L
Status: 201 Created
-Location: https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+Location: https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
The response body is a JSON object containing the `objectId` and the `createdAt` timestamp of the newly-created object:
@@ -104,16 +104,16 @@ Once you've created an object, you can retrieve its contents by sending a GET re
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/classes/GameScore/Ed1nuqPvcm', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore/Ed1nuqPvcm', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -141,19 +141,19 @@ When retrieving objects that have pointers to children, you can fetch child obje
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'include=game' \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"include":"game"})
connection.connect()
-connection.request('GET', '/1/classes/GameScore/Ed1nuqPvcm?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore/Ed1nuqPvcm?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -166,20 +166,20 @@ To change the data on an object that already exists, send a PUT request to the o
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"score":73453}' \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
+connection.request('PUT', '/parse/classes/GameScore/Ed1nuqPvcm', json.dumps({
"score": 73453
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -201,23 +201,23 @@ To help with storing counter-type data, Parse provides the ability to atomically
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"score":{"__op":"Increment","amount":1}}' \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
+connection.request('PUT', '/parse/classes/GameScore/Ed1nuqPvcm', json.dumps({
"score": {
"__op": "Increment",
"amount": 1
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -229,23 +229,23 @@ To decrement the counter, use the `Increment` operator with a negative number:
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"score":{"__op":"Increment","amount":-1}}' \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
+connection.request('PUT', '/parse/classes/GameScore/Ed1nuqPvcm', json.dumps({
"score": {
"__op": "Increment",
"amount": -1
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -265,17 +265,17 @@ Each method takes an array of objects to add or remove in the "objects" key. For
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"skills":{"__op":"AddUnique","objects":["flying","kungfu"]}}' \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
+connection.request('PUT', '/parse/classes/GameScore/Ed1nuqPvcm', json.dumps({
"skills": {
"__op": "AddUnique",
"objects": [
@@ -284,7 +284,7 @@ connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
]
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -298,17 +298,17 @@ print result
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"opponents":{"__op":"AddRelation","objects":[{"__type":"Pointer","className":"Player","objectId":"Vx4nudeWn"}]}}' \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
+connection.request('PUT', '/parse/classes/GameScore/Ed1nuqPvcm', json.dumps({
"opponents": {
"__op": "AddRelation",
"objects": [
@@ -320,7 +320,7 @@ connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
]
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -332,17 +332,17 @@ To remove an object from a relation, you can do:
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"opponents":{"__op":"RemoveRelation","objects":[{"__type":"Pointer","className":"Player","objectId":"Vx4nudeWn"}]}}' \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
+connection.request('PUT', '/parse/classes/GameScore/Ed1nuqPvcm', json.dumps({
"opponents": {
"__op": "RemoveRelation",
"objects": [
@@ -354,7 +354,7 @@ connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
]
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -368,16 +368,16 @@ To delete an object from the Parse Cloud, send a DELETE request to its object UR
curl -X DELETE \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('DELETE', '/1/classes/GameScore/Ed1nuqPvcm', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('DELETE', '/parse/classes/GameScore/Ed1nuqPvcm', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -388,22 +388,22 @@ You can delete a single field from an object by using the `Delete` operation:
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"opponents":{"__op":"Delete"}}' \
- https://api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/classes/GameScore/Ed1nuqPvcm', json.dumps({
+connection.request('PUT', '/parse/classes/GameScore/Ed1nuqPvcm', json.dumps({
"opponents": {
"__op": "Delete"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -419,14 +419,14 @@ Each command in a batch has `method`, `path`, and `body` parameters that specify
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{
"method": "POST",
- "path": "/1/classes/GameScore",
+ "path": "/parse/classes/GameScore",
"body": {
"score": 1337,
"playerName": "Sean Plott"
@@ -434,7 +434,7 @@ curl -X POST \
},
{
"method": "POST",
- "path": "/1/classes/GameScore",
+ "path": "/parse/classes/GameScore",
"body": {
"score": 1338,
"playerName": "ZeroCool"
@@ -442,17 +442,17 @@ curl -X POST \
}
]
}' \
- https://api.parse.com/1/batch
+ https://YOUR.PARSE-SERVER.HERE/parse/batch
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/batch', json.dumps({
+connection.request('POST', '/parse/batch', json.dumps({
"requests": [
{
"method": "POST",
- "path": "/1/classes/GameScore",
+ "path": "/parse/classes/GameScore",
"body": {
"score": 1337,
"playerName": "Sean Plott"
@@ -460,7 +460,7 @@ connection.request('POST', '/1/batch', json.dumps({
},
{
"method": "POST",
- "path": "/1/classes/GameScore",
+ "path": "/parse/classes/GameScore",
"body": {
"score": 1338,
"playerName": "ZeroCool"
@@ -468,7 +468,7 @@ connection.request('POST', '/1/batch', json.dumps({
}
]
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -502,46 +502,46 @@ Other commands that work in a batch are `update` and `delete`.
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{
"method": "PUT",
- "path": "/1/classes/GameScore/Ed1nuqPvcm",
+ "path": "/parse/classes/GameScore/Ed1nuqPvcm",
"body": {
"score": 999999
}
},
{
"method": "DELETE",
- "path": "/1/classes/GameScore/Cpl9lrueY5"
+ "path": "/parse/classes/GameScore/Cpl9lrueY5"
}
]
}' \
- https://api.parse.com/1/batch
+ https://YOUR.PARSE-SERVER.HERE/parse/batch
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/batch', json.dumps({
+connection.request('POST', '/parse/batch', json.dumps({
"requests": [
{
"method": "PUT",
- "path": "/1/classes/GameScore/Ed1nuqPvcm",
+ "path": "/parse/classes/GameScore/Ed1nuqPvcm",
"body": {
"score": 999999
}
},
{
"method": "DELETE",
- "path": "/1/classes/GameScore/Cpl9lrueY5"
+ "path": "/parse/classes/GameScore/Cpl9lrueY5"
}
]
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -579,15 +579,15 @@ Dates are useful in combination with the built-in `createdAt` and `updatedAt` fi
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"createdAt":{"$gte":{"__type":"Date","iso":"2011-08-21T18:02:52.249Z"}}}' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"createdAt": {
"$gte": {
@@ -597,8 +597,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
diff --git a/_includes/rest/push-notifications.md b/_includes/rest/push-notifications.md
index a8d73a8da..a2d3fe869 100644
--- a/_includes/rest/push-notifications.md
+++ b/_includes/rest/push-notifications.md
@@ -30,7 +30,7 @@ Creating an installation object is similar to creating a generic object, but the
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -40,20 +40,20 @@ curl -X POST \
""
]
}' \
- https://api.parse.com/1/installations
+ https://YOUR.PARSE-SERVER.HERE/parse/installations
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/installations', json.dumps({
+connection.request('POST', '/parse/installations', json.dumps({
"deviceType": "ios",
"deviceToken": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"channels": [
""
]
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -65,7 +65,7 @@ When the creation is successful, the HTTP response is a `201 Created` and the `L
Status: 201 Created
-Location: https://api.parse.com/1/installations/mrmBZvsErB
+Location: https://YOUR.PARSE-SERVER.HERE/parse/installations/mrmBZvsErB
The response body is a JSON object containing the `objectId` and the `createdAt` timestamp of the newly-created installation:
@@ -88,7 +88,7 @@ You could create and object with these fields using a command like this:
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -100,13 +100,13 @@ curl -X POST \
""
]
}' \
- https://api.parse.com/1/installations
+ https://YOUR.PARSE-SERVER.HERE/parse/installations
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/installations', json.dumps({
+connection.request('POST', '/parse/installations', json.dumps({
"deviceType": "android",
"pushType": "gcm",
"deviceToken": "APA91bFMvbrGg4cp3KUV_7dhU1gmwE_...",
@@ -115,7 +115,7 @@ connection.request('POST', '/1/installations', json.dumps({
""
]
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -131,16 +131,16 @@ You can retrieve the contents of an installation object by sending a GET request
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
- https://api.parse.com/1/installations/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/installations/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/installations/mrmBZvsErB', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/installations/mrmBZvsErB', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -168,7 +168,7 @@ Installation objects can be updated by sending a PUT request to the installation
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -179,13 +179,13 @@ curl -X PUT \
"foo"
]
}' \
- https://api.parse.com/1/installations/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/installations/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/installations/mrmBZvsErB', json.dumps({
+connection.request('PUT', '/parse/installations/mrmBZvsErB', json.dumps({
"deviceType": "ios",
"deviceToken": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"channels": [
@@ -193,7 +193,7 @@ connection.request('PUT', '/1/installations/mrmBZvsErB', json.dumps({
"foo"
]
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -211,16 +211,16 @@ Without any URL parameters, a GET request simply lists installations:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
- https://api.parse.com/1/installations
+ https://YOUR.PARSE-SERVER.HERE/parse/installations
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/installations', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/installations', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -265,16 +265,16 @@ To delete an installation from the Parse Cloud, send a DELETE request to its URL
curl -X DELETE \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
- https://api.parse.com/1/installations/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/installations/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('DELETE', '/1/installations/mrmBZvsErB', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('DELETE', '/parse/installations/mrmBZvsErB', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -299,7 +299,7 @@ Subscribing to a channel via the REST API can be done by updating the `Installat
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -307,18 +307,18 @@ curl -X PUT \
"Giants"
]
}' \
- https://api.parse.com/1/installations/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/installations/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/installations/mrmBZvsErB', json.dumps({
+connection.request('PUT', '/parse/installations/mrmBZvsErB', json.dumps({
"channels": [
"Giants"
]
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -338,7 +338,7 @@ With the REST API, the following code can be used to alert all subscribers of th
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -350,13 +350,13 @@ curl -X POST \
"alert": "The Giants won against the Mets 2-3."
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"channels": [
"Giants",
"Mets"
@@ -365,7 +365,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "The Giants won against the Mets 2-3."
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -385,7 +385,7 @@ Storing arbitrary data on an `Installation` object is done in the same way we st
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -393,18 +393,18 @@ curl -X PUT \
"gameResults": true,
"injuryReports": true
}' \
- https://api.parse.com/1/installations/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/installations/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/installations/mrmBZvsErB', json.dumps({
+connection.request('PUT', '/parse/installations/mrmBZvsErB', json.dumps({
"scores": True,
"gameResults": True,
"injuryReports": True
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -416,7 +416,7 @@ You can even create relationships between your `Installation` objects and other
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -426,20 +426,20 @@ curl -X PUT \
"objectId": "vmRZXZ1Dvo"
}
}' \
- https://api.parse.com/1/installations/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/installations/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/installations/mrmBZvsErB', json.dumps({
+connection.request('PUT', '/parse/installations/mrmBZvsErB', json.dumps({
"user": {
"__type": "Pointer",
"className": "_User",
"objectId": "vmRZXZ1Dvo"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -453,7 +453,7 @@ Once you have your data stored on your `Installation` objects, you can use a que
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -464,13 +464,13 @@ curl -X POST \
"alert": "Willie Hayes injured by own pop fly."
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"where": {
"injuryReports": True
},
@@ -478,7 +478,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "Willie Hayes injured by own pop fly."
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -490,7 +490,7 @@ We can even use channels with our query. To send a push to all subscribers of th
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -502,13 +502,13 @@ curl -X POST \
"alert": "The Giants scored a run! The score is now 2-2."
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"where": {
"channels": "Giants",
"scores": True
@@ -517,7 +517,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "The Giants scored a run! The score is now 2-2."
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -529,7 +529,7 @@ If we store relationships to other objects in our `Installation` class, we can a
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -551,13 +551,13 @@ curl -X POST \
"alert": "Free hotdogs at the Parse concession stand!"
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"where": {
"user": {
"$inQuery": {
@@ -576,7 +576,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "Free hotdogs at the Parse concession stand!"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -606,7 +606,7 @@ For example, to send a notification that increases the current badge number by 1
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -620,13 +620,13 @@ curl -X POST \
"title": "Mets Score!"
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"channels": [
"Mets"
],
@@ -637,7 +637,7 @@ connection.request('POST', '/1/push', json.dumps({
"title": "Mets Score!"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -651,9 +651,9 @@ It is also possible to specify your own data in this dictionary. As explained in
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"channels": [
"Indians"
],
@@ -664,7 +664,7 @@ connection.request('POST', '/1/push', json.dumps({
"newsItem": "Man bites dog"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -680,7 +680,7 @@ There are two parameters provided by Parse to allow setting an expiration date f
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -689,19 +689,19 @@ curl -X POST \
"alert": "Season tickets on sale until March 19, 2015"
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"expiration_time": "2015-03-19T22:05:08Z",
"data": {
"alert": "Season tickets on sale until March 19, 2015"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -713,7 +713,7 @@ Alternatively, you can use the `expiration_interval` parameter to specify a dura
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -723,20 +723,20 @@ curl -X POST \
"alert": "Season tickets on sale until March 19, 2015"
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"push_time": "2015-03-13T22:05:08Z",
"expiration_interval": 518400,
"data": {
"alert": "Season tickets on sale until March 19, 2015"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -751,7 +751,7 @@ The following examples would send a different notification to Android, iOS, and
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -762,13 +762,13 @@ curl -X POST \
"alert": "Your suitcase has been filled with tiny robots!"
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"where": {
"deviceType": "android"
},
@@ -776,7 +776,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "Your suitcase has been filled with tiny robots!"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -786,7 +786,7 @@ print result
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -797,13 +797,13 @@ curl -X POST \
"alert": "Your suitcase has been filled with tiny apples!"
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"where": {
"deviceType": "ios"
},
@@ -811,7 +811,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "Your suitcase has been filled with tiny apples!"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -821,7 +821,7 @@ print result
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -832,13 +832,13 @@ curl -X POST \
"alert": "Your suitcase has been filled with tiny glass!"
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"where": {
"deviceType": "winrt"
},
@@ -846,7 +846,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "Your suitcase has been filled with tiny glass!"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -856,7 +856,7 @@ print result
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -867,13 +867,13 @@ curl -X POST \
"alert": "Your suitcase is very hip; very metro."
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"where": {
"deviceType": "winphone"
},
@@ -881,7 +881,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "Your suitcase is very hip; very metro."
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -895,7 +895,7 @@ You can schedule a push in advance by specifying a `push_time`. For example, if
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -907,13 +907,13 @@ curl -X POST \
"alert": "You previously created a reminder for the game today"
}
}' \
- https://api.parse.com/1/push
+ https://YOUR.PARSE-SERVER.HERE/parse/push
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/push', json.dumps({
+connection.request('POST', '/parse/push', json.dumps({
"where": {
"user_id": "user_123"
},
@@ -922,7 +922,7 @@ connection.request('POST', '/1/push', json.dumps({
"alert": "You previously created a reminder for the game today"
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
diff --git a/_includes/rest/queries.md b/_includes/rest/queries.md
index 5e7757aac..b15af9bb4 100644
--- a/_includes/rest/queries.md
+++ b/_includes/rest/queries.md
@@ -6,16 +6,16 @@ You can retrieve multiple objects at once by sending a GET request to the class
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/classes/GameScore', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -54,22 +54,22 @@ There are several ways to put constraints on the objects found, using the `where
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"playerName":"Sean Plott","cheatMode":false}' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"playerName": "Sean Plott",
"cheatMode": False
})})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -97,15 +97,15 @@ For example, to retrieve scores between 1000 and 3000, including the endpoints,
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"score":{"$gte":1000,"$lte":3000}}' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"score": {
"$gte": 1000,
@@ -113,8 +113,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -125,15 +125,15 @@ To retrieve scores equal to an odd number below 10, we could issue:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"score":{"$in":[1,3,5,7,9]}}' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"score": {
"$in": [
@@ -146,8 +146,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -158,7 +158,7 @@ To retrieve scores not by a given list of players we could issue:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={
@@ -170,11 +170,11 @@ curl -X GET \
]
}
}' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"playerName": {
"$nin": [
@@ -185,8 +185,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -197,23 +197,23 @@ To retrieve documents with the score set, we could issue:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"score":{"$exists":true}}' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"score": {
"$exists": True
}
})})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -224,23 +224,23 @@ To retrieve documents without the score set, we could issue:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"score":{"$exists":false}}' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"score": {
"$exists": False
}
})})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -251,15 +251,15 @@ If you have a class containing sports teams and you store a user's hometown in t
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"hometown":{"$select":{"query":{"className":"Team","where":{"winPct":{"$gt":0.5}}},"key":"city"}}}' \
- https://api.parse.com/1/classes/_User
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/_User
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"hometown": {
"$select": {
@@ -276,8 +276,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/_User?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/_User?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -298,19 +298,19 @@ You can use the `order` parameter to specify a field to sort by. Prefixing with
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'order=score' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"order":"score"})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -321,19 +321,19 @@ And to retrieve scores in descending order:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'order=-score' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"order":"-score"})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -344,19 +344,19 @@ You can sort by multiple fields by passing `order` a comma-separated list. To re
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'order=score,-name' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"order":"score,-name"})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -367,20 +367,20 @@ You can use the `limit` and `skip` parameters for pagination. `limit` defaults t
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'limit=200' \
--data-urlencode 'skip=400' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"limit":200,"skip":400})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -391,19 +391,19 @@ You can restrict the fields returned by passing `keys` a comma-separated list. T
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'keys=score,playerName' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"keys":"score,playerName"})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -414,7 +414,7 @@ All of these parameters can be used in combination with each other. For example:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={
@@ -430,11 +430,11 @@ curl -X GET \
--data-urlencode 'limit=200' \
--data-urlencode 'skip=400' \
--data-urlencode 'keys=score,playerName' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({
"where":json.dumps({
"playerName": {
@@ -450,8 +450,8 @@ params = urllib.urlencode({
"skip":400,
"keys":"score,playerName"})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -465,21 +465,21 @@ For keys with an array type, you can find objects where the key's array value co
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"arrayKey":2}' \
- https://api.parse.com/1/classes/RandomObject
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/RandomObject
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"arrayKey": 2
})})
connection.connect()
-connection.request('GET', '/1/classes/RandomObject?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/RandomObject?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -490,15 +490,15 @@ You can also use the `$all` operator to find objects with an array field which c
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"arrayKey":{"$all":[2,3,4]}}' \
- https://api.parse.com/1/classes/RandomObject
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/RandomObject
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"arrayKey": {
"$all": [
@@ -509,8 +509,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/RandomObject?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/RandomObject?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -528,24 +528,24 @@ Use the `$regex` operator to restrict to string values that match a regular expr
# Finds barbecue sauces that start with "Big Daddy"
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"name":{"$regex":"^Big Daddy"}}' \
- https://api.parse.com/1/classes/BarbecueSauce
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/BarbecueSauce
# Finds barbecue sauces that start with "Big Daddy"
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"name": {
"$regex": "^Big Daddy"
}
})})
connection.connect()
-connection.request('GET', '/1/classes/BarbecueSauce?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/BarbecueSauce?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -563,15 +563,15 @@ There are several ways to issue queries for relational data. If you want to retr
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"post":{"__type":"Pointer","className":"Post","objectId":"8TOXdXf3tz"}}' \
- https://api.parse.com/1/classes/Comment
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/Comment
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"post": {
"__type": "Pointer",
@@ -580,8 +580,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/Comment?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/Comment?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -592,15 +592,15 @@ If you want to retrieve objects where a field contains an object that matches an
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"post":{"$inQuery":{"where":{"image":{"$exists":true}},"className":"Post"}}}' \
- https://api.parse.com/1/classes/Comment
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/Comment
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"post": {
"$inQuery": {
@@ -614,8 +614,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/Comment?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/Comment?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -626,15 +626,15 @@ If you want to retrieve objects where a field contains an object that does not m
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"post":{"$notInQuery":{"where":{"image":{"$exists":true}},"className":"Post"}}}' \
- https://api.parse.com/1/classes/Comment
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/Comment
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"post": {
"$notInQuery": {
@@ -648,8 +648,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/classes/Comment?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/Comment?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -660,15 +660,15 @@ If you want to retrieve objects that are members of `Relation` field of a parent
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"$relatedTo":{"object":{"__type":"Pointer","className":"Post","objectId":"8TOXdXf3tz"},"key":"likes"}}' \
- https://api.parse.com/1/users
+ https://YOUR.PARSE-SERVER.HERE/parse/users
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"$relatedTo": {
"object": {
@@ -680,8 +680,8 @@ params = urllib.urlencode({"where":json.dumps({
}
})})
connection.connect()
-connection.request('GET', '/1/users?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/users?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -692,21 +692,21 @@ In some situations, you want to return multiple types of related objects in one
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'order=-createdAt' \
--data-urlencode 'limit=10' \
--data-urlencode 'include=post' \
- https://api.parse.com/1/classes/Comment
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/Comment
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"order":"-createdAt","limit":10,"include":"post"})
connection.connect()
-connection.request('GET', '/1/classes/Comment?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/Comment?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -740,21 +740,21 @@ You can also do multi level includes using dot notation. If you wanted to inclu
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'order=-createdAt' \
--data-urlencode 'limit=10' \
--data-urlencode 'include=post.author' \
- https://api.parse.com/1/classes/Comment
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/Comment
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"order":"-createdAt","limit":10,"include":"post.author"})
connection.connect()
-connection.request('GET', '/1/classes/Comment?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/Comment?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -772,23 +772,23 @@ If you are limiting your query, or if there are a very large number of results,
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"playerName":"Jonathan Walsh"}' \
--data-urlencode 'count=1' \
--data-urlencode 'limit=0' \
- https://api.parse.com/1/classes/GameScore
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"playerName": "Jonathan Walsh"
}),"count":1,"limit":0})
connection.connect()
-connection.request('GET', '/1/classes/GameScore?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/GameScore?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -812,15 +812,15 @@ With a nonzero limit, that request would return results as well as the count.
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"$or":[{"wins":{"$gt":150}},{"wins":{"$lt":5}}]}' \
- https://api.parse.com/1/classes/Player
+ https://YOUR.PARSE-SERVER.HERE/parse/classes/Player
import json,httplib,urllib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
params = urllib.urlencode({"where":json.dumps({
"$or": [
{
@@ -836,8 +836,8 @@ params = urllib.urlencode({"where":json.dumps({
]
})})
connection.connect()
-connection.request('GET', '/1/classes/Player?%s' % params, '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/classes/Player?%s' % params, '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
diff --git a/_includes/rest/quick-reference.md b/_includes/rest/quick-reference.md
index de852010a..a711f59aa 100644
--- a/_includes/rest/quick-reference.md
+++ b/_includes/rest/quick-reference.md
@@ -1,126 +1,132 @@
# Quick Reference
-All API access is over HTTPS, and accessed via the `https://api.parse.com` domain. The relative path prefix `/1/` indicates that we are currently using version 1 of the API.
+For your convenience you can customize [your configuration](#your-configuration) to change the default server url, mount path and additional values to match your personal setup.
+
+All API access is provided via the domain to your parse server instance. In cases where a domain is used to access the API we will reference `YOUR.PARSE-SERVER.HERE`{: .custom-parse-server-url}, which should be set to your domain in [your configuration](#your-configuration).
+
+The relative path prefix `/parse/` is the default mount path for most installations. If you are using a different mount path be sure to change this to accommodate for your instance. If you are using a hosted service this may be something other than the expected `/parse/`, be sure to check before you proceed. For the following examples we will be using `/parse/`{: .custom-parse-server-mount}, which can be set in [your configuration](#your-configuration).
+
+API access can be provided over **HTTPS** and **HTTP**. We recommend utilizing **HTTPS** for anything other than local development. If you are using a hosted service you will almost certainly be accessing your API exclusively over **HTTPS**.
## Objects API
| URL | HTTP Verb | Functionality |
|-------------------------------------|-----------|----------------------------------------------------|
-| `/1/classes/` | POST | [Creating Objects](#creating-objects) |
-| `/1/classes//` | GET | [Retrieving Objects](#retrieving-objects) |
-| `/1/classes//` | PUT | [Updating Objects](#updating-objects) |
-| `/1/classes/` | GET | [Queries](#queries) |
-| `/1/classes//` | DELETE | [Deleting Objects](#deleting-objects) |
+| /parse/classes/<className>
| POST | [Creating Objects](#creating-objects) |
+| /parse/classes/<className>/<objectId>
| GET | [Retrieving Objects](#retrieving-objects) |
+| /parse/classes/<className>/<objectId>
| PUT | [Updating Objects](#updating-objects) |
+| /parse/classes/<className>
| GET | [Queries](#queries) |
+| /parse/classes/<className>/<objectId>
| DELETE | [Deleting Objects](#deleting-objects) |
{: .docs_table}
## Users API
| URL | HTTP Verb | Functionality |
|---------------------------|-----------|--------------------------------------------------------------------|
-| `/1/users` | POST | [Signing Up](#signing-up)
[Linking Users](#linking-users) |
-| `/1/login` | GET | [Logging In](#logging-in) |
-| `/1/logout` | POST | [Logging Out](#deleting-sessions) |
-| `/1/users/` | GET | [Retrieving Users](#retrieving-users) |
-| `/1/users/me` | GET | [Validating Session Tokens](#validating-session-tokens--retrieving-current-user)
[Retrieving Current User](#retrieving-users) |
-| `/1/users/` | PUT | [Updating Users](#updating-users)
[Linking Users](#linking-users)
[Verifying Emails](#verifying-emails) |
-| `/1/users` | GET | [Querying Users](#querying) |
-| `/1/users/` | DELETE | [Deleting Users](#deleting-users) |
-| `/1/requestPasswordReset` | POST | [Requesting A Password Reset](#requesting-a-password-reset) |
+| /parse/users
| POST | [Signing Up](#signing-up)
[Linking Users](#linking-users) |
+| /parse/login
| GET | [Logging In](#logging-in) |
+| /parse/logout
| POST | [Logging Out](#deleting-sessions) |
+| /parse/users/<objectId>
| GET | [Retrieving Users](#retrieving-users) |
+| /parse/users/me
| GET | [Validating Session Tokens](#validating-session-tokens--retrieving-current-user)
[Retrieving Current User](#retrieving-users) |
+| /parse/users/<objectId>
| PUT | [Updating Users](#updating-users)
[Linking Users](#linking-users)
[Verifying Emails](#verifying-emails) |
+| /parse/users
| GET | [Querying Users](#querying) |
+| /parse/users/<objectId>
| DELETE | [Deleting Users](#deleting-users) |
+| /parse/requestPasswordReset
| POST | [Requesting A Password Reset](#requesting-a-password-reset) |
{: .docs_table}
## Sessions API
| URL | HTTP Verb |Functionality |
|---------------------------|-----------|--------------------------------------------|
-| `/1/sessions` | POST | [Creating Restricted Sessions](#creating-sessions) |
-| `/1/sessions/` | GET | [Retrieving Sessions](#retrieving-sessions) |
-| `/1/sessions/me` | GET | [Retrieving Current Session](#retrieving-sessions) |
-| `/1/sessions/` | PUT | [Updating Sessions](#updating-sessions) |
-| `/1/sessions` | GET | [Querying Sessions](#querying-sessions) |
-| `/1/sessions/` | DELETE | [Deleting Sessions](#deleting-sessions) |
-| `/1/sessions/me` | PUT | [Pairing with Installation](#pairing-session-with-installation) |
+| /parse/sessions
| POST | [Creating Restricted Sessions](#creating-sessions) |
+| /parse/sessions/<objectId>
| GET | [Retrieving Sessions](#retrieving-sessions) |
+| /parse/sessions/me
| GET | [Retrieving Current Session](#retrieving-sessions) |
+| /parse/sessions/<objectId>
| PUT | [Updating Sessions](#updating-sessions) |
+| /parse/sessions
| GET | [Querying Sessions](#querying-sessions) |
+| /parse/sessions/<objectId>
| DELETE | [Deleting Sessions](#deleting-sessions) |
+| /parse/sessions/me
| PUT | [Pairing with Installation](#pairing-session-with-installation) |
{: .docs_table}
## Roles API
| URL | HTTP Verb | Functionality |
|-----------------------|-----------|---------------------------------------------|
-| `/1/roles` | POST | [Creating Roles](#creating-roles) |
-| `/1/roles/` | GET | [Retrieving Roles](#retrieving-roles) |
-| `/1/roles/` | PUT | [Updating Roles](#updating-roles) |
-| `/1/roles/` | DELETE | [Deleting Roles](#deleting-roles) |
+| /parse/roles
| POST | [Creating Roles](#creating-roles) |
+| /parse/roles/<objectId>
| GET | [Retrieving Roles](#retrieving-roles) |
+| /parse/roles/<objectId>
| PUT | [Updating Roles](#updating-roles) |
+| /parse/roles/<objectId>
| DELETE | [Deleting Roles](#deleting-roles) |
{: .docs_table}
## Files API
| URL | HTTP Verb | Functionality |
|-----------------------|-----------|-------------------------------------------|
-| `/1/files/` | POST | [Uploading Files](#uploading-files) |
+| /parse/files/<fileName>
| POST | [Uploading Files](#uploading-files) |
{: .docs_table}
## Analytics API
| URL | HTTP Verb | Functionality |
|-------------------------|-----------|-------------------------------------------------|
-| `/1/events/AppOpened` | POST | [Analytics](#app-open-analytics) |
-| `/1/events/` | POST | [Custom Analytics](#custom-analytics) |
+| /parse/events/AppOpened
| POST | [Analytics](#app-open-analytics) |
+| /parse/events/<eventName>
| POST | [Custom Analytics](#custom-analytics) |
{: .docs_table}
## Push Notifications API
| URL | HTTP Verb | Functionality |
|-----------|-----------|------------------------------|
-| `/1/push` | POST | [Push Notifications](#push-notifications) |
+| /parse/push
| POST | [Push Notifications](#push-notifications) |
{: .docs_table}
## Installations API
| URL | HTTP Verb | Functionality |
|-------------------------------|-----------|----------------------------------------------------------|
-| `/1/installations` | POST | [Uploading Installation Data](#uploading-installation-data) |
-| `/1/installations/` | GET | [Retrieving Installations](#retrieving-installations) |
-| `/1/installations/` | PUT | [Updating Installations](#updating-installations) |
-| `/1/installations` | GET | [Querying Installations](#querying-installations) |
-| `/1/installations/` | DELETE | [Deleting Installations](#deleting-installations) |
+| /parse/installations
| POST | [Uploading Installation Data](#uploading-installation-data) |
+| /parse/installations/<objectId>
| GET | [Retrieving Installations](#retrieving-installations) |
+| /parse/installations/<objectId>
| PUT | [Updating Installations](#updating-installations) |
+| /parse/installations
| GET | [Querying Installations](#querying-installations) |
+| /parse/installations/<objectId>
| DELETE | [Deleting Installations](#deleting-installations) |
{: .docs_table}
## Cloud Functions API
| URL | HTTP Verb | Functionality |
|-----------------------|-----------|-----------------------------------------------------------|
-| `/1/functions/` | POST | [Calling Cloud Functions](#calling-cloud-functions) |
-| `/1/jobs/` | POST | [Triggering Background Jobs](#triggering-background-jobs) |
+| /parse/functions/<name>
| POST | [Calling Cloud Functions](#calling-cloud-functions) |
+| /parse/jobs/<name>
| POST | [Triggering Background Jobs](#triggering-background-jobs) |
{: .docs_table}
## Schemas API
| URL | HTTP Verb | Functionality |
|-------------------------|-----------|-----------------------------------------------------------|
-| `/1/schemas/` | GET | [Fetch All Schemas](#fetch-the-schema) |
-| `/1/schemas/`| GET | [Fetch Schema](#fetch-the-schema) |
-| `/1/schemas/`| POST | [Create Schema](#adding-a-schema) |
-| `/1/schemas/`| PUT | [Modify Schema](#modifying-the-schema) |
-| `/1/schemas/`| DELETE | [Delete Schema](#removing-a-schema) |
+| /parse/schemas/
| GET | [Fetch All Schemas](#fetch-the-schema) |
+| /parse/schemas/<className>
| GET | [Fetch Schema](#fetch-the-schema) |
+| /parse/schemas/<className>
| POST | [Create Schema](#adding-a-schema) |
+| /parse/schemas/<className>
| PUT | [Modify Schema](#modifying-the-schema) |
+| /parse/schemas/<className>
| DELETE | [Delete Schema](#removing-a-schema) |
{: .docs_table}
## Function Hooks API
| URL | HTTP Verb | Functionality |
|-------------------------------------|-----------|---------------------------------------------------------|
-| `/1/hooks/functions/` | GET | [Fetch Cloud Functions](#fetch-functions) |
-| `/1/hooks/functions/` | POST | [Create Cloud Function](#create-function-webhook) |
-| `/1/hooks/functions/` | PUT | [Edit Cloud Function](#edit-function-webhook) |
-| `/1/hooks/functions/` | DELETE | [Delete Cloud Function](#delete-function-webhook) |
+| /parse/hooks/functions/<functionName>
| GET | [Fetch Cloud Functions](#fetch-functions) |
+| /parse/hooks/functions/
| POST | [Create Cloud Function](#create-function-webhook) |
+| /parse/hooks/functions/<functionName>
| PUT | [Edit Cloud Function](#edit-function-webhook) |
+| /parse/hooks/functions/<functionName>
| DELETE | [Delete Cloud Function](#delete-function-webhook) |
{: .docs_table}
## Trigger Hooks API
| URL | HTTP Verb | Functionality |
|-----------------------------------------------|-----------|---------------------------------------------------------|
-| `/1/hooks/triggers//` | GET | [Fetch Cloud Trigger](#fetch-triggers) |
-| `/1/hooks/triggers/` | POST | [Create Cloud Trigger](#create-trigger-webhook) |
-| `/1/hooks/triggers//` | PUT | [Edit Cloud Trigger](#edit-trigger-webhook) |
-| `/1/hooks/triggers//` | DELETE | [Delete Cloud Trigger](#delete-trigger-webhook) |
+| /parse/hooks/triggers/<className>/<triggerName>
| GET | [Fetch Cloud Trigger](#fetch-triggers) |
+| /parse/hooks/triggers/
| POST | [Create Cloud Trigger](#create-trigger-webhook) |
+| /parse/hooks/triggers/<className>/<triggerName>
| PUT | [Edit Cloud Trigger](#edit-trigger-webhook) |
+| /parse/hooks/triggers/<className>/<triggerName>
| DELETE | [Delete Cloud Trigger](#delete-trigger-webhook) |
{: .docs_table}
## Request Format
@@ -134,7 +140,7 @@ In the examples that follow, the keys for your app are included in the command.
You may also authenticate your REST API requests using basic HTTP authentication. For example, to retrieve an object you could set the URL using your Parse credentials in the following format:
-https://myAppID:javascript-key=myJavaScriptKey@api.parse.com/1/classes/GameScore/Ed1nuqPvcm
+https://myAppID:javascript-key=myJavaScriptKey@YOUR.PARSE-SERVER.HERE/parse/classes/GameScore/Ed1nuqPvcm
For JavaScript usage, the Parse Cloud supports [cross-origin resource sharing](http://en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing), so that you can use these headers in conjunction with XMLHttpRequest.
diff --git a/_includes/rest/roles.md b/_includes/rest/roles.md
index 0e7d813a9..852e9b422 100644
--- a/_includes/rest/roles.md
+++ b/_includes/rest/roles.md
@@ -20,7 +20,7 @@ To create a new role, send a POST request to the roles root:
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -31,13 +31,13 @@ curl -X POST \
}
}
}' \
- https://api.parse.com/1/roles
+ https://YOUR.PARSE-SERVER.HERE/parse/roles
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/roles', json.dumps({
+connection.request('POST', '/parse/roles', json.dumps({
"name": "Moderators",
"ACL": {
"*": {
@@ -45,7 +45,7 @@ connection.request('POST', '/1/roles', json.dumps({
}
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -57,7 +57,7 @@ You can create a role with child roles or users by adding existing objects to th
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -88,13 +88,13 @@ curl -X POST \
]
}
}' \
- https://api.parse.com/1/roles
+ https://YOUR.PARSE-SERVER.HERE/parse/roles
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/roles', json.dumps({
+connection.request('POST', '/parse/roles', json.dumps({
"name": "Moderators",
"ACL": {
"*": {
@@ -122,7 +122,7 @@ connection.request('POST', '/1/roles', json.dumps({
]
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"Content-Type": "application/json"
})
@@ -134,7 +134,7 @@ When the creation is successful, the HTTP response is a `201 Created` and the Lo
Status: 201 Created
-Location: https://api.parse.com/1/roles/mrmBZvsErB
+Location: https://YOUR.PARSE-SERVER.HERE/parse/roles/mrmBZvsErB
The response body is a JSON object containing the `objectId` and `createdAt` timestamp of the newly-created object:
@@ -152,16 +152,16 @@ You can also retrieve the contents of a role object by sending a GET request to
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
- https://api.parse.com/1/roles/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/roles/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/roles/mrmBZvsErB', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/roles/mrmBZvsErB', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -198,7 +198,7 @@ For example, we can add two users to the "Moderators" role created above like so
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -218,13 +218,13 @@ curl -X PUT \
]
}
}' \
- https://api.parse.com/1/roles/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/roles/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/roles/mrmBZvsErB', json.dumps({
+connection.request('PUT', '/parse/roles/mrmBZvsErB', json.dumps({
"users": {
"__op": "AddRelation",
"objects": [
@@ -241,7 +241,7 @@ connection.request('PUT', '/1/roles/mrmBZvsErB', json.dumps({
]
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -253,7 +253,7 @@ Similarly, we can remove a child role from the "Moderators" role created above l
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -268,13 +268,13 @@ curl -X PUT \
]
}
}' \
- https://api.parse.com/1/roles/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/roles/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/roles/mrmBZvsErB', json.dumps({
+connection.request('PUT', '/parse/roles/mrmBZvsErB', json.dumps({
"roles": {
"__op": "RemoveRelation",
"objects": [
@@ -286,7 +286,7 @@ connection.request('PUT', '/1/roles/mrmBZvsErB', json.dumps({
]
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -303,16 +303,16 @@ To delete a role from the Parse Cloud, send a DELETE request to its URL. For ex
curl -X DELETE \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
- https://api.parse.com/1/roles/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/roles/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('DELETE', '/1/roles/mrmBZvsErB', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('DELETE', '/parse/roles/mrmBZvsErB', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}"
})
result = json.loads(connection.getresponse().read())
@@ -323,17 +323,17 @@ Again, we pass the master key in order to bypass the ACL on the role itself. Al
curl -X DELETE \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "X-Parse-Session-Token: pnktnjyb996sj4p156gjtp4im" \
- https://api.parse.com/1/roles/mrmBZvsErB
+ https://YOUR.PARSE-SERVER.HERE/parse/roles/mrmBZvsErB
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('DELETE', '/1/roles/mrmBZvsErB', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('DELETE', '/parse/roles/mrmBZvsErB', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"X-Parse-Session-Token": "pnktnjyb996sj4p156gjtp4im"
})
@@ -373,7 +373,7 @@ These types of relationships are commonly found in applications with user-manage
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '{
@@ -383,30 +383,30 @@ curl -X PUT \
{
"__type": "Pointer",
"className": "_Role",
- "objectId": ""
+ "objectId": "<AdministratorsRoleObjectId>"
}
]
}
}' \
- https://api.parse.com/1/roles/
+ https://YOUR.PARSE-SERVER.HERE/parse/roles/<ModeratorsRoleObjectId>
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/roles/', json.dumps({
+connection.request('PUT', '/parse/roles/<ModeratorsRoleObjectId>', json.dumps({
"roles": {
"__op": "AddRelation",
"objects": [
{
"__type": "Pointer",
"className": "_Role",
- "objectId": ""
+ "objectId": "<AdministratorsRoleObjectId>"
}
]
}
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
diff --git a/_includes/rest/schemas.md b/_includes/rest/schemas.md
index 9516d755d..3bf219259 100644
--- a/_includes/rest/schemas.md
+++ b/_includes/rest/schemas.md
@@ -17,17 +17,17 @@ as strings in object representation. This is a special case for the Parse API.
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
- https://api.parse.com/1/schemas
+ https://YOUR.PARSE-SERVER.HERE/parse/schemas
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/schemas', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/schemas', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -72,17 +72,17 @@ To fetch schema of a single class, run:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
- https://api.parse.com/1/schemas/Game
+ https://YOUR.PARSE-SERVER.HERE/parse/schemas/Game
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/schemas/Game', "", {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/schemas/Game', "", {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -97,7 +97,7 @@ fields and some default fields applicable to the class. To add the schema, run:
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '
@@ -109,16 +109,16 @@ curl -X POST \
}
}
}' \
- https://api.parse.com/1/schemas/City
+ https://YOUR.PARSE-SERVER.HERE/parse/schemas/City
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/schemas/Game', json.dumps({
+connection.request('POST', '/parse/schemas/Game', json.dumps({
"className":"City","fields":{"name":{"type":"String"} }
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -132,7 +132,7 @@ You can add or delete columns to a schema. To do so, run:
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '
@@ -144,16 +144,16 @@ curl -X PUT \
}
}
}' \
- https://api.parse.com/1/schemas/City
+ https://YOUR.PARSE-SERVER.HERE/parse/schemas/City
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/schemas/City', json.dumps(
+connection.request('PUT', '/parse/schemas/City', json.dumps(
"className":"City","fields":{"population":{"type":"Number"} }
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -165,7 +165,7 @@ To delete a particular field, you need to use `{"__op" : "Delete" }`
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
-d '
@@ -177,16 +177,16 @@ curl -X PUT \
}
}
}' \
- https://api.parse.com/1/schemas/City
+ https://YOUR.PARSE-SERVER.HERE/parse/schemas/City
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/schemas/Game', json.dumps(
+connection.request('PUT', '/parse/schemas/Game', json.dumps(
"className":"City","fields":{"population":{"__op" : "Delete"} }
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
@@ -201,17 +201,17 @@ To do that, run:
curl -X DELETE\
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \
-H "Content-Type: application/json" \
- https://api.parse.com/1/schemas/City
+ https://YOUR.PARSE-SERVER.HERE/parse/schemas/City
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('PUT', '/1/schemas/City', "", {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('PUT', '/parse/schemas/City', "", {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-Master-Key": "${MASTER_KEY}",
"Content-Type": "application/json"
})
diff --git a/_includes/rest/sessions.md b/_includes/rest/sessions.md
index ae09d6847..abd17c1b2 100644
--- a/_includes/rest/sessions.md
+++ b/_includes/rest/sessions.md
@@ -30,27 +30,27 @@ With revocable sessions, your current session token could become invalid if its
## Creating Sessions
-For mobile apps and websites, you should not create `Session` objects manually. Instead, you should call `GET /1/login` and `POST /1/users` (signup), which will automatically generate a `Session` object in the Parse Cloud. The session token for this automatically-created session will be sent back on the login and signup response. Same for Facebook/Twitter login and signup requests.
+For mobile apps and websites, you should not create `Session` objects manually. Instead, you should call GET /parse/login
and POST /parse/users
(signup), which will automatically generate a `Session` object in the Parse Cloud. The session token for this automatically-created session will be sent back on the login and signup response. Same for Facebook/Twitter login and signup requests.
In "Parse for IoT" apps (e.g. Arduino or Embedded C), you may want to programmatically create a restricted session that can be transferred to an IoT device. In order to do this, you must first log in normally to obtain an unrestricted session token. Then, you can create a restricted session by providing this unrestricted session token:
curl -X POST \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "X-Parse-Session-Token: r:pnktnjyb996sj4p156gjtp4im" \
-H "Content-Type: application/json" \
-d '{"customField":"value"}' \
- https://api.parse.com/1/sessions
+ https://YOUR.PARSE-SERVER.HERE/parse/sessions
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/sessions', json.dumps({
+connection.request('POST', '/parse/sessions', json.dumps({
"customField": "value"
}), {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"X-Parse-Session-Token": "r:pnktnjyb996sj4p156gjtp4im",
"Content-Type": "application/json"
@@ -82,17 +82,17 @@ At this point, you can pass the session token `r:aVrtljyb7E8xKo9256gfvp4n2` to a
If you have the session's objectId, you fetch the `Session` object as long as it belongs to the same user as your current session:
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "X-Parse-Session-Token: r:pnktnjyb996sj4p156gjtp4im" \
- https://api.parse.com/1/sessions/Axy98kq1B09
+ https://YOUR.PARSE-SERVER.HERE/parse/sessions/Axy98kq1B09
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/sessions/Axy98kq1B09', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/sessions/Axy98kq1B09', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"X-Parse-Session-Token": "r:pnktnjyb996sj4p156gjtp4im"
})
@@ -104,17 +104,17 @@ If you only have the session's token (from previous login or session create), yo
curl -X GET \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "X-Parse-Session-Token: r:pnktnjyb996sj4p156gjtp4im" \
- https://api.parse.com/1/sessions/me
+ https://YOUR.PARSE-SERVER.HERE/parse/sessions/me
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('GET', '/1/sessions/me', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('GET', '/parse/sessions/me', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"X-Parse-Session-Token": "r:pnktnjyb996sj4p156gjtp4im"
})
@@ -128,19 +128,19 @@ Updating a session is analogous to updating a Parse object.
curl -X PUT \
- -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
+ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "X-Parse-Session-Token: r:pnktnjyb996sj4p156gjtp4im" \
-H "Content-Type: application/json" \
-d '{"customField":"value"}' \
- https://api.parse.com/1/sessions/Axy98kq1B09
+ https://YOUR.PARSE-SERVER.HERE/parse/sessions/Axy98kq1B09
import json,httplib
-connection = httplib.HTTPSConnection('api.parse.com', 443)
+connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
-connection.request('POST', '/1/logout', '', {
- "X-Parse-Application-Id": "${APPLICATION_ID}",
+connection.request('POST', '/parse/logout', '', {
+ "X-Parse-Application-Id": "${APPLICATION_ID}",
"X-Parse-REST-API-Key": "${REST_API_KEY}",
"X-Parse-Session-Token": "r:pnktnjyb996sj4p156gjtp4im"
})
@@ -154,17 +154,17 @@ Querying for `Session` objects will only return objects belonging to the same us