Page 1 of 1

[Implemented] Expand API functionality

Posted: Wed Aug 28, 2019 3:12 pm
by michael.brugge

Is it possible to expand the API with the following features it would make it much easier to use.

Expand API create new device:
-Add parameter bind credential
-Add parameter add tag
-Add parameter to the Succes 201 message with "Discovered - Yes/No"

We use our own software which sends an API to create a new device to Unimus, but we cant auto check if the devices succesfully discovered.
We either have to login into the webinterface or use API get device

Best regards,

Michael Brugge

Re: Expand API functionality

Posted: Wed Aug 28, 2019 3:26 pm
by Tomas

1) API and Credentials
Credentials (and therefore Credential binding) are missing from the API on purpose.
We did not yet decide internally if we want to expose credentials over the API.

If we were to expose cred. binding over the API, we would have to expose the credentials themselves first.

This is for security reasons - as by default Unimus is HTTP, and it would be super simple to sniff the API token, and of course the credentials to your entire network. Currently if the API token (or the API communication) is sniffed, access to the API would be compromised, but at least access to the network itself would not.
Of course, Credentials can also be sniffed from a regular Unimus session, but data there is much more complex that just a simple JSONs the API uses.

As you can imagine, this is a complex discussion, and there are many "but if..." and "we could..." points here, it's just that we have not internally arrived at a firm conclusion what to do yet.

2) API and Tags
We do indeed need to expose Tags and Tagging devices over the API.
I have created a ticket in our internal tracker.

3) API and device status
Here, the device creation endpoint can not return "Discovered - Yes/No".
This is because discovery takes time. Image adding a 1000 devices over the API. It could take up to 3-4 minutes for all the discoveries to complete. The API endpoint can't hold the response to the device creation request for so long.

What we can do here, is add a device status endpoint.
That would tell you if any jobs are running on a device (Discovery, Backup, Mass Config Push), and what the status of the device is (discovered or not, etc.).

I have also created a ticket for this in our internal tracker.

Re: Expand API functionality

Posted: Thu Aug 29, 2019 9:39 am
by michael.brugge
Thanks Tomas for your quick reply.

Best regards,


Re: Expand API functionality

Posted: Fri Jul 09, 2021 4:06 pm
by Tomas
Just an update: we are currently designing API v3 (to be released in v2.2) which we hope to implement in the following 3-6 months. It will expose all functionality of Unimus, including things described in this topic.

We will publish a draft of the proposed API endpoints and objects in the Beta section of the forum once finalized for comments, please subscribe there if you wish to be notified when that is ready :)

Re: [Implemented] Expand API functionality

Posted: Wed Aug 11, 2021 11:09 pm
by Tomas
API v3 draft available here: viewtopic.php?f=4&t=1347

Please post any questions / feedback in that topic :)