Parse is an external BaaS (Backend as a service) provider.
The REST API of Parse lets you interact with Parse from anything that can send an HTTP request. Read more about Parse Rest API.
Follow the steps to create a Parse App and obtain AppId.
1. SignUp for Parse.
2. Move to Dashboard
3. Create a New App
4. Copy Application ID, Client Key and REST API Key to a text file.
Following is a sample code to send a Php Curl request to Rest API of Parse. Replace the placeholders with your Application ID and Rest API Key in the code and run it from a php server.
Goto the Data Browser tab of the parse to find the saved data :)
The REST API of Parse lets you interact with Parse from anything that can send an HTTP request. Read more about Parse Rest API.
Follow the steps to create a Parse App and obtain AppId.
1. SignUp for Parse.
2. Move to Dashboard
3. Create a New App
4. Copy Application ID, Client Key and REST API Key to a text file.
Following is a sample code to send a Php Curl request to Rest API of Parse. Replace the placeholders with your Application ID and Rest API Key in the code and run it from a php server.
<?php
$url = 'https://api.parse.com/1/classes/GameScore';
$appId = 'YOUR_APP_ID';
$restKey = 'YOUR_REST_KEY';
$headers = array(
"Content-Type: application/json",
"X-Parse-Application-Id: " . $appId,
"X-Parse-REST-API-Key: " . $restKey
);
$objectData = '{"name":"Adarsh", "age":"26"}';
$rest = curl_init();
curl_setopt($rest,CURLOPT_URL,$url);
curl_setopt($rest,CURLOPT_POST,1);
curl_setopt($rest,CURLOPT_POSTFIELDS,$objectData);
curl_setopt($rest,CURLOPT_HTTPHEADER,$headers);
curl_setopt($rest,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($rest,CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($rest);
echo $response;
print_r($response);
curl_close($rest);
?>
Goto the Data Browser tab of the parse to find the saved data :)