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

API

"person" resource seems not to work

Bottom of Page

1 to 2 of 2

  1.  
  1.  

    Yo, all the other API calls I've tried at work, but when I do a GET request for "person" (the whole list) I get an empty response but no errors. My API key is for a Manager user-type, which is said to have permissions to this resource. But I get an empty list where I would expect to get all our employees.

    If I change the spelling to "persony" to test for errors, I do get an error, so that tells me that something else might be going on.

  2.  

    Hey Brade,

    I've tried this a few ways and I can't seem to recreate your particular error. Let me show you how I'm doing it and see if maybe there's something missing. This code is in PHP, so yours may differ slightly, but the gist of it is the same:

    $headers = array(
    "Accept: application/xml",
    "Content-Type: application/xml"
    );

    // create a curl request
    $c = curl_init('https://api.myintervals.com/person/?active=t');
    curl_setopt($c, CURLOPT_USERPWD, '___token___:X');
    curl_setopt($c, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($c, CURLOPT_HEADER, 0);
    curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($c, CURLOPT_HTTPGET, true);

    curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
    $return = curl_exec($c);
    curl_close($c);

    echo $return;


    If you're still encountering problems, you can email me at api@myintervals.com with your company name and user name, and I will try to diagnose if there's an issue with your account.

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