Authentication configuration for API calls. Defines how to authenticate with external APIs using credentials stored in the organization secrets vault. Credentials are NEVER stored in the stage configuration - only references to vault secrets.
| Name | Type | Description | Notes |
|---|---|---|---|
| type | StageDefsAuthType | REQUIRED. Authentication method to use. Options: none (public API), api_key (API keys), bearer (OAuth/JWT), basic (HTTP Basic Auth), custom_header (non-standard headers). See AuthType enum for detailed description of each type. | [optional] |
| secret_ref | str | REQUIRED (except for type=none). Name of secret in organization vault. The secret must be created first via POST /v1/organizations/secrets. Format: Use the exact secret_name from vault (e.g., 'stripe_api_key'). At runtime, the secret value is securely retrieved and decrypted. The decrypted value is then injected into the request per auth type. SECURITY: NEVER store actual credentials here - only the reference name. Examples: 'stripe_api_key', 'github_pat', 'weather_api_key' | [optional] |
| location | str | OPTIONAL (for api_key type only). Where to inject the API key. Options: 'header' (recommended, more secure) or 'query' (less secure). Default: 'header' if not specified. Query parameters appear in URLs and logs - use headers when possible. Ignored for other auth types (bearer, basic, custom_header). | [optional] |
| key | str | REQUIRED (for api_key and custom_header types). Header name or query parameter name for authentication. For api_key with location=header: Header name like 'X-API-Key', 'Authorization'. For api_key with location=query: Query param like 'apikey', 'api_key', 'key'. For custom_header: Any custom header name like 'X-Custom-Auth', 'X-Token'. Ignored for bearer and basic types (use standard headers). Common patterns: 'X-API-Key', 'Authorization', 'X-Auth-Token' | [optional] |
from mixpeek.models.stage_defs_auth_config import StageDefsAuthConfig
# TODO update the JSON string below
json = "{}"
# create an instance of StageDefsAuthConfig from a JSON string
stage_defs_auth_config_instance = StageDefsAuthConfig.from_json(json)
# print the JSON string representation of the object
print(StageDefsAuthConfig.to_json())
# convert the object into a dict
stage_defs_auth_config_dict = stage_defs_auth_config_instance.to_dict()
# create an instance of StageDefsAuthConfig from a dict
stage_defs_auth_config_from_dict = StageDefsAuthConfig.from_dict(stage_defs_auth_config_dict)