최근 검색


최근 검색 없음

여러 페이지의 결과를 자동으로 가져오려면 어떻게 해야 하나요?



2025년 4월 17일에 편집됨


4

0

댓글 2개

Thanks for taking the time to share this with everyone Seneca :)

0


It seems that CURLOPT_SSL_VERIFYHOST now needs to be set to 2.

If you don't already have php-curl installed, you'll need that package as well.

If you run it and get a zero-length output file, try changing the $end_page to 2. If you ask for a page that doesn't exist it overwrites the file with nothing at all. However it seems to handle things correctly up to then. You get 100 records per page, so for example if you have 650 records, you'll need to set $end_page to 6.
If you're getting organizations, for example, you can use something like this to get the count so you know how many pages to get. The count may not be accurate over 100,000. See https://developer.zendesk.com/rest_api/docs/support/organizations.

curl https://{subdomain}.zendesk.com/api/v2/organizations/count.json \
  -v -u {email_address}:{password}

I know this is just an example and not meant to be robust. This isn't a complaint or request for changes, just adding these comments here in case they help someone like myself in the future. 

0


댓글을 남기려면 로그인하세요.

계정 세부 정보

세부 정보를 보려면 로그인하세요.

로그인하여 계정 세부 정보를 한 눈에 확인하세요.

로그인