Register a new API User
Step 1: Generate API Operator Authentication Keys
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import ec
def generate_keys():
private_key = ec.generate_private_key(ec.SECP256R1(), default_backend())
private_key_bytes = private_key.private_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PrivateFormat.TraditionalOpenSSL,
encryption_algorithm=serialization.NoEncryption(),
)
private_key_hex = private_key_bytes.hex()
public_key_bytes = private_key.public_key().public_bytes(
encoding=serialization.Encoding.X962,
format=serialization.PublicFormat.UncompressedPoint,
)
public_key_hex = public_key_bytes.hex()
return private_key_hex, public_key_hex
# Example of generated keys
private_key, public_key = generate_keys()
print(f"Private Key: {private_key}")
print(f"Public Key: {public_key}")Step 2: Register the API user on your workspace
Register an API Operator

Register an API Admin

Step 3: Generate API Access for the new API user


Step 4: Assign the new API user to workspace rules
API Operator
API Administrator
What's next?
Last updated