Hello
I was trying to use deleteExtract function to delete extract from workbooks located on the server.
When I was trying to launch it was constantly sending 500 Internal Server error.
I checked source code of the function as well as rest API documentation for this http request, and found out that XML body is not correct in library for this function. It does not include "includeall = TRUE" parameter in it.
So I modified source code of the function to have this:
def delete_extract(self, workbook_item):id_ = getattr(workbook_item, "id", workbook_item)url = "{0}/{1}/deleteExtract".format(self.baseurl, id_)includeAll = Truedatasources = Nonedatasource_req = RequestFactory.Workbook.embedded_extract_req(includeAll, datasources)#empty_req = RequestFactory.Empty.empty_req()server_response = self.post_request(url, datasource_req)
So after modifying this code, I was able to launch the functions successfully.
But
It was completed without an error only for 30% of workbooks, for most of them it thrown an error:
409080: Bad Request There was a problem deleting extract for workbook 'bf4ae00f-6570-4867-800c-625965e3731b'.
Hello I was trying to use deleteExtract function to delete extract from workbooks located on the server. When I was trying to launch it was constantly sending 500 Internal Server error.
I checked source code of the function as well as rest API documentation for this http request, and found out that XML body is not correct in library for this function. It does not include "includeall = TRUE" parameter in it.
So I modified source code of the function to have this:
def delete_extract(self, workbook_item):
id_ = getattr(workbook_item, "id", workbook_item)
url = "{0}/{1}/deleteExtract".format(self.baseurl, id_)
includeAll = True
datasources = None
datasource_req = RequestFactory.Workbook.embedded_extract_req(includeAll, datasources)
#empty_req = RequestFactory.Empty.empty_req()
server_response = self.post_request(url, datasource_req)
So after modifying this code, I was able to launch the functions successfully.
But It was completed without an error only for 30% of workbooks, for most of them it thrown an error:
409080: Bad Request There was a problem deleting extract for workbook 'bf4ae00f-6570-4867-800c-625965e3731b'.