REST __next endpoint /w Duplicate ListItems

Using REST connection with $top=20&$orderby=year
The problem occurs when the next 20 is fetched using the json.d.__next endpoint.
Some of the ListItems are sent again by SharePoint, resulting in duplicate ListItems, and confirmed using Fiddler.
I can only assume something is wrong on the SQL Server, no idea how to fix this.
Ideas?

Just confirmed that this is a problem in SharePoint Online as well, but with different results.
Creating the RESTful URL return the first 10 ListItems as expected:
...-public.sharepoint.com/_api/web/Lists(guid'57d26Aeb-7ab3-45c3-a96b-a6c8ed2aea58')/Items?top=10&$select=Title,Year,Quarter&orderby=Year,Quarter
Now using the __next URL returned for the REST query above:
...-public.sharepoint.com/_api/web/Lists(guid'57d26Aeb-7ab3-45c3-a96b-a6c8ed2aea58')/Items?%24skiptoken=Paged%3dTRUE%26p_ID%3d10&%24top=10&%24select=Title%2cYear%2cQuarter&orderby=Year%2cQuarter
This returns more than 10 more items and with more fields than specified in the '$select' and also includes duplicates from the first query, so actually SharePoint Online is a worse result then the SharePoint on-premise; which returns specified fields and
length just with duplicate ListItems.
To Repro create a custom list:
Title,Year,Quarter
A,2000,Q1
1,2000,Q1
B,2000,Q2
2,2000,Q2
and many more, and execute REST query then use the __next URL returned, and bad thing happen.
Sickening SharePoint still doesn't work after all these years.
Madness.

