Page 1 of 1

Wapt API

Published: November 30, 2021 - 4:54 PM
by guestben321
Good morning,

I did some research on Google and saw that there is a API for WAPTBut at my level, she lacks quite a few examples.
For example, this query returns 10,000 workstations with the status of the machines:

Code: Select all

https://admin:MYPASSWORD@srvwapt.mydomain.lan/api/v1/hosts?columns=reachable,computer_fqdn,connected_ips,mac_addresses&limit=10000
The API does not allow, for example, returning the result only from a machine called, for example, TOTO01?
For example, to retrieve its uuid.
Using a machine's UUID, I saw that you could retrieve all sorts of information, for example, which packages are installed on the machine.
Is there a way to launch the installation of a package using the API?

THANKS


For your information:
My Wapt is version 2.2.1, enterprise edition and installed on a 64-bit Linux system.

Re: Wapt API

Published: November 30, 2021 - 8:00 PM
by sfonteneau
guestben321 wrote: Nov 30, 2021 - 4:54 PM The API doesn't allow, for example, returning the result only from a machine called, for example, TOTO01?
Like this?

Code: Select all

/api/v3/hosts?filter=computer_fqdn:TOTO&reachable=1&columns=computer_fqdn,uuid,computer_name&limit=2000
guestben321 wrote: Nov 30, 2021 - 4:54 PM Is there a way using the API to launch the installation of a package?
The server can relay an installation request, but the request must be signed with the private key

Code: Select all

/api/v3/trigger_host_action
The server receives the request and forwards it, so if it is not signed, it will be refused by the client.

The server alone cannot do anything because it does not have the private key (first principle of Wapt security)