在Office 365管理活动API中实施分页和筛选 [英] Implement pagination and filters in Office 365 Management Activity API

查看:130
本文介绍了在Office 365管理活动API中实施分页和筛选的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个POC,它可以获取SharePoint 2013环境的所有活动。为此,我使用的是Office 365管理活动API。在获取数据时,我无法实现分页。这些文件指明我们需要将
传递给"NextPageUrl"。获取更多数据的值,但没有给出"NextPageUrl"值的变量。此外,我想在此API中实现与我们在REST API和Seach API(kql)中使用的过滤器相同的细化过滤器。我无法在文档中找到


我有没有办法在API中实现Pagination和Refinement过滤器?

解决方案

嗨Jyotsna,


当返回的内容很多时, 结果将被截断,并且标题将添加到响应中,指示用于检索下一页结果的URL。 URL中有一个参数,表示
下一页的内部ID。请从响应标头中获取nextPage参数。


https://msdn.microsoft.com/en-us/office-365/office-365-management-activity-api-reference?f= 255& MSPPError = -2147217396



关于细化,我建议你通过过滤器插件设计自己的改进。您可以使用Jquery过滤器JSON插件来过滤您检索到的数据并实现细化功能。


https://github.com/kapilkashyap/jquery-filter-json-plugin



最好的问候,


维多利亚


I am currently working on a POC that fetches all the activities of a SharePoint 2013 environment. For this I am using Office 365 Management Activity API. While fetching the data I am unable to implement pagination. The documents specify that we need to pass the "NextPageUrl" value to get more data, but there is no variable that gives the value of "NextPageUrl". Also I wanted to implement refinement filters in this API same as the one we use in REST API and Seach API(kql). I am unable to find that in the documentation.

Is there any way I could implement Pagination and Refinement filters in the API?

解决方案

Hi Jyotsna,

When there are many contents returned, the results will be truncated and a header will be added to the response indicating the URL to use to retrieve the next page of results. There is a parameter in the URL indicating the internal ID of the next page. Please get the nextPage parameter from the response header.

https://msdn.microsoft.com/en-us/office-365/office-365-management-activity-api-reference?f=255&MSPPError=-2147217396

And regarding the Refinement, I would recommend you to design your own refinement by the filter plugin. You can use the Jquery filter JSON plugin to filter the data you retrieved and achieve the function as refinement.

https://github.com/kapilkashyap/jquery-filter-json-plugin

Best Regards,

Victoria


这篇关于在Office 365管理活动API中实施分页和筛选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