Expanding thumbnails on SharePoint via Microsoft graph - sharepoint

Trying to get thumbnails on SharePoint search
This returns the correct search results:
https://graph.microsoft.com/v1.0/drives/{SHAREPOINT_DRIVE_ID}/root/search(q='{QUERY}')
But this:
https://graph.microsoft.com/v1.0/drives/{SHAREPOINT_DRIVE_ID}/root/search(q='{QUERY}')?expand=thumbnails(select=large)
Returns:
{"error":{"code":"-1, Microsoft.SharePoint.Client.UnknownError","message":"Unknown Error","innerError":{"request-id":"69bc5cdf-0f4a-4d60-9c3c-513983dd8e0b","date":"2016-08-04T17:50:11"}}},"status":500,"statusText":"Internal Server Error"}
The documentation explicitly states: This method supports the OData Query Parameters to help customize the response.

Based on the test, the expand works well for the https://graph.microsoft.com/v1.0/me/drive/root?expand=thumbnails(select=large).
It seems that the Microsoft Graph search item API doesn't support to expand thumbnails.
If you want this feature, you can submit the feedback from here.

Related

Does SharePoint API offer an endpoint for doing a full text search on the content of the documents?

I am using SharePoint as a DMS for my app.
Via the SharePoint API I am uploading, and downloading files, and retrieving folders and files.
I have been using the standard url blueprint:
https://{{TenantName}}.sharepoint.com/sites/{{SiteName}}/_api/web/...
I need to add a full text search in the app. I need to be able to send a queryString parameter to the API, and to get returned all files that contain that string. Not in their name, but in their content.
Is that even possible? Could not find it online. Any help is greatly appreciated.
As far as I know, you can use the following REST API to search in SharePoint:
GET http://{server}/_api/search/query?querytext='sharepoint'
I suggest you can refer to this document: SharePoint Search REST API overview
Hope it can help you.

Get recurrence data of sharepoint calendar events using microsoft graph api?

Is there a way to get recurrence information of sharepoint calendar events using the graph api? I can get the event fields using this endpoint but I could not figure out a way to get event recurrence data of sharepoint calendar event using graph api.
If there's no way to do that, is there any documentation regarding working with sharepoint calendars? I could not really find any official documentation for it.
Not sure about Graph, but here's what I know. There has always been a problem when it comes to expanding the recurrence data in calendar events - AFAIK there is no way to retrieve this piece of info using JSOM nor REST for item collections. It is possible though to get this information for a single item in a form of an XML. All you have to do is to fetch and read the RecurrenceData property of an item. Example endpoint URL:
https://[tenantUrl]/_api/web/lists/getByTitle('Events')/items(1)?$select=Title,RecurrenceData
It will return something like the following in the RecurrenceData field:
<recurrence>
<rule>
<firstDayOfWeek>su</firstDayOfWeek>
<repeat><daily dayFrequency="1" /></repeat>
<repeatInstances>10</repeatInstances>
</rule>
</recurrence>
You can try to fetch that property using the provided Graph endpoint but I don't know what the result will be and unfortunately I don't have a way to check it right now - sorry!
Also, have a look at this thread on the SharePoint StackExchange: https://sharepoint.stackexchange.com/questions/23221/rest-api-expand-recurring-calendar-events?noredirect=1&lq=1
I've also recently stumbled upon a neat little library on Reddit, which simplifies common calendar tasks and allows to get this info using SOAP service. You can find it here: https://spcalendarpro.sharepointhacks.com/
This is what worked for me to get RecurrenceData for a SharePoint calendar list in Azure using Graph API:
/v1.0/sites/root/lists/<list_guid>/items?$expand=fields($select=Title,RecurrenceData)

Spotify API search VS in-app search

I'm working on tracks search and I found that in-app search performs spellchecking of query. For example for query 'seaman rammstein' result will be 1 song Seemann by Rammstein, but search via API(https://api.spotify.com/v1/search) has no items.
And I wonder what method or params are used in application search?
Thank you for your help in advance!
you're correct that the Search API doesn't do what we call "fuzzy matching". There is an open issue on the Web API issue tracker that you can follow here.

Access files of Document Library site through Microsoft Graph API

I was wondering if the two following queries are actually the same or supposed to be the same:
GET https://graph.microsoft.com/beta/sharepoint/sites/{spsite-id},{spweb-id}/drives
and
GET https://graph.microsoft.com/beta/sharepoint/sites:/MYPATH:/drives
I would like to access a Document Library Item in a sharepoint site through the relative path.
Please mind that both endpoints below are the same for getting all doc libraries or drive in a site according to the current beta microsoft graph documentation. The latter becomes handy when you dont know the site id yet but the relative site url.
https://graph.microsoft.com/beta/sites/[domain.sharepoint.com]:/[relative-url]:/drives
https://graph.microsoft.com/beta/sites/[site-id]/drives
(e.g. site id: "cie493742.sharepoint.com,4af352a7-a53b-43d9-b0a3-da372b392ea0,52c490f3-3354-40b9-a3c9-fefb08cb5c88" )
Now to get the document library item
Get Document library id from list of drives
https://graph.microsoft.com/beta/sites/[site-id]/drives
Get item id from list of items
https://graph.microsoft.com/beta/sites/[site-id]/drives/[drive-id]/items
Final API call
https://graph.microsoft.com/beta/sites/[site-id]/drives/[drive-id]/items/[item-id]
you could try experimenting the Graph API from here

Is there a full list of the parameters supported by the Facebook search API?

There is a search API can be used by developers to conveniently query posts, people in Facebook. But is there a full list of the parameters supported by the Facebook search API?
Facebook official docs provide what you need .graph api reference page has nice table describing what are various fields that can be used to call graph api.
Few links to use graph API and its reference
https://developers.facebook.com/docs/graph-api/using-graph-api/
https://developers.facebook.com/docs/graph-api/reference/
Github gist of Facebook Cheatsheet
https://gist.github.com/stevedev/1097432
Ill assume you did not find/read their website on FQL, so Ill give you that address now.
https://developers.facebook.com/docs/reference/fql/

Resources