Tag Info

New answers tagged

1

Assuming it's a Document Library, you can use $expand to bring information from the File along with the query Should be something like this: /sites/mysite/_api/web/lists/getbytitle('Rotating%20Banner')/items?$select=Id,Title,File/ServerRelativeUrl&$expand=File


0

Try changing the '?' before the $filter to a '&' To something like this: http://server/sites/test/_api/web/lists/GetByTitle('Agency')/items?$select=Id,Title&$filter=[Title eq '"+province+"']"


1

If this is for an On Premise solution (which I guess it has to be), you can deploy a Web Service to give access to these properties on your client side interfaces. If you are thinking of making changes to make it cloud friendly, you can try your idea with the Managed MetaData service and term set's custom properties. I don't know if you can query custom ...


0

Yes, from my experience the best approach is synchronizing local SQL data with native SharePoint Online lists, bi-directional if required. In this way you have all well-known native SharePoint list features available without any restrictions, e.g. views, search, change notifications or workflows on item Level etc. The sync approach results in a very ...


0

Now it is posible, for use in Power BI at least. Use Data Management Gateway. You install it on premisses on a location with Access to the internet and to your database, set the security info on your SharePoint, and it automatically redirects your queries to your on premisses site, compresses the result, and uploads and updates the info on your power bi ...


0

The following request demonstrates how to retrieve page content using SharePoint REST: /_api/Web/Lists/getByTitle('Pages')/items(<item id>)?$select=PublishingPageContent where Pages - the title of Pages library item id - List Item Id


2

Return the results of your first call (which will be a jQuery Deferred object) then use that object with jQuery.when() in order to force all of the first calls to complete before the second one can begin: $('.littcls').each(function() { // *** use these variables to hold all of the promises you create in the loop var addTTItemPromises = [], ...


0

Yes, you set the start page url for SharePoint Hosted App in Appmanifest.xml file. Modify its "StartPage" property to page that you want to be set as startpage <Properties> <Title>AppSolution</Title> <StartPage>~remoteAppUrl/Pages/Default.aspx?{StandardTokens}</StartPage> Check that page is in Pages folder like this: ...


1

Since Folder resource does not expose Content Type property I would recommend you to create Folder using SharePoint 2010 REST endpoint, in that case Content Type could be specified as demonstrated below: function createFolder(webUrl,listName,folderUrl,folderContentTypeId, success, error) { var urlParts = folderUrl.split('/'); var folderPath = ...


2

It seems that string contains carriage return character ↵ in JSON result, in that case you could replace a carriage return character with a <br> using the following function: function escapeCRLF(value) { return value.replace(/\r?\n/g, "<br />"); } Example Assume the following function is used for retrieving ListItem resource: ...


0

Okay, I tried on another freshly installed SharePoint and it works without issues. Possibly some configuration problem.


1

Try using OData__ModerationStatus if you're using the _api endpoints in 2013. 0 = Approved, 1 = Rejected, 2 = Pending So you would use a URL ending with an OData filter command like: ".../items?$filter=OData__ModerationStatus eq 0" Note: it's actually two underscores between OData and ModerationStatus.


0

You need to call the spcontextinfo through rest and get the FormDigest first. Call http://server/web/doclib/forms/_api/contextinfo using POST Then get the formDigestValue from the response. Then use that value in your headers: request.Headers["X-RequestDigest"] = formDigestValue;


0

SharePoint only allows out of the box REST & CSOM endpoints consumption from Apps so if you deploy custom WCF services or other 3rd party, it won't be allowed from within the App. If you use sp.webrequestinfo cross-domain library, you'll notice that it will work providing your service is consumable anonymously. Remember that in the context of a ...


0

File resource properties do not contain UniqueId property: http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx#bk_FileProperties


2

The problem arises as the response come as atom feed and IE by default set to read atom feed and present it in a better format. Go to IE settings - Internet Options -> Content -> Feed and Web Slices -> Settings and uncheck "Turn on feed reading view".


0

It's not clear exactly what you want to do, but OData $filter has a startswith that you should be able to use here. $filter=startswith(City_Name_EN,'M') See this page: http://msdn.microsoft.com/en-us/library/ff798339.aspx and do a find for "startswith". When in doubt, check the OData spec. SharePoint implements it for the most part, though there are ...


0

There is a typo (‘ is not allowed) in your request, the fixed request: http://server:port/sites/sitecollection/site/_vti_bin/listdata.svc/listname?$filter=ColumnName eq 'Value' Troubleshooting REST It is frequently useful to view the HTTP messages that are being sent and received, the following tooling could be utilized for that purpose: Debugging ...


-2

You can look at Share .NET, a component for .NET that makes it easy to use SharePoint REST API with .NET / Mono.


1

Since you are using jQuery I would suggest to utilize jQuery.grep() to easily filter elements in array. The following example demonstrates how to request global navigation items and filter REST result: function getJson(endpointUrl,success,failure) { $.ajax({ type: "GET", headers: { "accept": "application/json;odata=verbose", ...


2

After chatting with wjervis, since the filter does not work on _api/navigation, we needed to use the javascript to pinpoint the items I wanted to extract: function globalNav(){ $.ajax({ type:"GET", ...


0

Things you need to check in the queryparametertemplate.xml file are whether Farm ID, Site ID & Web ID are configured correctly Farm ID: is the GUID of the farm. Site ID: is the GUID of the site collection where you are you are trying to retrieve your data from. Web ID: The GUID of the root web of the site collection. You can check this Sample file to ...


1

It does not seem possible to specify InternalName when creating a field using SharePoint REST since InternalName is ignored. The workaround would be to: Create a field and specify for a Title an InternalName value Update a field by specifying actual Title In that case InternalName will be preserved. The following example demonstrates this approach: ...


0

Not entirely sure what you mean by 'defined internal', gonna take a leap here and assume you mean using a schema definition. Yes you can create a field using a schema in the REST api: $.ajax({ url: "http://<site url>/_api/web/lists(guid'da58632f-faf0-4a78-8219-99c307747741')/fields", type: "POST", data: { '__metadata': { 'type': ...



Top 50 recent answers are included