-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd.php
29 lines (20 loc) · 880 Bytes
/
add.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
//https://docs.getgrist.com/api/docs/7r6ZcK4NtJ5JQHaYX93DBi/tables/Before_Quotes/records
//96c63a4955c4cbd4224a0cb1640c593d3bccdf46
$curlSession = curl_init();
curl_setopt($curlSession, CURLOPT_URL, 'https://docs.getgrist.com/api/docs/7r6ZcK4NtJ5JQHaYX93DBi/tables/CRM/records');
curl_setopt($curlSession, CURLOPT_BINARYTRANSFER, true);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlSession, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer 96c63a4955c4cbd4224a0cb1640c593d3bccdf46',
));
$jsonData = json_decode(curl_exec($curlSession), true);
curl_close($curlSession);
//print_r($jsonData['records']);
//echo $jsonData['records'][0]['Name'];
foreach( $jsonData['records'] as $name )
{
echo $name['fields']['Name']."<br />";
}
?>