Tag Archives: REST

ווי צו ספּעציפיצירן מענטשן ווי אַ זוכן פאַרנעם / אינהאַלט מקור ניצן שאַרעפּאָינט 2013 מנוחה אַפּי

I had reason to work with the SharePoint 2013 Search API via REST for the first time. I wanted to search for people, not documents. The key learning here is that you specify content sources via its GUID (or at least in this case). The following jQuery snippet shows how:

    loadExpertsAsync: פונקציע() {

        jQuery.support.cors = ריכטיק;

        $.ajax({
            URL: דעם.CreateFullApiUrl() +
                "?querytext='portals'&sourceid='b09a7990-05ea-4af9-81ef-edfab16c4e31'" +
                "&selectproperties='LinkedInProfileUrl,GoogleCirclesProfileUrl,BALargeProfilePictureUrls,BAGridPictures,WorkEmail,Skills,AboutMe,Interests,JobTitle,PastProjects,PictureURL,PreferredName,TwitterHandle,LinkedInProfileUrl,PreferredName,GoogleCirclesProfileUrl'" +
                "&rowlimit=99",
            מעטאָד: "GET",
            headers: { "Accept": "application/json; odata=verbose" },
            cache: פאַלש,
            success: פונקציע (טאַכלעס) {

אין מיין פאַל, I’m running the API against SharePoint online. To get the GUID, I followed these steps:

  1. Access the SharePoint admin center
  2. Select “search” from the left hand navigation
  3. Select “Manage Result Sources”
  4. Select “Local People Results”
  5. Look at the URL.

My URL looked something like:

https://xyzzy-admin.sharepoint.com/_layouts/15/searchadmin/EditResultSource.aspx?level=tenant&sourceid=b09a7990%2D05ea%2D4af9%2D81ef%2Dedfab16c4e31&view=1

The sourceid parameter is what worked for me.

(I understand that the sourceid may actually be a sort of permanent thing with SP, but I’ll always check anyway 🙂 ).

</עק>

undefinedאַבאָנירן צו מיין בלאָג.

גיי מיר אויף טוויטטער בייַ http://www.twitter.com/pagalvin