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

How to delete a token from the localization table

Highlighted
Level 1

How to delete a token from the localization table

Hi,

I have a localization table I use and by mistake I added few tokens, I want to delete them, they are on the default table.

I cannot find where I can do it.

TW version I use:  6.0.2-b456

Thanks.

Tags (1)
13 REPLIES 13

Re: How to delete a token from the localization table

A bit of a challenge, but there is a DeleteToken service that you can invoke using the REST API or in a mashup.

Re: How to delete a token from the localization table

Thanks Pai Chung,

I'm not sure I fully understand how to do it, but I just want to say I meant how to do it in the composer, I dont want to do it from the code.

Re: How to delete a token from the localization table

Unfortunately at this time there isn't a way to directly do it within composer, so you will have to do it by either building a mashup and using the DeleteToken service, or invoking it through the REST API.

Re: How to delete a token from the localization table

Is there an example doing it using the REST API?

Re: How to delete a token from the localization table

There are quite a few posts on REST API already in the community, as well as in support.ptc.com

the DeleteToken Service would have to be executed with a POST and needs an input parameter of 'name'

Re: How to delete a token from the localization table

Hi Pai,

I am trying to delete a token using REST API, I am getting 200 OK message but the token doesn't delete.

Below is my service code, Could you please throw some light here?

var params = {

    url: "http://localhost:8080/Thingworx/LocalizationTables/Default/ServiceDefinitions/DeleteToken",

    content: {"name": ""+TokenName}   

};

var result = Resources["ContentLoaderFunctions"].PostJSON(params);

Any help here is greatly appreciated.

Re: How to delete a token from the localization table

Pai,

One more observation below.

When I tried to browse the URL http://localhost:8080/Thingworx/LocalizationTables/Default/ServiceDefinitions/DeleteToken

from Rest Client, I get the message "Editable System Objects Cannot Be Deleted", am I missing any setting or permission here.

Thanks for the help!.

Re: How to delete a token from the localization table

Please try changing ServiceDefinitions to Services

Re: How to delete a token from the localization table

Pai,

Changing ServiceDefinitions to Services did not work.

Actually when I browse for http://localhost:8080/Thingworx/LocalizationTables/Default/Services,​  I am not getting the "DeleteToken" service listed down.

However with http://localhost:8080/Thingworx/LocalizationTables/Default/ServiceDefinitions/ I see "DeleteToken" service available.

Thanks,

Praveen.