Hi,
I am trying to update a Document Library name/title via the HTTP Request following the Working with lists and list items with REST | Microsoft Docs
POST https://{site_url}/_api/web/lists(guid'{list_guid}')
Authorization: "Bearer " + accessToken
Accept: "application/json;odata=verbose"
Content-Type: "application/json"
Content-Length: {length of request body as integer}
If-Match: "{etag or *}"
X-HTTP-Method: "MERGE"
X-RequestDigest: "{form_digest_value}"
{
"__metadata": {
"type": "SP.List"
},
"Title": "New title"
}
I have done this in flow as below;
But get this error below;
When I run the step without the body i see that I am getting an correct response back from SP..
Any ideas?
Thanks
We can only use the GetByTitle function in a GET action.
You should split your action into two seperate actions:
The first to get the item ID you want to modify using the GetByTitle function,
the second to update the item but with the _api/Web/lists(guid'<guid>') url where <guid> refers to the Id field of the output of the first action.
Hi @shoog
Thanks for this, I have now been able to capture the ID from the first action, but when i have updated the second action I also still have an error;
Error
Thanks for your time
You could modify the body of your request to something like this (please not the single quotes in stead of double), type should be SP.List
{
'__metadata': {
'type':'SP.List'
},
'Title':'<your title here>'
}
Sorry for the late reply.
Please revert to the Content-Type header to verbose like in your original screenshot, right now it defaults to basic odata, which doesn't include the metadata tag.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
77 | |
18 | |
17 | |
14 | |
11 |
User | Count |
---|---|
133 | |
33 | |
31 | |
31 | |
24 |