Accessing Ubuntu Core device APIs using Postman

How can I access the device REST APIs using Postman?

The documentation is shown here:

First, which authentication method do I use? I am assuming I have to use my Ubuntu One account and the key associated with it, right?

Also, I am assuming I can access the device on Port 80 right? So it would be http://<ip_address>/v2/system-info as the GET request.

Can someone verify this?

No, you can only access it from localhost via the socket … to do any remote management you need to create an agent snap that utilizes the snapd-control interface and then forwards the requests/replies to the network…

ogra@pipower:~$ snap install http
Download snap "core18" (2755) from channel "stable"                                          6% 3.70MB/s 13.1shttp 2.4.0 from Snap Retiring installed
ogra@pipower:~$ http snapd:///v2/snaps
HTTP/1.1 200 OK
Content-Type: application/json
Date: Tue, 13 Jun 2023 15:36:29 GMT
Transfer-Encoding: chunked

    "result": [
            "apps": [
                    "desktop-file": "/var/lib/snapd/desktop/applications/htop_htop.desktop",
                    "name": "htop",
                    "snap": "htop"
            "base": "core22",
            "channel": "stable",
            "confinement": "strict",

(curl should also work via http://localhost … and the socket option)

@ogra a few months ago I remember standing up the IoT Management web dashboard provided by Canonical.

I remember installing a “iot-agent” Snap, this is what it looked like:

Do you think if I launched this “iot-agent” Snap again, it would allow me to call the APIs using IP address, followed by “/v2/”?

The iot-agent snap communicates via MQTT with the server, I don’t think there is an open web port… but you could grab the source and adapt it I guess …


There are also links to the source of the various involved services as well as the server code linked from the README…

Is iot-agent maintained? Or is Landscape its replacement now?

It has never been actually maintained, it is example/reference code to be able to derive from of you have a brand store (that entitles you to use snapd-control) and want to integrate with an existing fleet management solution to manage your devices …