2017-02-07 45 views
0

當我嘗試請求獲取包含大量評論(大約70000)的特定文件的評論時,出現500內部服務器錯誤。從盒子API v2獲取評論時發生HTTP 500內部服務器錯誤

這裏是我發送請求和被反回的響應(在請求我已經取代了FILEID的值和令牌):

GET /2.0/files/[my_file_id]/comments?fields=id,message,tagged_message,created_at,item,created_by HTTP/1.1 
Host: api.box.com 
Authorization: Bearer [my_token] 
Accept: application/json 
Accept-Encoding: gzip, deflate 
User-Agent: CData Data Provider Engine - www.cdata.com - Accepts: gzip 
Connection: close 

響應:

HTTP/1.1 500 Internal Server Error 
Server: ATS 
Date: Mon, 06 Feb 2017 15:19:30 GMT 
Content-Type: text/html; charset=UTF-8 
Content-Encoding: gzip 
Vary: Accept-Encoding 
Content-Length: 20 
Age: 82 
Connection: close 

爲什麼我會遇到這種錯誤?

+0

可能是因爲需要很多時間或內存來處理數據。大多數這樣的API具有僅請求部分結果集的參數,例如極限,偏移或類似的。你在這方面檢查過他們的文檔嗎? – CBroe

+0

我同意@CBroe。它看起來像是基於Box.com API(https://docs.box.com/reference#view-the-comments-on-a-file)正確構建了請求。你能否提供由Box返回的實際服務器錯誤信息?我注意到那些響應標題表明有一些內容:'Content-Length:20' –

回答

相關問題