0

I have a List that I have been tasked with creating. The idea is to make a "Master View" that joins several other lists from the same site into one. It is my understanding that it is no possible to do this directly, like one would in a SQL db. So my current idea is to download the lists to python with pandas, merge the lists on the lookup columns I put in them, and push the data to a new list. It's a bit wonky, but it should get the job done.

The issue here is that, after the joins, I've got nearly 18K records. I don't think added that many records will be a huge deal, as I have a pretty good function to setup batch posts to ListData.svc, but the Delete requests to ListData.svc seem to take forever for some reason; even after being batched 100 at a time. In the past, I've downloaded the data from both sources and used some sort of index to determine which rows should be updated, deleted, or added. There aren't many good ways I could go about making an index with this particular dataset.

So my idea now is to delete the list itself and recreate it with a template. The only issue is that I can't seem to find a way to do this with the 2010 REST services. I tried sending a Delete request to <site url>/_vti_bin/ListData.svc/<list name> but got a 405 Method Not Allowed in response. Even if I got that to work, I don't know how to create a new list from a template with that service.

Questions

  1. Is it even possible to delete a whole list from the 2010 REST API (without JS) and if so how?
  2. How does one go about creating a list from a template with the same API?
0

Did you send the request as a POST or DELETE, not just a GET?

For 2013 REST API I had to send a delete request as a POST with "DELETE" in the header:

url: http://site url/_api/web/lists(guid'list GUID')​
method: POST​
Headers: ​
    X-RequestDigest: form digest value​
    IF-MATCH: etag or "*"​
    X-HTTP-Method: DELETE
  • It was initially a DELETE request. I just tried it again as a POST with a DELETE header as you have here and I got the same 405 error. – Eric Ed Lohmar Mar 13 '18 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.