Azure File Service REST API(rename)

Chih-Hao Huang 1 Reputation point

Followed this document to send rename request.
But it didn't work.
Also in the document, the header x-ms-file-rename-source:name seems a typo.
Send request with this header will get 403.

Send request with header x-ms-file-rename-source-name will pass authorization but will get
InternalError (500): Server encountered an internal error. Please try again after some time.

I am using SharedKey authentication. Other requests like get file or set metadata works fine.
I suppose there is something wrong with the API endpoint.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,201 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Konshin, Alex 6 Reputation points

    I have finally solved the problem by looking at sources of Azure API Java SDK

    It is just purely documented x-ms-file-rename-source. In the sources we can see that the value should be "the URI-style path of the source file, up to 2 KB in length."
    In caseof SAS authentication the URI should include SAS token as well.

    This must be written in the documentation for Rename File request in REST API documentation! The current page contains very confusing explanation and has no any examples.

    1 person found this answer helpful.