Home > Forum > General > Problem with change value with REST API

Problem with change value with REST API
0

I need to change 2 values with REST, I use'd API v3 and PATCH method. This values is in another workflow.

JSON
[
{
"data": {
"guid": "3567e810-6f44-41e5-9ac3-794d6e055db1",
"value": "2024-05-27T14:02:26"
},
"wynik": {
"guid": "56e078eb-dc11-4960-a662-3974f0f837da",
"value": "Ryzyko niskie"
}
}
]

In other workflow history I have only infpormation about Save workflow by ServiceWebconApiProd - Registered App.

MVP

Hi Adam, this JSON doesn't really looks like correct schema. I haven't used patch yet - only creating new ones, but i think it should look like that according to swagger.


{
"formFields": [
{
"guid": "dd8a11db-e99b-4b8f-ba5a-d4e772235ca1",
"svalue": "39275#CF/2023/08/05289"
},
{
"guid": "b4a1f00a-be47-45a7-8332-81fbde8b5f71",
"value": "SO51180"
}
],
}

It's missing that "formFields" array :)
Try with value and svalue depending on type of field - for dropdowns svalue was the way to go in my case. GUIDs are of course attribute GUID, and element ID should be specified within url.