문제

I'm trying to request a list of user in OneLogin in Php.

Here is my script :

<?php    
$url = "https://app.onelogin.com/api/v2/users.xml";
$headers = array('Content-type: application/xml');
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERPWD, 'MY_API_KEY');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADER, false);



$http_result = curl_exec($ch);
$error       = curl_error($ch);
$http_code   = curl_getinfo($ch ,CURLINFO_HTTP_CODE);
echo $http_result;  
curl_close($ch);

My problem is that it is returning only 100 result when it should return more than 4000 results. Is there something I'm missing? I'm looking for LIMIT, or pagination in OneLogin API Doc

When I query directly in Terminal with command :

 curl -u API_KEY:passw https://app.onelogin.com/api/v2/users.xml > curl.xml

it happens the same thing.

I don't understand what should happen

도움이 되었습니까?

해결책

This is a limitation of the OneLogin API. The docs state "the call will return a list of up to 100 users".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top