cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarcoS
Level: Powered On

Checkout file on Sharepoint with HTTP request

Hi,

 

I am trying to checkout a file on Sharepoint with a HTTP request:

 

2019-08-29 09_45_08-Window.jpg

 

When I try to run the Flow, I get the error: "Specified value is not supported for the serverRelativeUrl parameter"

 

The path 'Features/test.xlsx' should be correct. If I look at the file in Sharepoint I see the URL:

 

https://**site**.sharepoint.com/sites/ertlsrvts04/04/Features/test.xlsx

 

I hope somebody can help

 

Thanks,

 

Marco

 

 

16 REPLIES 16
Super User
Super User

Re: Checkout file on Sharepoint with HTTP request

Hi @MarcoS 

 

Try _api/web/getFileByServerRelativeUrl('Features/test.xlsx')/checkout()

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



MarcoS
Level: Powered On

Re: Checkout file on Sharepoint with HTTP request

No the same problem.

Super User
Super User

Re: Checkout file on Sharepoint with HTTP request

Hi @MarcoS ,

 

Try CheckOut(). It's case sensitive.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



MarcoS
Level: Powered On

Re: Checkout file on Sharepoint with HTTP request

Nop is also not working.

Super User
Super User

Re: Checkout file on Sharepoint with HTTP request

Hi @MarcoS 

 

I did tested this and worked for me.

 

lib1.png

 

Here /aj/ is my document library name.

In your case _api/web/getFileByServerRelativeUrl('/Features/test.xlsx')/CheckOut()

 

Try this and let me know.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



MarcoS
Level: Powered On

Re: Checkout file on Sharepoint with HTTP request

Now I get the error:

 

Server relative urls must start with SPWeb.ServerRelativeUrl\r\nclientRequestId: c617ebf7-4122-4cc9-91a8-ddf4bfd11561\r\nserviceRequestId: c2f4fe9e-a057-9000-3031-ad6ec9236ca9
Super User
Super User

Re: Checkout file on Sharepoint with HTTP request

Hi @MarcoS 

 

Features is your document library? Also could you please post your flow screenshot again.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



MarcoS
Level: Powered On

Re: Checkout file on Sharepoint with HTTP request

Yes Features is my document library

 

2019-08-29 15_12_48-Window.png2019-08-29 15_11_01-Window.png

Super User
Super User

Re: Checkout file on Sharepoint with HTTP request

Hi @MarcoS 

 

Thanks for the reply.

 

I can see from the site address you have site address with sites/ertlsrvts04/04

May I ask you what is ertlsrvts04 and 04?

 

This is something to do with that Uri which is not right at the moment.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



MarcoS
Level: Powered On

Re: Checkout file on Sharepoint with HTTP request

Hi,

 

I don't know where that URL stands for but it is working. if change the URL I also get a warning that it cannot find the website. So this is correct. I can also see this URL when I go the properties of a file on that Sharepoint environment.

 

Thanks.

Super User
Super User

Re: Checkout file on Sharepoint with HTTP request

Hi @MarcoS 

 

What I meant is ertlsrvts04  is a sitecollection? Also what is 04? Is that another subsite?

 

If you could explain the above then I could recreate in my environment and see what the issue is.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Community Support Team
Community Support Team

Re: Checkout file on Sharepoint with HTTP request

 

Hi @MarcoS ,

 

Have you tried to use Check out file action?

80.PNG

 

Best Regards,

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.
MarcoS
Level: Powered On

Re: Checkout file on Sharepoint with HTTP request

I tried to configure it but is asks for an ID. It is not possible to just select a file on Sharepoint?

MarcoS
Level: Powered On

Re: Checkout file on Sharepoint with HTTP request

Hi,

 

Ertlsrvts04 is sitecollection

04 is a subsite

 

Greets,

 

Marco

Super User
Super User

Re: Checkout file on Sharepoint with HTTP request

Hi @MarcoS 

 

Thanks @v-bacao-msft  for pointing out the checkout action.

 

@MarcoS  please follow the below steps.

 

I have created a sitecollection called ajteamsite and subsite as 04. Then created a document library called Features.

 

r1.png

 

Test Result

r2.png

 

Here is the SharePoint checkout file

r3.png

 

 

 

If you need further help please let me know.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



MarcoS
Level: Powered On

Re: Checkout file on Sharepoint with HTTP request

Hi,

 

Yes this works perfectly if I use a hardcoded path to the file. 

The path to the file is:

 

/WerkdocumentenCI/A_PROJECTEN_MARCO/Workforcetotaalnieuweopzet_excel 2019-09-02.xlsx

 

The strange this is that when I use a variable with the exact same path as above in it, it doesnt work. I get an error:

 

2019-09-02 09_50_14-Window.png

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,077)