简体   繁体   English

BIM360 Docs GET 文件夹内容页数限制

[英]BIM360 Docs GET folder contents page limit

I am having trouble with the GET endpoint for folder contents ( https://forge.autodesk.com/en/docs/data/v2/reference/http/projects-project_id-folders-folder_id-contents-GET/ ).我在使用文件夹内容的 GET 端点时遇到问题( https://forge.autodesk.com/en/docs/data/v2/reference/http/projects-project_id-folders-folder_id-contents-GET/ )。 I am trying to retrieve item version IDs of >200.rvt element models because I am uploading a coordination model, where these element models are links.我正在尝试检索 >200.rvt 元素模型的项目版本 ID,因为我正在上传协调 model,其中这些元素模型是链接。 The problem is that I can only retrieve the IDs for the first 200 elements because of the limit on the endpoint.问题是由于端点的限制,我只能检索前 200 个元素的 ID。 When I then try to use the page number query parameter, I always get the same 200 elements returned.然后当我尝试使用页码查询参数时,我总是返回相同的 200 个元素。 I am probably just using it wrong.我可能只是用错了。

request.RequestUri = new Uri("https://developer.api.autodesk.com/data/v1/projects/" + projectID + "/folders/" + folderID + "/contents?page[" + pageNumber + "]");

The projectID and folderID are found earlier.之前找到了 projectID 和 folderID。 The pageNumber is an optional method parameter and is default 0. If the return is then 200 elements long which is the limit, I recursively call the method again with an incremented counter. pageNumber 是一个可选的方法参数,默认为 0。如果返回的长度为 200 个元素,这是限制,我会使用递增的计数器再次递归调用该方法。 This all works just fine, but it just keeps returning the same 200 element regardless of the pagenumber and thus loops forever.这一切都很好,但它只是不断返回相同的 200 元素,而不管页码如何,因此永远循环。 How do I set this up properly?如何正确设置?

I was indeed using the query parameter wrong - I've never used Http requests before, so to other people who also haven't.我确实使用了错误的查询参数 - 我以前从未使用过 Http 请求,所以对于其他也没有使用过的人。 The correct setup is to do "/contents?page[number]=" + pageNumber"正确的设置是做 "/contents?page[number]=" + pageNumber"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM