Common Communication Object Structure
Common Communication Object, also referred to as CCO, is a JSON structure used to manage data transfer within ThingWorx Navigate. It contains data and metadata on one or more instances of the backend system and objects retrieved from those systems.
CCO Structure
{
"version":"1.0.0",
"data":[
{
"adapter":{
"thingName":"",
"instanceName":""
},
"itemListsData":[
{
"objectType":"",
"items":[
{
"id":{
"value":""
},
"Name":{
"value":""
}
}
],
"metadata":{
"id":{
"label":"",
"type":""
},
"Name":{
"label":"",
"type":""
}
},
"typeData":{
}
}
]
}
],
"status":"",
"statusMessage":"",
"timeStamp":""
}
Property Name
Description
version
The version of the CCO structure used.
Property type is string.
data
The information retrieved from the backend system(s).
Property type is string.
adapter
Contains information about the backend system instance from which the data is retrieved.
thingName
Name of the adapter Thing that represents the backend system in ThingWorx Navigate.
Property type is string.
instanceName
Name of the specific instance of the backend system.
Property type is string.
ItemListsData
List of items and metadata. Items inside each instance of the list must be of the same object type.
objectType
The type of the objects being retrieved.
Property type is string
items
List of items and item values.
value
Value for the specific item.
Property type is string.
metadata
Information regarding attributes, which is common to all items.
typeData
Additional information on the objectType. Only used in rare cases.
Property type is JSON object.
status
The status of the data retrieval.
Property type is string.
statusMessage
Message regarding the status of the data retrieval.
Property type is string.
timeStamp
Time stamp for the data retrieval.
Property type is string.
Examples of CCO Structure
1. The following example includes one item with one object type.
{
"version":"1.0.0",
"data":[
{
"adapter":{
"thingName":"PTC.WCAdapter",
"instanceName":"windchill"
},
"itemListsData":[
{
"objectType":"PTC.ChangeMgmt.ChangeRequest",
"items":[
{
"id":{
"value":"OR:wt.change2.WTChangeRequest2:258323"
},
"Name":{
"value":"CR"
}
}
],
"metadata":{
"id":{
"label":"Id",
"type":"string"
},
"Name":{
"label":"Change Request Name",
"type":"string"
}
}
}
]
}
],
"status":"200",
"statusMessage":"OK",
"timeStamp":" 2019-01-02 06:43:19.77"
}
2. The following example includes one item with two different object types. Since each items array contains only one object, there is one item.
{
"version":"1.0.0",
"data":[
{
"adapter":{
"thingName":"PTC.WCAdapter",
"instanceName":"windchill"
},
"itemListsData":[
{
"objectType":"PTC.ChangeMgmt.ChangeRequest",
"items":[
{
"id":{
"value":"OR:wt.change2.WTChangeRequest2:258323"
},
"Name":{
"value":"CR"
}
}
],
"metadata":{
"id":{
"label":"Id",
"type":"string"
},
"Name":{
"label":"Change Request Name",
"type":"string"
}
}
},
{
"objectType":"PTC.Workflow.WorkItem",
"items":[
{
"Category#Display":{
"value":"Cost Reduction"
},
"RequestPriority#Display":{
"value":"Low"
}
}
],
"metadata":{
"Category#Display":{
"label":"Category",
"type":"string"
},
"RequestPriority#Display":{
"label":"Request Priority",
"type":"string"
}
}
}
]
}
],
"status":"200",
"statusMessage":"OK",
"timeStamp":" 2019-01-02 06:43:19.77"
}
3. The following example includes two items with one object type. Since each items array contains two objects, there are two items.
{
"version":"1.0.0",
"data":[
{
"adapter":{
"thingName":"PTC.WCAdapter",
"instanceName":"windchill"
},
"itemListsData":[
{
"objectType":"PTC.ChangeMgmt.ChangeRequest",
"items":[
{
"id":{
"value":"OR:wt.change2.WTChangeRequest2:258323"
},
"Name":{
"value":"CR1"
}
},
{
"id":{
"value":"OR:wt.change2.WTChangeRequest2:32456"
},
"Name":{
"value":"CR2"
}
}
],
"metadata":{
"id":{
"label":"Id",
"type":"string"
},
"Name":{
"label":"Change Request Name",
"type":"string"
}
}
}
]
}
],
"status":"200",
"statusMessage":"OK",
"timeStamp":" 2019-01-02 06:43:19.77"
}
4. The following example includes two items with two object types. Since each items array contains two objects, there are two items.
{
"version":"1.0.0",
"data":[
{
"adapter":{
"thingName":"PTC.WCAdapter",
"instanceName":"windchill"
},
"itemListsData":[
{
"objectType":"PTC.ChangeMgmt.ChangeRequest",
"items":[
{
"id":{
"value":"OR:wt.change2.WTChangeRequest2:258323"
},
"Name":{
"value":"CR"
}
},
{
"id":{
"value":"OR:wt.change2.WTChangeRequest2:32456"
},
"Name":{
"value":"CR2"
}
}
],
"metadata":{
"id":{
"label":"Id",
"type":"string"
},
"Name":{
"label":"Change Request Name",
"type":"string"
}
}
},
{
"objectType":"PTC.Workflow.WorkItem",
"items":[
{
"Category#Display":{
"value":"Cost Reduction"
},
"RequestPriority#Display":{
"value":"Low"
}
},
{
"Category#Display":{
"value":"Cost Reduction"
},
"RequestPriority#Display":{
"value":"High"
}
}
],
"metadata":{
"Category#Display":{
"label":"Category",
"type":"string"
},
"RequestPriority#Display":{
"label":"Request Priority",
"type":"string"
}
}
}
]
}
],
"status":"200",
"statusMessage":"OK",
"timeStamp":" 2019-01-02 06:43:19.77"
}
Was this helpful?