'How can update roomle component via roomle API?

I'm following docs of roomle at https://docs.roomle.com/rapi/endpoints/Component.html#post but I dont see any example for the body content of update method.

And I got an error message when update a component

{
"error": {
    "type": "BAD_REQUEST",
    "message": "you need to be in cms context",
    "status": "BAD_REQUEST",
    "statusCode": 400
}}

My body request - PUT: https://api.roomle.com/v2/components/component_test

{
"component": {
    "externalIdentifier": "component_test",
    "catalog": "delife",
    "id": "delife:component_test",
    "configuration": "{\"id\":\"delife:component_test\",\"parameterGroups\":[{\"key\":\"chairGr\",\"global\":true,\"labels\":{\"en\":\"Sitzschale1\"}}]}",
    "active": false,
    "version": 3
}}

P/s: with the api to get component detail work good



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source