CMDBuild Forum

Rest Api _ update card

Hi,
I’m using rest api to read card from CMDBuild.
Now I’m trying to modify a card.
So I send a Put http request to url
http://hostname:port/cmdbuild/services/rest/v3/classes/{assetClass}/cards/{cardID}

and in body I put this json
{“Attr”:“Active”}

Cmdbuild respond with 500 and te error is

:"org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request =< ws3rest:put:classes/ApparatoDiRete/cards/4146466 >, caused by: org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request with handler = Ws3RequestMethodHanlder…

Cannot construct instance of java.util.LinkedHashMap (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value

Can anyone help me?
thanks in advance

Hi,
I’ve changed a litte bit body of update request:

{“data”:{“Nome”:“gw-nomeprova”}}

And I receive a 200 response
{“success”:true,“data”:{"_id":4146466,…

but attribute Nome isn’t modified.

Can anyone help me?
thanks in advance

the problem was in how I formatted the body of the post request: now I’ve corrected it and I’m able to modify card

2 Likes