We are trying to list pages in OneNote using MS Graph and failing both on /me and other locations.
https://graph.microsoft.com/v1.0/me/onenote/pages
Calling this via WebRequest or Graph Explorer results in an empty array. The /notebooks and /sections work perfectly fine but we need to get into the actual page contents and can't seem to get any information out of the page layer regardless of how it is called.
Related
I'm calling this API method:
https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-6.0#response
My API url (with placeholder names):
https://dev.azure.com/MyOrgName/MyProjName/_apis/build/builds?api-version=6.1-preview.6
The results are mostly appropriate, except I get a filtered list of builds, and I can't seem to get all the builds I want. In particular, builds from several pipelines are simply missing, and I can't find any way to include them. There's no discernable reason why some builds are included, and some are not.
The filter options describe ways I could reduce it more, but that's not my goal. I want to retrieve builds which I am otherwise not getting. And I don't know what option that I don't know about which will get me the results I care about.
As you have already noticed, there is a maximum number of the objects that can be listed on the response body of each API call. Normally, if the objects you want to list are too many, they will be returned in multiple pages.
In the response body of each call, generally there is a parameter 'continuationToken' (see here). You can access the next response page via calling the API with this parameter.
GET https://dev.azure.com/{organization}/{project}/_apis/build/builds?continuationToken={continuationToken}&api-version=6.1-preview.6
For example:
the first call returns the list in the first page;
then run the second call with the parameter 'continuationToken' returned in the response of the first call to get the second page;
then get the third page using the 'continuationToken' returned in the second response;
. . .
until the last page.
If you want to traverse all the pages, you may need to call the API in a loop.
How do I search my OneDrive for terms with non-Western characters in it?
For example, I have an Excel file which has the text "Tetsuo" and "悠真" in two separate cells.
Using the Microsoft Graph API Explorer, I am running the following tests
The following queries return this document as a search hit:
https://graph.microsoft.com/v1.0/me/drive/root/search(q='Tetsuo')
https://graph.microsoft.com/v1.0/me/drive/root/search(q='悠')
https://graph.microsoft.com/v1.0/me/drive/root/search(q='%E6%82%A0') // above query pre-encoded
The following queries do not return the document as a search hit:
https://graph.microsoft.com/v1.0/me/drive/root/search(q='真')
https://graph.microsoft.com/v1.0/me/drive/root/search(q='%E7%9C%9F') // above query pre-encoded
https://graph.microsoft.com/v1.0/me/drive/root/search(q='悠真')
https://graph.microsoft.com/v1.0/me/drive/root/search(q='%E6%82%A0%E7%9C%9F') // above query pre-encoded
I know the Microsoft Graph API Explorer is supposed to handle encoding, and it seems to handle it well as the results are always consistent on that level. However, it seems like there is something preventing me from searching beyond one Japanese character. Is there something I am missing?
I'm trying to keep a synced list of files in a Sharepoint group by calling:
/groups/{groupId}/drive/root/delta
When there is no token submitted in the request, it should return the current state, but some files are missing. I'm looping all pages by following odata.nextlink, but I only get 3102 elements, compared to 3134 elements in Sharepoint (exported to Excel). There seems to be no logic in the files missing
My intention is to build a Machine Learning program that will give a recommendation for archiving email item by reading all previous email history.
For that, I am trying to read all the email item from:
https://graph.microsoft.com/beta/me/messages
First I am getting the total number of email items in my account using /messages?$count=true which returns 1881 as the result.
Then I am trying to get all the 1881 item using:
https://graph.microsoft.com/beta/me/messages?$top=1881
But the problem is that returns 976 email items. Where are the rest of the email item? How I can find them?
Are you getting a #odata:nextLink property in your response?
If that's the case, you might need to send another request with a skiptoken parameter. It should contain a value from the #odata:nextLink response property.
On the "paging" documentation page - https://developer.microsoft.com/en-us/graph/docs/concepts/paging - it is specified that different APIs have different max page size. It's possible that the endpoint for fetching emails does not support a page size of 1881. In that case, you might need to access a second page of the results.
Another suggestion is to replace beta endpoint with the V1 API call because me/messages is available there also - https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_messages
I am using Microsoft graph API. I made calls to get the lists of the sites and response resulted in listing all the lists available. Then used list id to fetch the items, but no items are displaying in the values field of response JSON. There are items in the list and can be seen in SharePoint. The API call made is to fetch the items -
https://graph.microsoft.com/v1.0/sites/abc.sharepoint.com,{SPSite.ID},{SPWeb.ID}/lists/{list-id}/items
and it returns-
{
"#odata.context": "https://graph.microsoft.com/beta/$metadata#sites('abc.sharepoint.com%2C792f04d7-8a76-4ccf-95fd-10e3293536c4%2Ca422fba2-947c-44ef-8134-ddd560d6bb3d')/lists('0c739bcd-8649-4fa6-bca4-a8dcea53e2c2')/items",
"value": []
}
To get the lists, which is working -
https://graph.microsoft.com/v1.0/sites/abc.sharepoint.com,{SPSite.ID},{SPWeb.ID}/lists/
and displays all the available lists.
I am referring this doc .
Using postman to make the calls.
Thanks
Try to use test query tool below to check if it works.
Graph-Explorer
It works using the API below in my test.
https://graph.microsoft.com/v1.0/sites/abc.sharepoint.com,{Site GUID},{Web GUID}/lists/{List GUID}/items
You can also check if the list id is right.