pbadmin network apikey create
Create an API key
Synopsis
Create an API key for a network or tenant, optionally for a named cluster.
The secret API key is returned only when creating the API key. You should store the API key in a secure place, as it cannot be retrieved after create.
pbadmin network apikey create [flags]
Examples
Create API keys for a network:
$ pbadmin network apikey create --net-id 000013
Create API keys for a tenant:
$ pbadmin network apikey create --net-id 000013 --tenant-id tti
Create API keys for a named cluster in a network:
$ pbadmin network apikey create --net-id 000013 --cluster-id eu1
Create API key for a named cluster in a tenant:
$ pbadmin network apikey create --net-id 000013 --tenant-id tti --cluster-id eu1
Create API key for a network with rights to read networks and tenants:
$ pbadmin network apikey create --net-id 000013 --rights READ_NETWORK
Rights:
READ_NETWORK Read networks
READ_NETWORK_CONTACT Read network contact information
READ_JOIN_SERVER Read Join Servers
READ_JOIN_SERVER_CONTACT Read Join Server contact information
READ_ROUTING_POLICY Read routing policies
WRITE_ROUTING_POLICY Write routing policies
READ_GATEWAY_VISIBILITY Read gateway visibilities
WRITE_GATEWAY_VISIBILITY Write gateway visibilities
READ_TRAFFIC Read traffic
WRITE_TRAFFIC Write traffic
Options
--cluster-id string cluster ID
-h, --help help for create
--net-id netID LoRa Alliance NetID
--prompt-key prompt custom secret key value
--rights apiKeyRightsValue API key rights (READ_GATEWAY_VISIBILITY,READ_JOIN_SERVER,READ_JOIN_SERVER_CONTACT,READ_NETWORK,READ_NETWORK_CONTACT,READ_REPORT,READ_ROUTE_TABLE,READ_ROUTING_POLICY,READ_TARGET_AUTH,READ_TRAFFIC,WRITE_GATEWAY_VISIBILITY,WRITE_ROUTING_POLICY,WRITE_TRAFFIC)
--save save the API key to configuration
--tenant-id string tenant ID
Options inherited from parent commands
--client-id string OAuth 2.0 client ID
--client-secret string OAuth 2.0 client secret
--config string config file (default is .pb.yaml, $HOME/.pb.yaml)
-d, --debug debug mode
--iam-address string address of the server "host[:port]" (default "iam.packetbroker.net:443")
--iam-password string IAM password
--iam-username string IAM username
--insecure insecure
--token-url string OAuth 2.0 token URL (default "https://iam.packetbroker.net/token")
SEE ALSO
- pbadmin network apikey - Manage Packet Broker API keys for networks and tenants