CMDBuild Forum

RESTful service for Relation Attributes creation

Hi there fellow CMDBuild community!

I am able to automate Cards and Relation creation through RESTful WS. The thing I'm missing though is the WS to add the Attributes of a given relation ? Couldn't really find it on forum nor the Webservice manual.

 

Regards,

Grzegorz

 

 

Okay - I've just tried to just put the "attribute_name":"attribute_value" pair into the json defining a new relation when sending a POST request with a new relation data and it worked.
 
So - for all of you looking for the answer to the original question, here's a curl command that may help you:
 
curl -v --request POST --header "Content-Type: application/json" --data "{\"_sourceType\":\"ServerGroup\",\"_sourceId\":\"889\",\"_destinationType\":\"Server\",\"_destinationId\":\"539\",\"DefaultGroup\":\"false\",\"hostname\":\"qainap01\"}" --header "CMDBuild-Authorization: ${cmdb_token}" "http://${cmdbuild_fqdn}:${cmdbuild_port}/${cmdbuild_app_root}/${cmdbuild_rest_webservice_context}/v2/domains/${domain_name}/relations"
 
The attribute I've tried to insert is in bold.
 
Cheers,
G.
 
 
Previously Grzegorz Gornicki wrote:

Hi there fellow CMDBuild community!

I am able to automate Cards and Relation creation through RESTful WS. The thing I'm missing though is the WS to add the Attributes of a given relation ? Couldn't really find it on forum nor the Webservice manual.

 

Regards,

Grzegorz