Not signed in (Sign In)
The Intervals Forum is read-only
Please head to for help articles and guides. If you have any questions, please contact our support team.


API PHP Code Sample: Task List

Bottom of Page

    • jreeve
    • May 21st 2010 edited @ 05/21/2010 9:05 am

    The following code PHP requires the Curl library and shows how to request and parse a task list. In this example we will query the task list for all tasks assigned to one person and print out the results.

    Documentation for the task resource can be found here:

    //set some variables
    $apiToken = ""; // set this value to your API token
    $assigneeId = 92; //your assignee id

    //initialize the curl handler
    $ch = curl_init();
    //set options
    curl_setopt($ch, CURLOPT_URL, "$assigneeId");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_USERPWD, $apiToken . ":");
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json")); //application/xml is also a valid header
    //query the API and parse the resulting json code into an array
    $response = json_decode(curl_exec($ch);)
    //close the curl handler

    //output the results

Comments are closed.
For more Intervals help documentation, please visit