cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ianhall1892
Resolver I
Resolver I

Send HTTP request to Sharepoint versions

Hi,

I'm following a post to get the last version of an item using the send HTTP task as per April Dunnam YouTube video.  https://www.youtube.com/watch?v=DT6BpixFbHY.

I cant get the version bit to work of the API call to work. Any tips welcome.

 
 

Ianhall1892_0-1634575077491.png

 

"status"400,
  "message""Input string was not in a correct format.\r\nclientRequestId: 070256ab-a463-4850-b5a7-1badf3ebf090\r\nserviceRequestId: 7366fa9f-b0d0-3000-52eb-0ce96cc95952",
  "errors": [
1 ACCEPTED SOLUTION

Accepted Solutions
Ianhall1892
Resolver I
Resolver I

Hi this is the correct format to get the last version 

_api/web/lists/getByTitle(‘list name’)/items(@{triggerOutputs()?[‘body/ID’]})/versions(@{outputs(‘Get_changes_for_an_item_or_a_file_(properties_only)’)?[‘body/SinceVersionId’]
}) 

View solution in original post

3 REPLIES 3
MarvinBangert
Super User
Super User

Hey @Ianhall1892 

what is in your "since Version ..." dynamic value? Where does it comes from?

In the "../versions()" function, you should add the VersionId. Can you try using hard coded IDs like 512 or 1024?

 

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

v-bofeng-msft
Community Support
Community Support

Hi @Ianhall1892 :

I've made a test bud did not encountered the problem you mentioned could you please show me:

vbofengmsft_0-1634623282979.png

 

1\The run history of the 'Send a HTTP request to SharePoint' action

2\Complete error message

 

vbofengmsft_1-1634623342887.png

In addition, you can directly use this URL to get all versions, and then just add a filter action to filter its results.

_api/web/lists/GetByTitle('TableName')/items(ItemID)/Versions

Best Regards,

Bof

 

Ianhall1892
Resolver I
Resolver I

Hi this is the correct format to get the last version 

_api/web/lists/getByTitle(‘list name’)/items(@{triggerOutputs()?[‘body/ID’]})/versions(@{outputs(‘Get_changes_for_an_item_or_a_file_(properties_only)’)?[‘body/SinceVersionId’]
}) 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,487)