Changes between Version 14 and Version 15 of RestApi


Ignore:
Timestamp:
18.10.2011 17:30:40 (13 years ago)
Author:
jri
Comment:

Creating a simple association type with a custom color

Legend:

Unmodified
Added
Removed
Modified
  • RestApi

    v14 v15  
    274274  "data_type_uri": "dm4.core.composite", 
    275275  "index_mode_uris": [ 
    276  
    277276  ], 
    278277  "assoc_defs": [ 
     
    288287      "part_cardinality_uri": "dm4.core.one", 
    289288      "view_config_topics": [ 
    290  
    291289      ] 
    292290    } 
     
    366364  "data_type_uri": "dm4.core.text", 
    367365  "index_mode_uris": [ 
    368  
    369366  ], 
    370367  "assoc_defs": [ 
    371  
    372368  ], 
    373369  "view_config_topics": [ 
    374  
    375370  ] 
    376371} 
     
    481476  ], 
    482477  "index_mode_uris": [ 
    483  
    484478  ], 
    485479  "view_config_topics": [ 
    486  
    487480  ] 
    488481} 
     
    640633}}} 
    641634 
     635==== Example 2: Creating a simple association type with a custom color ==== 
     636 
     637{{{ 
     638curl localhost:8080/core/assoctype -i \ 
     639-X POST \ 
     640-H Content-Type:application/json \ 
     641-d '{uri: "spaceorg.planetarium.satellite", 
     642     value: "Satellite", 
     643     data_type_uri: "dm4.core.text", 
     644     view_config_topics: [{ 
     645       "type_uri": "dm4.webclient.view_config", 
     646       "composite": { 
     647         "dm4.webclient.color": "rgb(12, 70, 164)" 
     648     }}]}' \ 
     649| jsonpretty 
     650}}} 
     651 
     652Response: 
     653 
     654{{{ 
     655HTTP/1.1 200 OK 
     656Content-Type: application/json 
     657 
     658{ 
     659  "id": 2804, 
     660  "uri": "spaceorg.planetarium.satellite", 
     661  "type_uri": "dm4.core.assoc_type", 
     662  "value": "Satellite", 
     663  "composite": { 
     664  }, 
     665  "data_type_uri": "dm4.core.text", 
     666  "index_mode_uris": [ 
     667  ], 
     668  "assoc_defs": [ 
     669  ], 
     670  "label_config": [ 
     671  ], 
     672  "view_config_topics": [ 
     673    { 
     674      "id": 2809, 
     675      "uri": "", 
     676      "type_uri": "dm4.webclient.view_config", 
     677      "value": "", 
     678      "composite": { 
     679        "dm4.webclient.color": "rgb(12, 70, 164)" 
     680      } 
     681    } 
     682  ] 
     683} 
     684}}} 
     685 
    642686== Commands == 
    643687