cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

I try to Send HTTP request for sharepoint for DELETE files it gives 400 error.

I try to Send HTTP request for sharepoint for DELETE files using _api/web/getFileByServerRelativeUrl('/Temp Directory/NewIssue.png') consuming this api it shows error 

productionIssue.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @Anonymous,

 

Have you tried removing the "/" in front of the Temp Directory, and your configuration adds a slash to the relative path of the original file.

Like: _api/web/GetFileByServerRelativeUrl('Temp Directory/NewIssue.png')

Or you could configure the full path, which is relatively more, but it can also be useful.

9.PNG18.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-bacao-msft
Community Support
Community Support

Hi @Anonymous,

 

Have you tried removing the "/" in front of the Temp Directory, and your configuration adds a slash to the relative path of the original file.

Like: _api/web/GetFileByServerRelativeUrl('Temp Directory/NewIssue.png')

Or you could configure the full path, which is relatively more, but it can also be useful.

9.PNG18.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,462)