REST API - PUT Call

Hello guys

We face a problem with the REST API POST Call which should update an object. Unfortunately, the response body shows "malformed data". However, the Request Header and Body are as in the Postman Collection and the selected property 1194 is 100% a text property (DataType = 1). The object is checked out correctly first through the API call, but then something goes wrong in the subsequent POST/PUT request.

Anyone could give me a hint?

Other operations like creating an object or GET requests are not a problem and work well.

Response body:

{
    "Status": 400,
    "URL": "/objects/0/305/latest/properties/1194",
    "Method": "POST",
    "Exception": {
        "Name": "ArgumentException",
        "Message": "Malformed data."
    },
    "Stack": "Error reference ID: dc3c78e6-5d15-40b3-a690-e7ecbb3231d9",
    "Message": "Malformed data.",
    "IsLoggedToVault": true,
    "IsLoggedToApplication": true,
    "ExceptionName": "ArgumentException"
}

Request Header URL:

https://{{MF_URL}}/REST/objects/0/305/latest/properties/1194?_method=PUT

Request body:

[
{
"PropertyDef": 1194,
"TypedValue": {
"DataType": 1,
"Value": "QRR"
}
}
]

Kind regards

Dario

Parents Reply
  • Hi Craig

    Thank you very much for your hint, it works now :-).

    I used /properties as endpoint though and included the array [] in the body. In the postman collection it is unfortunately not very clear, since the call "Set all properties" includes the property ID in the URL and various properties in the body, while the Set property call does not include the property in the URL but still includes the [] in the body, although there is only 1 property to be updated.

    Is there maybe somewhere a more recent postman collection?

    Kind regards,

    Dario

Children