cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to Delete a Data shape Through Service in Thingworx

Janakiraman-P
15-Moonstone

How to Delete a Data shape Through Service in Thingworx

Hi,

 

I want to remove a Data Shape through a function call, please let me know the possibilities.

 

 

Thank you ,

 

Janakiraman P 

2 REPLIES 2

Unfortunately there isn't a service for this, but you could do this with a REST API Delete call.

Here's what I recorded from composer

  1. Request URL:
    https://<ServerName:Port>/Thingworx/DataShapes/MyNewDataShapePai?Accept=application%2Fjson&Content-Type=application%2Fjson
  2. Request Method:
    DELETE

 

Hi, Thank you for the reply.

 

I was trying to create one Data Shape thru services, datashape having a infotable field and am attaching a datashape along with the infotable. However new datashape is created with infotable as field but without datashape attached with it.

 

Please find my code below,

also refer,

 

https://community.ptc.com/t5/ThingWorx-Developers/How-to-Create-Data-shape-Through-Service-in-Thingworx/m-p/605676#M35598


var fields = { dataShape: {"fieldDefinitions":
{"fieldName1":
{"name":"info",
"aspects":{},
"description":"",
"baseType":"INFOTABLE",
"dataShape":"TestDS6",
"ordinal":1}
}


},
rows: []
};


var params = {
name: 'TestDS7' /* STRING */,
description: undefined /* STRING */,
fields: fields /* INFOTABLE */,
tags: undefined /* TAGS */
};

// no return
Resources["EntityServices"].CreateDataShape(params);

 

 

 

suggest a solution for me.

 

 

Janakiraman P

Announcements


Top Tags