get /api/v3/agents/{agentId}

Arbroath_d
Arbroath_d Member Posts: 4

Hi,

Maybe a bit of a niche one, but I'm using the API call get /api/v3/agents/{agentId} to retrieve various details from my agents which I store locally - this includes the collection of MAC addresses associated with the device.

I want to launch Splashtop (I have a separate subscription). To do this requires passing the devices MAC address.

This is where it gets complicated - Atera returns a collection of MACs relating the network adapters available on the device. Splashtop wants passed the active MAC address and doesn't work if I pass another (such as a networking port which isn't connected).

On the Atera website the device information always shows one MAC address as primary. However, there doesn't seem to be a way to determine this from the information returned by the API? Is there a way to determine this, or can that facility be added.

Thanks,

David

Tagged:

Comments

  • mbudke
    mbudke Member Posts: 148 ✭✭✭

    Hey,

    I am not sure if that works but you could try:

    • create a custom field in Atera and call it e.g. "PrimaryMAC"
    • create a PowerShell script to grab the MAC address which you need and write it with a script into the custom field: https://support.atera.com/hc/en-us/articles/360019156800-Get-the-value-for-custom-fields-in-scripts
    • read the custom field via API

    Please note that writing custom fields via script requires the SUPERPOWER plan

  • Arbroath_d
    Arbroath_d Member Posts: 4

    Thanks for taking the time to reply, I appreciate it. This isn't what I'm looking for though, I don't want to have a manual step… at the moment device details are gathered in to my own app twice a day and everything happens automatically. It's clear from the information presented in the Atera device view that the information about which is the primary MAC is held by Atera - but I'm not seeing a way to automatically extract that via the API.

    David