Similar Messages

  • Pulling user/group field data from SharePoint list using REST, jQuery, Knockout.js Sharepoint 2013

    I'm trying to make an interactive task board based on the task list app in SharePoint 2013. The task lisk includes fields like "Title","Description","Status","% Complete","Due Date","Assigned To",
    etc. I used knockout.js to bind "Title","Description", and "Status" to my HTML controls. Here is some of the code:
    var ViewModal = function(items, listname){
    var self = this;
    self.sortBy = ko.observableArray(sortBy);
    self.tasks = ko.observableArray(items);
    self.listname = ko.observable(listname);
    self.auto = ko.observable(false);
    self.getTasks = function() {
    clearTimeout(self.getTasks);
    // server relative url to REST service endpoint
    var ajaxurl = _spPageContextInfo.webServerRelativeUrl + "/_vti_bin/listdata.svc/" + self.listname() + "?$orderby=PriorityValue";
    $.ajax({
    type: "GET",
    url: ajaxurl,
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    cache: false,
    processData: true,
    success: function (data, status, xhr) {
    if (status == "success" && data) {
    ko.mapping.fromJS(data.d.results, mapping, self.tasks)
    $(".task-item").draggable();
    error: alert
    if (self.auto()) {
    setTimeout(self.getTasks, 10000);
    <div class="tasks-column">
    <div class="column-header">Not Started</div>
    <!-- ko foreach: tasksNotStarted -->
    <div class="task-item">
    <div class="view" data-bind="visible: !IsEditing()">
    <button class="edit" data-bind="click: $root.editTask">edit</button>
    <h2><span data-bind="text: Title"></span></h2>
    <div data-bind="html: Description"></div>
    <span data-bind="text: PriorityValue"></span>
    </div>
    <div class="edit" data-bind="visible: IsEditing">
    <button class="save" data-bind="click: $root.saveTask">save</button>
    <input type="text" data-bind="value: Title"></input>
    </div>
    </div>
    I'm having trouble displaying the data from the "Assigned To" user/group field. I tried:
    <span data-bind="text: AssignedTo"></span>
    But it displays the field as [object Object]
    I tried using $select/$expand
    ?$select=Title,AssignedTo/Id,Assignedto/Title&$expand=AssignedTo/Id,AssignedTo/T‌​itle";
    But it still returns the [object Object]

    Hi,
    Please use the REST URI below:
    /_api/lists/getbytitle('ListName')/items?$select=Title,AssignedTo/ID,AssignedTo/Title&$expand=AssignedTo/ID,AssignedTo/Title
    More information for your reference:
    How to get User Details and User Group Details in SharePoint 2013 REST API with Knockout for SharePoint Js (KoSpJs)
    http://www.ashokraja.me/post/How-to-get-User-Details-and-User-Group-Details-in-SharePoint-2013-REST-API-with-Knockout-for-SharePoint-Js-(KoSpJs).aspx
    How to Get Login Name and Display Name using SharePoint 2013 REST API
    https://www.nothingbutsharepoint.com/sites/devwiki/articles/pages/how-to-get-login-name-and-display-name-using-sharepoint-2013-rest-api.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to set username and password before redirecting to a RESTful webservice

    I am a .Net developer who has developed a webservice used by my ColdFusion colleagues. They are using ColdFusion 9 but I'm not sure if they have incorporated any of the newer features of ColdFusion in their apps. Here is a snippet of how they have been invoking the webmethods:
    <cfscript>
                         ws = CreateObject("webservice", "#qTrim.webServiceName#");
                         ws.setUsername("#qTrim.trimAcct#");
                         ws.setPassword("#qTrim.trimpwd#");
                         wsString=ws.UploadFileCF("#qTrim.webserviceurl#","#objBinaryData#", "#qFiles.Filename#", "Document", "#MetaData#");
                </cfscript>
    As I understand things, the .setUsername and .setPassword correspond to the Windows credentials the CF Admin set when the URL of the .Net webservice was "registered" and given its "name" (for the CreateObject statement above). I have 4 webmethods that are all invoked in this manner and this SOAP protocol works adequately for us. Please note that this ColdFusion web app authenticates anonymous remote internet users by prompting for a username and password and compares them to an application database (i.e. Microsoft calls this "forms authentication"). Because only a few Windows domain accounts are authorized to call this .Net webservice, the above code always uses the same username/password constants and it all works.
    My question involves the newest webmethod added to the .Net webservice. It requires that callers must invoke it as a RESTful service which means it must be invoked by its URL. Here is a snippet of C# code that invokes it from an ASP.NET webclient:
                string r = txtRecordNumber.Text;
                string baseurl = "http://localhost/sdkTrimFileServiceASMX/FileService.asmx/DownloadFileCF?";
                StringBuilder url = new StringBuilder(baseurl);
                url.Append("trimURL="); url.Append(txtFakeURLParm.Text);
                url.Append("&");
                url.Append("TrimRecordNumber="); url.Append(txtRecordNumber.Text);
                Response.Redirect(url.ToString());
    I assume a ColdFusion script could easily build a full URL as above with appended querystring parameters and redirect. Is there some way for the CF code redirecting to a RESTful webservice (by way of its URL) to set the Username and Password to this Windows account mentioned above? When the DownloadFileCF webmethod is hit it must be with the credentials of this special Windows domain account. Can that be set by ColdFusion someway to mimic the result of the SOAP technique (the first snippet above).
    I hope my question is clear and someone can help me make suggestions to my ColdFusion colleagues. Thanks.

    Can you clarify what you mean by "establish a different Windows identity"?  Usually passing identity to a web site or service means adding something to the request's HTTP headers.  This could be a cookie in the case of .NET forms authentication or the "Authorization" header in the case of basic authentication.
    The SOAP web service invocation code you posted does use basic authentication, according to the CF docs "ColdFusion inserts the user name/password string in the authorization request header as a base64 binary encoded string, with a colon separating the user name and password. This method of passing the user name/password is compatible with the HTTP basic authentication mechanism used by web servers."
    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec13a13 -7fe0.html
    If you need to mimic the SOAP techinque you should have basic authentication enabled for your REST service endpoints.
    If your authentication method is different then CF developers will need to add the appropriate HTTP headers to their service calls.  Note that calling a REST service from CF would probably be accomplished using the CFHTTP tag if the service is designed to be consumed by the CF server.

  • Unable to invoke endpoint uri : 415 unsupported media type

    Hi all,
    I'm trying to invoke a HTTP Binding with POST where the endpoint is a RESTFUL webservice that takes in an XML message and sends an email.
    I'm using JDeveloper 11g to create the composite where it'll have an exposed HTTP Binding POST and an external reference which is also a HTTP Binding POST that calls a RESTFUL Webservice endpoint . In the BPEL process, i'm just doing a simple receive from the exposed HTTP Binding and then using the input to invoke the External References HTTP Binding.  However, I'm always getting an error at the invoke phase :
    <part  name="summary">
    <summary>oracle.fabric.common.FabricInvocationException: Unable to invoke endpoint URI "http://xxxxxxxxx/xxxx/xxxx/sendEmail" successfully due to: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 415 Unsupported Media Type from url http://xxxxxxxxx/xxxx/xxxx/sendEmail</summary> 
    </part>
    <part  name="detail">
    <detail>Unable to invoke endpoint URI "http://xxxxxxxxx/xxxx/xxxx/sendEmail" successfully due to: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 415 Unsupported Media Type from url http://xxxxxxxxx/xxxx/xxxx/sendEmail</detail> 
    </part>
    <part  name="code">
    <code>415</code> 
    </part>
    I'm guessing that it's because my payload is lacking the HTTP header content-type : application/xml. The webservice endpoint itself is working fine as I'm able to test it through other means such as POSTMan and soapUI.
    Is there a way to set the HTTP header content-type of the payload? Is there anyway to check or verify? Any help would be greatly appreciated.
    Regards,
    Mark

    Hi all,
    I'm trying to invoke a HTTP Binding with POST where the endpoint is a RESTFUL webservice that takes in an XML message and sends an email.
    I'm using JDeveloper 11g to create the composite where it'll have an exposed HTTP Binding POST and an external reference which is also a HTTP Binding POST that calls a RESTFUL Webservice endpoint . In the BPEL process, i'm just doing a simple receive from the exposed HTTP Binding and then using the input to invoke the External References HTTP Binding.  However, I'm always getting an error at the invoke phase :
    <part  name="summary">
    <summary>oracle.fabric.common.FabricInvocationException: Unable to invoke endpoint URI "http://xxxxxxxxx/xxxx/xxxx/sendEmail" successfully due to: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 415 Unsupported Media Type from url http://xxxxxxxxx/xxxx/xxxx/sendEmail</summary> 
    </part>
    <part  name="detail">
    <detail>Unable to invoke endpoint URI "http://xxxxxxxxx/xxxx/xxxx/sendEmail" successfully due to: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 415 Unsupported Media Type from url http://xxxxxxxxx/xxxx/xxxx/sendEmail</detail> 
    </part>
    <part  name="code">
    <code>415</code> 
    </part>
    I'm guessing that it's because my payload is lacking the HTTP header content-type : application/xml. The webservice endpoint itself is working fine as I'm able to test it through other means such as POSTMan and soapUI.
    Is there a way to set the HTTP header content-type of the payload? Is there anyway to check or verify? Any help would be greatly appreciated.
    Regards,
    Mark

  • How to POST the data though Rest services though composite object.

    I am new to REST services.
    I need to write REST Serivices to post(Update) the data using Composite object.
    I created the structure to pass the composite object from jquery to the REST services.
    How can i handle that composite object in REST Services URITemplate and interface methods.
    can i have sample code to handle the composite object in REST Services?
    Thanks in advance.

    Did you check this post?
    http://sharepoint.stackexchange.com/questions/25222/posting-json-to-a-rest-wcf-endpoint-in-sharepoint-using-cksdev
    --Cheers

  • Data Centers URL through Rest API

    Hi All,
    Below is the set of question:
    Is hitting the API https://login.eloqua.com/id is the only way to get the endpoint specific to User?
    Does the endpoint remains same every time or it changes?
    Suppose I have purchased the license. The license is valid for 10 user. Do the endpoints will differ for the 10 users?
    Awaiting your response.
    Thanks in advance.
    Regards
    Brajmohan

    Hi,
    According to your description, you want to delete a group in Yammer using the REST API endpoint of Yammer.
    As it is more relate to Yammer development, it would be more appropriate to ask for help in the corresponding forum, you will get more help and confirmed answers there:
    http://community.office365.com/en-us/w/yammer/default.aspx
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to join multiple REST Api responses to one single response.

    Hi Team,
    I have a form with 3 drop downs. I need to fill these dropdowns with data from 3 different lists.
    For fetching the data from lists I have to use REST api.
    Is it any way for fetching the data together(to join multiple responses) and get one response from server side ?
    Thanks in advance for ur time and help :)
    Reshma

    Hi Reshma,
    According to your description, you want to get items from three different lists in one request using REST API.
    Within the exposed REST API endpoints, there seems no such API can support to retrieve data from different lists in one request currently.
    If it is an on premises environment, a workaround I can provide is that you can create custom WCF web service in the server side to gather data from the three lists,
    then call this service in your code to fetch the data you need, in this way, you will need only one request to the server.
    If it is an online environment, custom WCF web service won’t be an option, a possible workaround is that you can gather the data needed from the three lists to an
    extra list using workflow, then access this extra list using REST API, it will reduce the number of the requests from the client side.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Sharepoint 2013 REST API calls with JASONP support

    We are working on sharepoint online integration with PHP Based application. We need to provide REST API call which supports JSONP.
    So is it possible to create new REST API Endpoints in Sharepoint online APP? Please sugggest right direction.

    Hi,
    In Office 365 (aka SharePoint Online), you can simply consume the SharePoint data through REST API or WS call,but cannot create your own endpoint.
    By default you can get the JSON response from the Office 365 REST API,its upto you to use the JSONP on your client compatibility not on SharePoint online REST API.
    Sometime before I tried, It didn't work for me.
    If you develop the AppModel, SPRequestor.js does the same job(overcome the Cross domain restriction) the what JSONP does.
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • Delete Yammer Group through REST API

    Hi All,
    Is there any REST API from yammer which enables us to delete Yammer groups. We would just have to pass groupid(s) to the rest api url and my yammer groups should get deleted.
    I tried googling but could not find any. except these: https://www.yammer.com/api/v1/group_memberships.json?group_id=:4309911 which just deletes user from a group. Is there any rest api to delete the group itself ?
    Thanks in advance.
    Regards,
    Subhash S.

    Hi,
    According to your description, you want to delete a group in Yammer using the REST API endpoint of Yammer.
    As it is more relate to Yammer development, it would be more appropriate to ask for help in the corresponding forum, you will get more help and confirmed answers there:
    http://community.office365.com/en-us/w/yammer/default.aspx
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • User profile in SharePoint workflow

    User profiles can be used to fetch the user Manager, department, Title in SharePoint designer workflows.
    This is not available in SharePoint 2013 workflow. However i can create 2010 workflow in SP2013 Sites, is there any way to get the user information from SharePoint 2013 workflow or Sharepoint 2013 in general to fetch the user details from Active Directory
    to use in Sharepoint Online/O365.

    Hi,
    In addition to using Workflow Custom Activity to get User Profile properties, you could try using REST API web service. Please refer to Rajkumar's step in the thread below:
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/7b1474b3-8ced-416a-a9b5-97e6ba05788e/getting-manager-name-from-spuserprofilespeoplemanager-rest-api-using-sharepoint-designer-workflow?forum=sharepointdevelopment
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/027ac79a-12da-4951-acd0-e06afe4d6ee6/get-the-department-of-a-user-in-workflow-2013
    More reference for REST API endpoints:
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Probably a stupid question about cropping a video..

    OK, so I shot an interview with a black background and once I went to edit it, I noticed a red object in the far right corner. Is there a way I can add black over this object or crop it out? I know this is a stupid question, but I'm new to video and editing in general so I thought it wouldn't hurt to ask.

    There are several ways to accomplish what you want.
    KGCW has talked about the Crop Effect.
    Depending on exactly where the object is, and whether the camera was locked down, it might be possible to duplicate your Clip, place it above your initial Clip, then offset it a bit (Motion>Position), with the Fixed Effect>Motion>Position, and then apply the Garbage Matte to that offset duplicate, effectively Cropping out everything, but a small "patch" from the existing background. Note: if the edges of that Garbage Matte are too hard for you, you could create a soft-edged Track Matte, and use that to hold out the rest of the offset duplicate.
    Another method, and depending on where, and how large the offending item is, would be to go to the Fixed Effect>Motion, and use Motion>Scale to increase the size of the Clip (do not do too much Scale, or quality will suffer). You might also need to do a bit of Motion>Position, to get that red object behind the Video's Frame Size. This will effectively Crop the object.
    Good luck,
    Hunt

  • Probably a stupid question about Date

    Hi.
    I am struggeling with something that should be an easy task, but I can't seem to get it right.
    I want to extract a date from a view object, add a number of days to the date, and compare it with todays date.
    This is what I try to do:
    Date today = (Date)oracle.jbo.domain.Date.getCurrentDate();
    Date published = null;
    int days = currThing.getExpirenumber().intValue();
    expires = currThing.getPublishdate();
    expires.addJulianDays(days,0);
    switch (expires.compareTo(today)){
    case -1: return true;
    case 0: return true;
    case 1: return false;
    his code compiles, but when I run it I get an java.sql.SQLException: Unimplemented method called
    What am I doing wrong here ??
    Is there another way to do this ?
    Morten
    null

    There are several ways to accomplish what you want.
    KGCW has talked about the Crop Effect.
    Depending on exactly where the object is, and whether the camera was locked down, it might be possible to duplicate your Clip, place it above your initial Clip, then offset it a bit (Motion>Position), with the Fixed Effect>Motion>Position, and then apply the Garbage Matte to that offset duplicate, effectively Cropping out everything, but a small "patch" from the existing background. Note: if the edges of that Garbage Matte are too hard for you, you could create a soft-edged Track Matte, and use that to hold out the rest of the offset duplicate.
    Another method, and depending on where, and how large the offending item is, would be to go to the Fixed Effect>Motion, and use Motion>Scale to increase the size of the Clip (do not do too much Scale, or quality will suffer). You might also need to do a bit of Motion>Position, to get that red object behind the Video's Frame Size. This will effectively Crop the object.
    Good luck,
    Hunt

  • Change Color for metal furnitures

    Newbie here....I need some advices. Currently I'm designing a laptop cover that comes with a default black glossy color and I want to change it to red, blue, green, pink, and some other finishes. I want to keep the existing glare and surface lighting. How can I do that in Photoshop CS3?

    G'day
    Try the following, it will vary greatly with the colour you choose!
    Select the element you want to recolour.
    Then:
    Image > adjust > desaturate (this layer sits above the rest of the image)
    Duplicate this desaturated layer twice.
    Go to the bottom desaturated layer..
    Choose Layer- New Fill Layer- Solid Colour..
    In the new layer dialog box check - use previous layer to create clipping mask - and set blend mode to Hard Light,
    click OK to access colour picker and choose the colour you want.
    Go to the next (middle) desaturated layer and set its blend mode to Overlay
    Go to top desaturated layer and also set its blend mode to overlay and hide (turn off) this layer and see if you like the results? if not you can then use the top layer at a lower opacity to fine tune the result.
    I get varying results with this and it seems to depend on the shadow/highlight detail.
    Also you can click on the colour adjustment layer colour thumbnail at any time to access the colour picker and change the colour. When I chose a pure red it looked terrible but a more muted red worked!
    regards
    John

  • Query Suggestions with -Level SPSite or SPWeb, how to retreive results?

    I can see the results on powershell window if I pass -Level with Owner object in below command, but how can i see same results with _api suggest query?
    Get-SPEnterpriseSearchQuerySuggestionCandidates -SearchApplication $searchapp -Owner $owner

    Hi Ramana,
    Based on the list of parameters for the search rest api in the following article, there is no similar/same function as cmdlet used available for rest service endpoint _api/search/suggest, so, we are unable to use it
    via _api suggest query currently.
    https://msdn.microsoft.com/EN-US/library/office/dn194079.aspx
    http://blogs.msdn.com/b/nadeemis/archive/2012/08/24/sharepoint-2013-search-rest-api.aspx
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Slow file transfer to Azure File Service

    File transfer to Azure File Service (Beta) is very slow. Is this something that will be solved, or is there a trick to this? 
    Sean

    Yes. Pretty sure. 
    Based on MSDN Blogs > Microsoft Azure Storage Team Blog > Introducing Microsoft Azure File Service
    Description
    Azure Blobs
    Azure Files
    Durability 
    Options
    LRS, ZRS, GRS (and RA-GRS for higher availability)
    LRS, GRS
    Accessibility
    REST APIs
    SMB 2.1 (standard file system APIs) 
    REST APIs
    Connectivity
    REST – Worldwide
    SMB 2.1 - Within region 
    REST – Worldwide
    Endpoints
    http://myaccount.blob.core.windows.net/mycontainer/myblob
    \\myaccount.file.core.windows.net\myshare\myfile.txt http://myaccount.file.core.windows.net/myshare/myfile.txt
    Directories
    Flat namespace however prefix listing can simulate virtual directories
    True directory objects
    Case Sensitivity of Names
    Case sensitive
    Case insensitive, but case preserving
    Capacity
    Up to 500TB containers
    5TB file shares
    Throughput
    Up to 60 MB/s per blob
    Up to 60 MB/s per share
    Object size
    Up to 1 TB/blob
    Up to 1 TB/file
    Billed capacity
    Based on bytes written
    Based on file size
    Regards

Maybe you are looking for

  • Write a String in File

    Hi All, I want to write a string into a file, and I wrote the following code. package fileoperations; import java.io.*; class FileWriterDemo {      public static void main(String args[]) throws Exception {           String source = "Now is the time f

  • Barcode Reading at the time of MIGO

    Hi all, My requirenment is to read the serial no's from a text file genarated by Barcode reader and pass it to screen field in  MIGO at the time of Goods receipt. Is there any Exit/BADI for this. The text file contians Material no and serial no of th

  • Grid control agent and data guard in mount mode

    Hello, I would like to know how you manage your data guards when you do not have the license for active data guard with the grid control agents. The standby database is in mount mode, so the agents cannot query the database. What do you guys do in su

  • Cannot select Digital output for ZS 2 Noteb

    Hi, I just got an Audigy 2 ZS Notebook card today, installed it, seems to work, but I also got these 5. headphones... The headphones can be plugged in either from the 3 Analog outputs from the card's docking station, or a single /8" cord, which I ass

  • I am new to Verizon and cannot send pic msgs to Att

    I Am trying to send important Daily pics to ATT phones and none of them are getting the pics;Only others people w/ different Carriers. I didn't have this issue w/ last provider and I work tech support, so I know it's not a device issue.