Questions tagged [odata]
OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs.
149
questions
26
votes
5
answers
73k
views
Expanding columns in lookup fields
Using the SharePoint 2013 REST API,
Can I get more than one column from the lookup column by using the $select and $expand endpoints?
16
votes
3
answers
719
views
SharePoint Online List limitations
Is it just me or is it really strange that SSRS 2012 still does not support Claims based authentication or OData connections? Anybody know of plans? Reasons for such a hole in the strategy?
Part of a ...
13
votes
6
answers
25k
views
Paging using REST/OData with SP 2013
I'm trying to do paging on a document library (also trying this on a list) with SP 2013 using REST/OData but I can't seem to get the skipping of items working.
Here are some examples of URLs that I'm ...
9
votes
4
answers
13k
views
How can I filter based on Choice fields when using ListData.svc in SharePoint 2010?
I have a list that I'm trying to query using ListData.svc. I am trying to pull back records within a date range and with a particular value from a Choice field checked. If I use Lists.asmx, I can ...
8
votes
2
answers
5k
views
Why can I not filter it inside my REST API end point
Inside my Projects list, I have a lookup column named ProgrammeRevissionId that is referenced to my Dept list. When I define the following REST call:
http://.../_api/web/lists/getbytitle('Projects')/...
7
votes
3
answers
9k
views
SharePoint 2013 and anonymous access problem
We run into following problem:
We have application, that makes authenticated calls to sharepoint 2013 REST services (PUT and GET). Everything works well, when anonymous access
is turned off.
But we ...
7
votes
4
answers
11k
views
REST API + Expand Recurring Calendar Events?
Is there a way using the REST API (through javascript) to expand recurring calendar items? Or is there a helpful client side utility to assist with this?
6
votes
5
answers
31k
views
How to group distinct values from a list using odata rest api
Hi I have a list with two fields "Regions" & "Countries" I am using a rest api to retrieve the list of just regions like so: http:mysitename/_api/web/lists/getByTitle('TaxTool')/items?$select=...
6
votes
2
answers
8k
views
SharePoint 2013 REST display lookup fields?
I am using SharePoint 2013 REST to show data from my list,
one of my field in announce list is AnnouncedBy which is a user packer field
or is a lookup field
how can I display it or get it using ...
6
votes
6
answers
6k
views
Folder creation in Document library using listdata.svc
Do you have any tips how can I create a new folder in a document library using listdata.svc (OData REST interface of SharePoint 2010) from JavaScript? SP creates a new file instead of a folder. I can ...
6
votes
3
answers
7k
views
Retrieving list items from multiple sites via OData with Excel
I want to build a report:
with Excel 2013 + PowerPivot Add-In
using data from SharePoint Online
that should work in Excel Services (so I'm not able to use VB, Power Query, etc.)
Report should be ...
5
votes
1
answer
5k
views
Sharepoint REST Api OData Version?
Can anyone tell what is odata version used by SharePoint REST Api?
I am asking because I tried to run the Nested Filter in Expand supported by OData V4. http://www.odata.org/getting-started/basic-...
5
votes
2
answers
16k
views
REST API filter by month
I would like to filter a datetime field but I only want to filter MONTH
var requestUri = "xxxx/getByTitle('Contact')/items?$select=CellPhone,mdate,ddate&$filter= Birthday ge '" + today + "'";
...
5
votes
1
answer
20k
views
Sharepoint REST API - Using caml query and select/expand to get lookup data
I have a Sharepoint app and I use a caml query to filter the data I get back:
var caml = "<View><Query><Where><And><Contains><FieldRef Name='PublishingPageLayout' ...
5
votes
1
answer
15k
views
REST API Getting Fields from an Lookup List
I have a REST query that looks like this
/_api/lists/getbytitle('MainList')/items?$select=Title,LookupField/Id,LookupField/Title&$expand=LookupField
That works fine. But when I try to pull ...
5
votes
1
answer
3k
views
$inlinecount and $count missing in new OData API?
can anybody verify that in the new OData endpoint of SharePoint 2013 found at /_api/ does not implement the keywords $inlinecount and $count?
ListData.svc has it implemented.
Example:
/_api/web/...
5
votes
1
answer
3k
views
Need help retrieving site column names using REST service call in SP 2013
I need to retrieve content types and accompanying site column names and fields. Does anyone know how to construct the REST notation to accomplish this?
I have tried variations of:
/lists/sitecontents
...
5
votes
1
answer
3k
views
Rest filter startswith(ContentTypeId,'0x0101') not working
This is driving me crazy, but I think it's an issue on my sharepoint online.
Why the heck this is not working?
/_api/web/lists/getByTitle('Documents')/items/?$filter=startswith(ContentTypeId, '...
5
votes
2
answers
1k
views
REST API ItemCount on oData BCS List
I have a list generated from a BCS oData provider and I am attempting to get the number of items in the list so I can generate a $top on my request rather than bring back only the 100 item generic ...
4
votes
3
answers
10k
views
Sharepoint REST api - Recursively fetch all folders in a document library -
I have a set of folders say Folder1 containing Folder2 and Folder3. Folder3 contains Folder4, Folder5 and Folder6.
When i use the OData expand parameter - $expand=Folders/Folders i get only details ...
4
votes
2
answers
626
views
How to get details of editor of SharePoint site file?
I am working on SharePoint notifications using webhooks. I tried the following POST request.
https://xxxxx.sharepoint.com/_api/SP.AppContextSite(@target)/web/lists('2c955ea0-28h4-4f84-a8b5-...
4
votes
1
answer
8k
views
Getting item id from newly created item
I am using SharePoint 2013 Enterprise version. I am using below rest api code to add the record
I kept below code in common js file
function CreateListItemWithDetails(listName, webUrl, newItem, ...
4
votes
2
answers
134
views
Filter list with REST
I'm trying to filter a lookup column on my list using rest
this is the column on my list
it's a look up (connected to another list)
and my rest on the list
My query should get all the items that ...
4
votes
2
answers
4k
views
REST Api Filtered odata returning error: list view threshold
Why does the first query runs ok and the second throws list view threshold error?
Note that it's a regular SP.ListTemplateType.tasksWithTimelineAndHierarchy List with Id and PercentComplete as ...
4
votes
1
answer
1k
views
Problems adding WCF Data Services to SharePoint 2010
I would like to add a custom OData endpoint to SharePoint 2010.
Because of its dependency on .NET 4.0, the Web API OData provider is currently not an option for SharePoint 2010 (based on .NET 3.5). ...
4
votes
2
answers
1k
views
How can I check files In using OData for SharePoint 2010?
I am uploading files to SharePoint 2010 following the answer here: Uploading files to Document Libraries using the REST API
The issue is that all of the files are set as checked out due to some ...
3
votes
1
answer
2k
views
Authenticating to Office 365 vNext with Multi-Factor Authentication enabled
I am looking for any working examples of remote CSOM or SOAP OData calls against Office 365 with multi-factor authentication enabled.
The available documentation is unclear on this scenario. I think ...
3
votes
2
answers
3k
views
Get survey questions via Rest API
I am able to get all the fields in a survey using the web api url :
_api/Web/Lists(guid'cecxc8b4-bbvc-472c-ae3f-d648bd0bb025')/Fields
How ever I am not able to distinguish questions from the ...
3
votes
1
answer
2k
views
Using NOT on REST date query
I am able to filter for items created on a specific date with the following query (using today [03-06-2015] as an example):
"$filter=Created ge datetime'2015-03-06T05:00:00.000Z' and Created lt ...
3
votes
2
answers
3k
views
How do I get the List REST method to return the results with the display name and not the internal name
zopv & s2u2 are internal names, but I would like the results to be returned using the display name.
FileSystemObjectType: 0 Id: 2 ContentTypeId:
"0x010100517BCCBD1C63034A8C1141184DAB12C5" ...
3
votes
1
answer
7k
views
SharepointOnlineCredentials not working in an app
I want to authenticate against sharepoint online site using SharepointOnlineCredentials class. Below code works fine in a console application. But the same code is generating error when written in wcf ...
3
votes
1
answer
794
views
What is the purpose of "EntityPropertyName" property of field?
I am getting all list fields using REST API, In result, I found there is "EntityPropertyName" property for each field.
For some fields, it shows exactly same value as "InternalName" property But for ...
3
votes
1
answer
557
views
Using the OData endpoint to update or insert assignment in Project Server 2013 On Premise
Objective
Connect to Project Server 2013 in order to update an existing assignment of a resource to a task or create a new assignment for the resource in case it (the resource) is not assigned to the ...
3
votes
1
answer
521
views
What is difference between SharePoint REST and ODATA?
I have read that SharePoint REST and ODATA provide web services like WCF to fetch list/items, etc.
So what is difference between REST and ODATA?
Please provide a programmatic example to show the ...
2
votes
1
answer
4k
views
How do I use REST $filter with a "Hyperlink or Picture" type column?
The $filter method works perfectly on regular text columns, but I can't figure out how to use it with a "Hyperlink or Picture" type column. For example:
/_api/web/lists/getbytitle('Sponsors')/items?$...
2
votes
3
answers
5k
views
The field 'Author' of type 'User' cannot be used in the query filter expression
I was making a rest api call with Odata filter author/id. I want to get survey responses of a particular user.
_api/Web/Lists(guid'id')/items?$select=Id,Author/ID&$expand=Author/ID&$filter=(...
2
votes
3
answers
4k
views
Ajax Odata 400 bad request
I get a 400 Bad Request from this code, hard to debug, what can the problem be?
function saveSelectedAnswer(radioValue) {
var requestUri = _spPageContextInfo.webAbsoluteUrl + "/...
2
votes
2
answers
6k
views
How to use jQuery and OData to expand multi user field in SharePoint 2013?
I am using jQuery to query a Sharepoint 2013 list and expanding the AssignedTo field (which is a Person or Group field type) in order to get the user id. I was able to get the code working when the ...
2
votes
1
answer
2k
views
Column 'ServerRedirectedEmbedUrl' does not exist. Rest odata SPOnline
I'm trying to get documents from a document library where ServerRedirectedEmbedUrl not equal empty, I'm trying something like this:
https://my-sharepoint/sites/mysite/_api/lists/getbytitle('Documents'...
2
votes
1
answer
4k
views
Convert user id to user name in a single rest query that gets list items
So I get some items from a list via a rest query, and in the Creator field I get an ID. I want to display the name of the user and not the ID. Calling the GetUserByID isn't an option because it might ...
2
votes
1
answer
1k
views
SharePoint 2013 OData $filter seems broken with date functions
I am using SP2013 SP1.
I am trying to perform the following OData opertaion from a client app that contains an External Content Type. The ECT points to a ASP.Net OData service.
My Javascript code in ...
2
votes
1
answer
3k
views
External Data Refresh failed - Unable to refresh list data in Excel Web Access WebPart
I have created a PivotChart in Excel workbook that fetches data from a SharePoint list using "OData Data Feed". When refreshing the connection in Excel 2013, the updated data is displayed in ...
2
votes
1
answer
2k
views
Error while connecting client.svc
I am trying to connect client.svc and getting below error
"The server encountered an error processing the request. See server logs for more details."
ULS is giving below two error,
System.IO....
2
votes
1
answer
4k
views
How do I query the OData/REST API in 2013 effectively using JavaScript?
I want to use the improved OData/REST API in Sharepoint 2013 but it's hard to find good examples. As I see it, the OData-endpoint is of little use without a dedicated OData client library. With plain ...
2
votes
1
answer
3k
views
Is there a limit of conditions count for oData query using $filter?
I have a long $filter query like ID eq 1 or ID eq 2 or ID eq 33 or ID eq ... and it works like a charm when we have up to 159 conditions joined by or.
But, when I add one more condition (started from ...
2
votes
1
answer
644
views
Failed to create list item for external list using REST API POST
I've AN OData API, which I'm consuming in SharePoint via BCS and External List.
I already have the Get and Update functionality working using REST API to external list.
But when I try to add an item ...
2
votes
1
answer
297
views
Sharepoint 2013 - OData Endpoint against External List - Supply Input Parameters
I have an external list in SharePoint 2013 that uses a filter (called idcode, say).
I can supply the filter value in the "Modify View" UI of the site and it works as expected, but my ultimate aim ...
2
votes
1
answer
467
views
SP2010, Odata, anonymous access
Is anonymous access to listdata.svc possible? I'm trying to just simply get list items and display them using json but I either get asked to login or a 401 unauthorized. It's a claims based site ...
2
votes
1
answer
4k
views
Multiple $filter in OData query
Here is my OData query:
https://XXX.sharepoint.com/sites/pwa/_api/ProjectServer/Projects?$filter=Id eq guid'xxxx'&$select=Id,Name,StartDate&$expand=Tasks&$select=Tasks/Id,Tasks/Name
I ...
2
votes
1
answer
442
views
How to order by modified (desc) and remove duplicate results in SPO List Datatable
Below is a working datatable for my SPO list called Companies. There are some duplicates in this list, but I want all of the duplicates removed. I have attempted the solutions on the DT site, but ...