Tag Info

New answers tagged

0

Here is my RestUrl- /_api/web/lists/getByTitle('Questions')/items?&$filter=Language eq '1' Details- In this it is fetching all the items in questions List which is having specific languageId. LanguageId is defined from language list having lookUp in Question list. Question List contains a lookup column ie "language" for language List.


0

You can use /checkin(comment='Check-in comment.',checkintype=0) OR /publish(comment='Check-in comment for the publish operation.') OR approve(comment='Check-in comment for the approval.') For example: _api/web/getfolderbyserverrelativeurl('{0}')/files/add(overwrite=true,url='{1}')/publish(comment='Check-in comment for the publish operation.') More ...


0

UIVersionLabel is the correct property to be used. My solution to the question above is : When a user checks out a file, the file's version is incremented but only the user who has checked out the file can see this incremented version. Everyone else still can see the non-incremented version. Only when the user checks in, the new incremented version is ...


0

Use SPServices for this. You can pass the lastname / first name and get the user object using which you can fetch user properties. See: http://spservices.codeplex.com/wikipage?title=SearchPrincipals


3

CSOM: will work in SP online, SP 2010, 2013 and most probably 2016 REST: will work in SP online, SP 2010, 2013 and most probably 2016 OOTB Web service: will work in SP 2007, 2010, 2013 but maybe not in 2016 (and maybe not with future versions of SP online) Creating your own Web service with SOM: will work in SP 2007, 2010, 2013 and 2016


0

I think, SOM is better option for doing complex operation in SharePoint. Becuase if you use REST/ CSOM, internally it will call some service which will get some time to execute that query than SOM on the server. so better to use SOM which will directly hit the server for operation.


5

CSOM and REST was introduced in SP 2010 so you wont be able to use that with 2007. SOM is an option but requires that your code runs on the servers of each farm. SharePoint Web Services will be your best option if you need to support all three versions with the same code from client computers. Lists Web Service (/_vti_bin/Lists.asmx) for getting libraries ...


1

The client object model was created in 2010. CSOM did not exist in 2007. So I would recommend the server object model.


0

Try this: _spPageContextInfo.webAbsoluteUrl + "_api/web/lists/getbytitle('Training Evaluation')/items/?$select=Title,Id,CourseTitle/Id,CourseTitle/Title&$expand=**CourseTitle/Id**&$orderby=**CourseTitle/Id**"


1

It is available in Powershell too, if you have downloaded the SharePoint Online module. Not sure what or how you want to use the data, but it is available that way. http://www.microsoft.com/en-us/download/details.aspx?id=35588 Get-SPOSite -Limit All You can also use a search query to look at all STS_Site content classes.


1

I found the following link and an older StackExchange question pointing out that you can do it using CSOM but you can't do it with REST API.


0

If you get a message like: The 'Attachments' column doesn't exists. Try adding 'Attachments' to the select, like: _api/lists/getByTitle('MyList')/items?$select=Attachment,AttachmentFiles,Title&$expand=AttachmentFiles


0

Vadim Gremyachev's answer worked for me. If the column name contains camel case then insert "/" before the case change. For example if the column name is "TasksID" then in the query put it as "Tasks/ID" and it will work fine. If "/" is not placed then you will get the following error. { "error":{ "code": "-0000234234, System.ArgumentException", "message":{ ...


0

Hi app installed in SharePoint can't access all the details from the hosted web. in project you have to specify the permission in app-manifest.xml that what content you want to access from host web. This will get the permission while installing the app and only tenant administrator and access the complete details about users information and some other thing. ...


0

