Skip to main content

Notifications

Power Automate - Building Flows
Answered

HTTP call to create content on existing WIKI page

Like (0) ShareShare
ReportReport
Posted on 13 Mar 2024 12:54:50 by 1,304

Hey,

 

I am trying to create some content on an ADO wiki page via an HTTP connector:

 

Jondoesflow_0-1710334414852.png

 

The projectID and wiki name is coming from a previous GET HTTP call.  That seems to be working.

 

Password is my PAT Token.

 

When this step runs I get this error:

 

Parameter 'versions & newName' cannot be null or empty.
Parameter name: versions & newName

 

I have tried so many different things, but all coming back no go, any ideas?

Thanks,

Jon

  • JonDoesFlow Profile Picture
    JonDoesFlow 1,304 on 18 Mar 2024 at 13:25:09
    Re: HTTP call to create content on existing WIKI page

    Thanks @Expiscornovus I actually got to the same conclusion as you in the end, but this is exactly what I did, so marking it as accepted solution.

  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 31,017 on 18 Mar 2024 at 12:17:21
    Re: HTTP call to create content on existing WIKI page

    Hi @Jondoesflow,


    As far as I am aware that PATCH request requires an additional key/value in the headers section. You can use the eTag of your first request for the value of that key.

    https://learn.microsoft.com/en-us/rest/api/azure/devops/wiki/pages/update?view=azure-devops-rest-7.1&tabs=HTTP#request-headers

     

    Below is an example how you can set that up.

     

    1. A GET request which retrieves page with ID 1

     

    getwikipagebyid.png

     

    2. The PATCH of that page, which uses the below expression for the If-Match key

    outputs('HTTP_-_Get_Wiki_Page_by_Id')['headers']['eTag']

     

    updatewikipagecontent_http.png

     

    I have also written this up as a blog btw:

    https://www.expiscornovus.com/2024/03/18/azure-devops-update-wiki-page-content/

     

     

    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,367

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,297

Leaderboard
Loading started
Loading complete