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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Remotely configuring a thingTemplate/thing via rest

jpytlowany
1-Newbie

Remotely configuring a thingTemplate/thing via rest

Hi,

I noticed some ThingTemplates have a configuration section. Say, for example, the mail extension or mqtt extension.

I know you can create, enable, and start/stop things through rest, and even give them a template, however is there a way to remotely set these configuration settings. Perhaps via REST or another method.

For example, in the mail extension's configuration settings: Can you remotely set (i.e. from PC) the mail server address, user details etc.

Kind regards,

John

1 ACCEPTED SOLUTION

Accepted Solutions

I realized my syntax was wrong. The problem is resolved. I can provide an example at a later time

View solution in original post

3 REPLIES 3

John, you can create a Mashup for this as well. For example, if you take the MailServer Thing, you can use a service like GetConfigurationTable and bind that to a Grid. The tableName would be ConnectionInfo, and that would display all fields in the configuration section.

Hi, Thanks for the info.

So i have a javascript application try to call the service "SetConfigurationTableRows",

my input is:

var data = {

  "tableName":"Mail Server Connection Parameters",

  "values" : {

  "dataShape" : {

  "fieldDefinitions": {

  "SMTP Server":{

  "name":"SMTP Server"

  }}},

  "rows":[{"SMTP Server":"localhost"}]

  }

};

Im getting an error. (406, specifically).

Should it be something more like,

var data = {

  "tableName":"Mail Server Connection Parameters",

  "values" : {

  "dataShape" : {

  "fieldDefinitions": {

  "SMTP Server"}},

  "rows":[{"SMTP Server":"localhost"}]

  }

};

??

Im am using POST method.

Regards,

John

I realized my syntax was wrong. The problem is resolved. I can provide an example at a later time

Top Tags