This seems to work fine. Haven't tested in IE8 but I think it'll work. function getData(siteurl) { var endpoint = siteurl +"/_vti_bin/ListData.svc/ListName"; $.ajax({ url: endpoint, method: "GET", headers: { "Accept": "application/json; odata=verbose", "Content-Type": "application/json; odata=verbose" }, success: function (data) { //data ...


1

If your're working with REST you can apend $select tag to get specific properties. If would look like like this: <Sitename>/_api/web/sitegroups/getbyname('Approvers')?$select=id But even in this case you will get object containing at least __metadata tag, because SharePoint REST services is based on OData web protocol standards specification and ...


0

This is the REST endpoint https://<my-domain>.sharepoint.com/_api/web/webinfos You can read the content of subsites by using the %site%/_api/web/ endpoint; e.g: %site%/_api/web/lists Reference: https://msdn.microsoft.com/en-us/library/office/dn499819.aspx


0

If it works everywhere but on the server then you might be running into the "loop back check" issue. Spence Harbor has a very good post on this: Link


0

you will find better information and samples/scenarios from office 365 Pnp via github which gets updated every month. reference link


0

Ignore the '&' character and try i.e. for list named AT&T, try ATT.


1

For the "little square" use the following snippet: <span> <span class="ms-imnSpan"> <a href="#" onclick="IMNImageOnClick(event);return false;" class="ms-imnlink ms-spimn-presenceLink"> <span class="ms-spimn-presenceWrapper ms-imnImg ms-spimn-imgSize-10x10"> <img name="imnmark" title="" ShowOfflinePawn="1" ...


1

CAML Queries do support checking for Null values (unlike the REST api) and you can use CAML in REST. So you can do something like this: http://somesharepointsite/_api/web/lists/getbytitle('yourlist')/getitems(query=@v1)?@v1={"ViewXml":"<View><Query><Where><IsNull><FieldRef ...


0

Looks like there were some subsites with unique permissions. I added the security trimming filter at the end of the call and it fixed the issue. /_api/web/webs/?$filter=effectivebasepermissions/high%20gt%2032 Thanks for your help


0

Well I've found a solution, not very friendly but works, is based on this article So basically the article says that you need to identify in the query how to include everything that has any value: Text values consist of alphabetical characters (a..z) and numerical characters (0..9) and use a NOT at the beginning to exclude all the possible values... The ...


0

Using my angular module SennitShareAngularJs. For get request digest you need only writte this code: sennitRestApi.requestDigest For mor details and download see the link below SennitShareAngularJs github


0

I cant parse your sample code, but something like this should work... function ReturnListData() { $.ajax({ type: "GET", url: hostweburl + "/_api/web/lists/GetByTitle('ListName')/Items", contentType: "application/json; charset=utf-8", headers: { "Accept": "application/json; odata=verbose" }, success: ...


0

The following resources have the information you need to do what you want to do: Lists and list items REST API reference Files and folders REST API reference Uploading Files in SharePoint 2013 using CSOM and REST


0

I found solution by myself. The App has only Write permission to web and it requires at least Manage.


0

REST API calls for dealing with attachments is not consistent between SharePoint 2013 / On Premises and SharePoint Online. SharePoint Online Including AttachmentFiles in the $select and $expand collections is enough. The Attachment field is automatically returned in the results set. SharePoint 2013 / On Premises You must include both AttachmentFiles, ...


5

Postman API CLIENT Excellent tool. With Postman, you can construct simple as well as complex requests quickly, save them for later use and analyze the responses sent by the API. Postman can dramatically cut down the time required to test and develop APIs. Postman adapts itself for individual developers, small teams or big organizations equally well. The ...


2

If you are looking for a tool to test SharePoint REST API, best options would be: Fiddler. Try composer feature that lets you to make simple GET/POST request. Advanced REST client. It is a add-on for Google Chrome with quite good and easy UI.


1

REST API is by default enabled in SharePoint 2013. unless it is blocked by firewalls or user have not permission to access it. To understand REST API in SharePoint MicroSoft has done great documentation with example. but if you want to go from the starch in REST API in SharePoint then Go through this Article from which i got reference to learn REST API in ...


2

After _api you specify web which is the SPWeb. To get the site collection features, you can instead use _api/site/features to get the SPSite features. The full list of features for on-prem is usually retrieved via Get-SPFeature, but that requires Shell Admin Access which would be unavailable in SharePoint Online. The feature IDs should be the same across ...


2

The "DocIcon" property will not get you the icon itself but the file extension. You can use mapToIcon method from the SPWeb object in JavaScript to get the image url. Example : http://onlinecoder.blogspot.ca/2014/03/get-oob-document-type-icon-using.html


1

So the issue as pointed out by Pete Rijks is that google is adding an Origin header to the postman request. I had an old version of postman which didn't have the update notifications. Be sure to download the latest version which is around 3.0.2 at the time of this posting. You will also have to download the postman intercept app as well. turn it ...


0

One thing I want to add if you face again this kind of problem, try to use alphanumeric name of the fields as sometimes it fails to recognize these user created column names. For shortcut just press F12 and select the column which is not find by the compiler. You would get something like this, displayname="JobTitle" fieldtype="Text" ...


0

The answer to my problem turned out to be the List itself. Recreating the list shows all fields. (I am not clear on what was wrong with the way it was first created.) Fiddler is a great tool to use, so thanks Rob for the tip.


1

If you want to get all users of site then _spPageContextInfo.webAbsoluteUrl + "/_api/Web/SiteUsers" If You want to display information of User in site then _spPageContextInfo.webAbsoluteUrl + "/_api/Web/SiteUserInfoList" Display particular user information then _spPageContextInfo.webAbsoluteUrl + "_api/web/GetUserById("+UserID+")" But in your case ...


1

That can be specified by the URL that you use: Get all properties of current user: http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties Get all properties of Specific User: For Office 365/SharePoint Online: http://siteurl/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|user@domain.com' For ...


0

Check out this guys web page. http://www.fabiangwilliams.com/2013/09/03/more-on-sharepoint-2013-rest-api-with-fiddler-and-spd/ it got me started. What I ened up doing was using his example to create REST Calls using the HttpSend activity.


0

Please see link below. The fix for me was to add header “Content-Type” = “application/json;odata=verbose” http://stackoverflow.com/questions/25415427/create-a-folder-in-sp2013-using-rest-and-httpclient


1

You can do it with a filter url : _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getByName('"+ groupName +"')/Users?$filter=Id eq " + _spPageContextInfo.userId Note: For the group you are testing make sure to change the group settings to – "Who can view the membership of the group?" = Everyone Greetings :)


2

In SharePoint 2013 On Premise we can send emails using REST API where we can utilise SP.Utilities.Utility.SendEmail for doing the job. Note: The recipient is limited to a valid SharePoint user for security reasons. function processSendEmails() { var from = 'asad@Example.com', to = 'someone@Example.com', body = 'Hello World Body', ...


1

Please refer this link for for detailed code, you shall realize the issue. This link is also useful. Also:Make sure that the recipient is limited to a valid SharePoint user for security reasons. The following is the code: function sendEmail(from, to, body, subject) { //Get the relative url of the site var siteurl = ...


2

You can use the function I have added and call it like sendEmail("domain\\sender", "domain\\recipient","This is the body","Mail Subject");: var hostweburl; var appweburl; $(document).ready(function () { SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sendEmail); }); function sendEmail(from, to, body, subject) { ...


0

Only simple values (numbers, strings, dates) are brought back by default. If you want the other values you need to explicitly request them by using $select. You will most likely need to also use $expand to get object or collection property values. You should get used to using a tool like Fiddler to see what the response coming back from SharePoint looks ...


0

I got the solution with the help of this link here is the complete method function getInformation(userEmailId) { var url = _spPageContextInfo.siteAbsoluteUrl + "/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|" + userEmailId + "'"; $.ajax({ url: url, method: "GET", async: false, ...


0

AssignedTo in your example is a plain object (with Title property), not a string. DataTables probably tries to call the toString of the object, which will be [object Object]. The best solution I can think of: mData should support deeply nested objects, so try { "mData": "AssignedTo.Title" }: ... "aoColumns": [ { "mData": "Title" }, { "mData": ...


0

I think you just got the URL wrong, try this: _api/Web/Lists/GetByTitle('<List Title>')/DefaultNewFormUrl


0

You can retrieve workflow tasks based on the WorkflowItemId which is the item the workflow is related to. [site]/_api/web/lists/getbytitle('Workflow Tasks')/items?$select=*,WorkflowItemId&$filter=Status eq 'Not Started' and WorkflowItemId eq 25 add a filter for Status to restrict to currently running workflow.



Top 50 recent answers are included