Retrieving Values from Rest-API

Hey,

i'm running Resolume Arena 7 on my pc and using switches with custom OSC mapping for triggering clips.
as i got my default button setup now up and running i'd like to get the Group Name of Arena.

my buttons get the thumbnail image via Rest-API already but i cant figure out how to change the label with Rest-API via JS.
Bildschirmfoto 2024-10-11 um 11.40.36

i've tried to run a fetch command but i wont get any response.

The Rest-API GET is

http://127.0.0.1:1234/api/v1/composition/layergroups/1

This would be a part of the API response i get:

"id": 1691411996401,
  "name": {
    "valuetype": "ParamString",
    "id": 1728635748632,
    "value": "LED WALL"
  },
.
.
.

but i cant manage to get my label changed to the value (e.g. "LED WALL").
i already tried to use blackbox . ai (AI for scripting problems) but havent managed to get it running.

Anyone been stuck here too or can help?

My custom_module.js retrieves a list of available fonts at start up and assigns the same list to seven dropdowns. More complicated than your situation but hopefully you can extract something useful from this fragment, @badcaps.

app.on('sessionOpened',  (data, client) => {
  const
    http = nativeRequire('http'),
    controls = [
      "pois_important-font",
      "road-font",
      "subplace-font",
      "peak-font",
      "locality-font",
      "region-font",
      "country-font",
    ]
  ;
  let fontOptions = {};
  http
    .get('http://localhost:8080/catalog', (resp) => {
      let data = ''
      resp.on('data', chunk => {
        data += chunk
      })
      resp.on('end', () => {
        let
          fonts = JSON.parse(data).fonts
        ;
        for (let f in fonts) {
          fontOptions[f] = f;
        }
        controls.forEach((c) => {
          receive('/EDIT', c, {
            'values': fontOptions,
          }, {clientId: client.id});
        });
      })
    })
    .on('error', err => {
      console.log("Error: ", err.message)
    })
})