API Keys

Create an API Key to access resources in BindPlane OP with the CLI or REST API.

📘

API Keys are available in BindPlane OP Enterprise edition and BindPlane OP Cloud.

Create an API Key

API Keys can be created from the UI by visiting the Account page, found in the top right settings menu.

Navigate to the API Key tab and click "Generate New API Key".

A window will show you your new API Key. This will be the only time this key is available to you. If you do not copy the key now you will have to regenerate another API key.

📘

Each user can have one API key per account.

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-3e78cb0155ec

This 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.com

Make sure you are using the default profile

bindplane profile use default

Now verify you can retrieve resources, say Source Types

bindplane get source-types

Using your API Key with the REST API

You can use your API with the REST API by setting the X-Api-Key header. An example using curl with BindPlane OP Cloud:

		curl -X 'X-Api-Key: 4689832f-1725-4eeb-8f9d-3e78cb0155ec' https://app.bindplane.com/v1/source-types