There are two ways to administer an adam instance:
- The admin API
- The
adam admin
command
In truth, the adam admin
command is just a wrapper to the admin API, to ease usage.
The following are the admin endpoints:
GET /onboard
- list all onboard certificatesGET /onboard/{cn}
- get a specific onboard certificatePOST /onboard
- upload a new onboarding certificateDELETE /onboard
- clear all onboarding certificatesDELETE /onboard/{cn}
- delete a specific onboarding certificateGET /device
- list all devicesGET /device/{uuid}
- get details of one deviceGET /device/{uuid}/config
- get config for one devicePUT /device/{uuid}/config
- update config for one deviceGET /device/{uuid}/logs
- get all known logs for one device; set headerX-Stream=true
to stream all new logs insteadGET /device/{uuid}/info
- get all known info messages for one device; set headerX-Stream=true
to stream all new info insteadPOST /device
- create a new deviceDELETE /device
- delete all devicesDELETE /device/{uuid}
- delete one specific deviceGET /device/{uuid}/options
- set options for one devicePUT /device/{uuid}/options
- update options for one deviceGET /options
- set global optionsPUT /options
- update global options
The adam admin
command allows you to speak directly to a running adam
device using the CLI.
It has several subcommands for managing onboarding certificates, devices, etc. Run adam admin --help
to see your options.
There are several options for all adam admin
commands, primarily:
- the URL to the adam server to use
- the path to the CA certificate for validating the adam server's TLS certificate
- whether or not to trust expired or unsigned certificates
Run adam admin --help
to see the options. All three of these also can read environment variables,
to avoid your needing to specify common options every time. They also have reasonable defaults.
adam admin --help
will tell you the options, the environment variables and the defaults.
In all cases, CLI flag overrides environment variable overrides the default.
For example, the default server URL is https://localhost:8080
. If nothing else is specified,
it will use that URL. If you specify ADAM_SERVER=https://lfedge.org:5000
, it will use that,
as environment variable overrides the default.
Similarly, if you specify adam admin --server=https://foo.com:4000
, it will use that,
as CLI flag overrides the default. Finally, if you specify:
ADAM_SERVER=https://lfedge.org:5000 adam admin --server=https://foo.com:4000
It will use the CLI flag option, https://foo.com:4000
, as CLI flag overrides environment
variable, which overrides the default.