GroveStreams

Changing Component Name using API91

skeller private msg quote post Address this user
Is there an easy way to change the name of a component from a remote device using the API? It appears the only way is to download the component JSON entity, change the name, then POST it back. Is that correct or is there an easier way?
Post 1 IP   flag post
MikeMills private msg quote post Address this user
No easier way today, but we could easily add an API to do it.

What are you attempting to do? A couple of our Feed PUT APIs allow a component name to be included for new components.
Post 2 IP   flag post
skeller private msg quote post Address this user
When the customer configures the device in the field they can name the device using the devices UI. Sometime the name changes depending on what they are doing with the device. I would like that device name to automatically be reflected as the component name.

99% of the time they overlook setting the name until it shows up on the computer screen. (The default name is the network IP address.)
Post 3 IP   flag post
MikeMills private msg quote post Address this user
We'll add that API. It should arrive in the production site next week.

It will be something like this:

GET /comp/{compId}/name
PUT /comp/{compId}/name
POST /comp/{compId}/name
Post 4 IP   flag post
skeller private msg quote post Address this user
Very Cool! Thanks!
Post 5 IP   flag post

Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /var/www/shared/inc/geshi/geshi.php:2039 Stack trace: #0 /var/www/shared/inc/geshi/geshi.php(2039): array_keys() #1 /var/www/shared/inc/geshi/geshi.php(2181): GeSHi->build_parse_cache() #2 /var/www/shared/inc/parse.php(230): GeSHi->parse_code() #3 [internal function]: codeMatch() #4 /var/www/shared/inc/parse.php(14): preg_replace_callback() #5 /var/www/shared/displayThread.php(1159): bbcode_format() #6 {main} thrown in /var/www/shared/inc/geshi/geshi.php on line 2039
MikeMills private msg quote post Address this user