Configuration
Configure the CLI or REST API to use an API Key to access resources in Bindplane.
Using your API Key with the CLI
You can set the API Key value in your configuration by using the bindplane profile command.e.g.
bindplane profile set default --api-key 4689832f-1725-4eeb-8f9d-3e78cb0155ecThis sets your "default" profile to use the API key you just received. You may also need to set your remote-url to the correct endpoint, for app.bindplane.com users:
bindplane profile set default --remote-url https://app.bindplane.comMake sure you are using the default profile
bindplane profile use defaultNow verify you can retrieve resources, say Source Types
bindplane get source-typesTo set named profiles run
bindplane profile set "onprem" --api-key "xxxx-xxxx-xxxx-xxxx-xxxxxx"To use custom remote URLs run
bindplane profile set "onprem" \
--remote-url "http://192.168.1.10:3001" \
--api-key "xxxx-xxxx-xxxx-xxxx-xxxxxx"Configure a profile with a user and password
bindplane profile set "example" \
--remote-url "http://192.168.1.10:3001" \
--username "user" \
--password "pass"
bindplane profile use "example"Using your API Key with the REST API
You can use your API with the REST API by setting the X-Bindplane-Api-Key header. An example using curl with Bindplane Cloud:
curl -X GET -H 'X-Bindplane-Api-Key: 4689832f-1725-4eeb-8f9d-3e78cb0155ec' https://app.bindplane.com/v1/source-typesLast updated
Was this helpful?