-4

I need to access smartsheet 'card sheet (dashboard)' data in php using api. But smartsheet 'Grid sheet' is accessable for me. if anyone know, please help me.

Adnan ali
  • 25
  • 6
  • 3
    I don't understand what the problem you've having is. Do you have code you can share and explain how it's working in a way different than how you expect. – Goose Jan 08 '18 at 21:41
  • Sir i want to says that, a smartsheet has four view (i.e. Grid view, Gantt view, Card view and calender view). I have found APIs which get data from Grid view and Gantt View. I need Card view data. Is there any way to retrieve data from card view??? (Publish URL of all views are same.) – Adnan ali Jan 09 '18 at 14:27

1 Answers1

0

Through the API, getting sheet data is the same, no matter which view the sheet is presenting in the Smartsheet UI.

In PHP that might look something like this:

<?php
    $sheetId = 3333333333333333;
    $getSheetURL = "https://api.smartsheet.com/2.0/sheets/". $sheetId;
    $accessToken = "xxxxxxxxx";

    // Create Headers Array for Curl
    $headers = array(
        "Authorization: Bearer ". $accessToken,
        "Content-Type: application/json"
    );

    // Connect to Smartsheet API to get Selected Sheet
    $curlSession = curl_init($getSheetURL);
    curl_setopt($curlSession, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, TRUE);

    $getSheetResponseData = curl_exec($curlSession);
    var_dump($getSheetResponseData);
?>
stmcallister
  • 1,682
  • 1
  • 12
  • 21