Forum Discussion
Hmmm....
Maybe I'm doing something wrong. Again, it works on the first two calls but returns 0 on everyone after that. Here's the calls I'm making:
for (int i = 1; i <= LITHIUM_CONSUMER_API_CALLS; i++)
{
ProcessLithiumData("http://h30434.www3.hp.com",
String.Format(@"restapi/vc/categories/id/InkJet/posts/recent?page_size={0}&page={1}&restapi.response_format=json&restapi.format_detail=full_list_element&restapi.response_style=view", LITHIUM_RECORDS_PER_CALL, i));
}
Any ideas? If I issue the calls from a browser I get the same result: First two work, next ones all fail.
Could be their is no cap on listing users. Can you run against a category/board of yours and see if you can pull more than 2000?
Notice: This is HP's consumer forum that contains all the Photosmart, Deskjet, Officejet, and Laser printers.
synthesis I will see if I can pull *all messages", but I'm doing my call with an end point and not exactly as you are. Specifically, I ran this query on our very small private forum (I knew I had more than 2000 but less than 3000 registered users). As I mentioned before this returned more than 2000 users.
<#--
Get list of registered users without the Staff role = registered customers
-->
<#list 1..3 as y>
<#assign username = restadmin("/users?page_size=1000&page=${y}") />
<#list username.users.user as x>
<#assign has_role = false />
<#list restadmin("/users/id/${x.id}/roles").roles.role as role>
<#if role.name?? && (role.name == "Staff")>
<#assign has_role = true />
</#if>
</#list>
<#if (has_role == false)>
${x.login}</br>
</#if>
</#list>
</#list>
Related Content
- 3 years ago
- 3 years ago