Tag Info

New answers tagged

0

" As Franci said, OData is based on Atom Pub. However, they have layered some functionality on top and unfortunately have ignored some of the REST constraints in the process. The querying capability of an OData service requires you to construct URIs based on information that is not available, or linked to in the response. It is what REST people call ...


0

According to Use OData query operations in SharePoint REST requests, Grouping is not supported. The solution, is to apply grouping for the JSON results returned from REST endpoint. Example Suppose the following function is used for getting list items via SharePoint REST API: function getListItems(url, listname, query, complete, failure) { $.ajax({ ...


0

There isn't a REST filter that I know of that will handle getting distinct or unique values. You'll need to do that in your success callback. Typically I do this by creating an array and looping through the results. I'll check if the item is in the array, if not I push it in, if so I don't do anything with it.


0

There is no need to use $expand operator if you don't need to return the projected fields. The following REST endpoint demonstrates how to filter by Author Id: /_api/Web/Lists/getByTitle('Tasks')/items?$filter=(AuthorId eq 12)


0

You are missing ID in expand. The query should look like: _api/Web/Lists(guid'id')/items?$select=Id,Author/ID&$expand=Author/ID&$filter=(Author/ID eq 21)


1

You can disable the Access permission to remote interfaces to the anonymous users, follow this: Navigate to the site (or sub-site) where you wish to enable anonymous access. Go to Settings - Site settings. Under Users and Permissions, click on Site Permissions. Under the Permissions tab, click on Anonymous Access. Choose whether you want ...


1

You could also filter fields by SPField.CanBeDeleted property in order to get the list of questions from a Survey List How to get the list of questions from a Survey List via REST API /_api/Web/Lists/getByTitle('Survey')/fields?$filter=(CanBeDeleted eq true)


0

I found out a method. This might not be the optimised one. We can use Odata filter to get only the questions of a survey. _api/Web/Lists(guid'cecxc8b4-bbvc-472c-ae3f-d648bd0bb025')/Fields?$filter=(Hidden eq false) and (ReadOnlyField eq false) and (FromBaseType eq false)


3

This took forever to figure out, but of course it is simple once you got it. Instead of pasting a bunch of code, here is the context and then the raw HTTP POST request that I ended up with. The documentation is actually right here: http://msdn.microsoft.com/en-us/library/dd962796(v=office.12).aspx Syntax for the slug header is as following: ...



Top 50 recent answers are included