question

PabloGlomby-5415 avatar image
0 Votes"
PabloGlomby-5415 asked PabloGlomby-5415 commented

CreateCopyJobs SharePoint REST API and delays (throttled?)

Hi!
I am playing with the CreateCopyJobs REST endpoint to copy files between OneDrive for Business and SharePoint Online.
I did some tests with 400 MB files and after copying for example 10 files I see that it takes several minutes (it is queued with JobState=2 but it does not start until 3 or 5 minutes passes), while in normal situations it may take few seconds.
I am not always able to reproduce it... only sometimes.

I was wondering if there is a documentation that speaks about limitations on this API like getting throttled, or if there is a fixed number of queues.
Do you know how this is internally performed? Because I want the copy to be almost immediate (I can understand that the larger the file is, the more seconds it will take) but if it takes minutes to start then it is a problem.

Thanks

office-sharepoint-onlinesharepoint-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RaytheonXie-MSFT avatar image
0 Votes"
RaytheonXie-MSFT answered PabloGlomby-5415 commented

Hi @PabloGlomby-5415 ,
I have tested following code and it takes several seconds to copy a 300 MB file to another folder
127572-sample.txt
Please take following link as reference to limitations.
https://docs.microsoft.com/en-us/sharepoint/dev/apis/spod-copy-move-api


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



sample.txt (2.5 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi!
Thanks but in your case you use CSOM and in the documentation it says this API is deprecated.
I am using the REST API that is what is used when you manually copy a file in www.office.com
The limitations are not applied when using the REST API (I tested copying a file with more than for example 15 GB and it is OK).
My question is if there is a documentation on how the internal queue works when using the REST API. I am a developer and the product will be used in different organizations.
So maybe in our labs the time may be acceptable but in a real organization with plenty of users it may not if the queue is full for example.

Thanks again.

0 Votes 0 ·