Rest API available for Azure DataLake Gen2. the documentation is here. Does anyone have examples for the postman or anything like that?
Asked
Active
Viewed 2,371 times
1 Answers
3
Append is in two stages using this Path - Update API.
You first need to call the action=append to push it to the uncommitted buffer on the server e.g.
https://$STORAGE_ACCOUNT_NAME.dfs.core.windows.net/mydata/data/file1?action=append&position=0
Remember to pass the mandatory Authorisation, x-ms-version, x-ms-date and Content-Length Headers and the data that you want to append into the body of the request.
Once you have received the 202 Accepted you can then call the action=flush and pass the position that you want the data to be flushed to e.g.
https://$STORAGE_ACCOUNT_NAME.dfs.core.windows.net/mydata/data/file1?action=flush&position=13
Hope this helps.

TSambrook
- 48
- 5
-
Thank you ! Do you know how to use the position parameter properly ? Microsoft's description one really confusing. – Toàn Thành Nguyễn Mar 13 '19 at 02:18
-
Not an expert on it but the way I got it to work on a new file was to set the flush position to be the length of bytes of the Content-Length from the append call. If you dig up any more information I would be interested to hear it. – TSambrook Mar 13 '19 at 08:54
-
Remember you can also use SAS instead of authorization headers - much less mess (at least for testing purposes). – psfinaki Mar 29 '19 at 10:56