-
Notifications
You must be signed in to change notification settings - Fork 1.2k
API
Welcome to the Azure Naming Tool API documentation. The API provides programmatic access to generate standardized Azure resource names based on your organization's naming conventions.
The latest API version with enhanced features, standardized responses, and Azure tenant validation.
Key Features:
- ✅ Standardized
ApiResponse<T>wrapper for all responses - ✅ Azure tenant validation (real-time conflict detection)
- ✅ Automatic conflict resolution strategies
- ✅ Correlation IDs for request tracking
- ✅ Enhanced error handling with detailed error codes
- ✅ Proper HTTP status code usage (400, 401, 500)
- ✅ Response metadata (timestamps, versioning)
Endpoint Pattern:
POST /api/v2.0/ResourceNamingRequests/RequestName
GET /api/v2.0/ResourceTypes
When to Use:
- New integrations and projects
- When you need Azure tenant validation
- When you need detailed error handling and tracking
- When you want standardized response formats
The original, production-ready API that remains fully supported for backward compatibility.
Key Features:
- ✅ Stable and battle-tested
- ✅ Simple request/response format
- ✅ Generate names using naming conventions
- ✅ Validate names against Azure regex patterns
- ✅ Manage configuration components
- ✅ Full backward compatibility
Endpoint Pattern:
POST /api/ResourceNamingRequests/RequestName
GET /api/ResourceTypes
When to Use:
- Existing integrations using V1
- When you prefer simple response formats
- When Azure tenant validation is not required
- Legacy applications requiring stability
Navigate to Admin → API Keys in the Azure Naming Tool to generate an API key.
Three Key Types:
- 🔑 Full API Access - Complete administrative access
- 🔧 Name Generation - Generate names and read configurations
- 👁️ Read-Only - View-only access to configurations
- V2 (Recommended) - For new projects requiring advanced features
- V1 - For existing integrations or simple use cases
V2 Example:
curl -X POST "https://your-naming-tool.azurewebsites.net/api/v2.0/ResourceNamingRequests/RequestName" \
-H "APIKey: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"resourceType": "vnet",
"resourceEnvironment": "prod",
"resourceLocation": "eastus"
}'V1 Example:
curl -X POST "https://your-naming-tool.azurewebsites.net/api/ResourceNamingRequests/RequestName" \
-H "APIKey: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"resourceType": "vnet",
"resourceEnvironment": "prod",
"resourceLocation": "eastus"
}'Access the interactive API documentation at:
https://your-naming-tool-url/swagger
Features:
- Explore all V1 and V2 endpoints
- Test API calls directly from your browser
- View request/response schemas
- Authenticate with your API key
Generate resource names during automated deployments using Azure DevOps, GitHub Actions, or Jenkins.
Recommended: API V2 with Name Generation key
Integrate with Terraform, Bicep, or ARM templates to generate compliant resource names.
Recommended: API V2 with Name Generation key
Build custom provisioning scripts that generate standardized names for your resources.
Recommended: API V2 with Name Generation key
Automate updates to naming convention components and configurations.
Recommended: API V2 with Full API Access key
Query configurations and naming history for compliance reporting.
Recommended: API V1 or V2 with Read-Only key
| Feature | V1 | V2 |
|---|---|---|
| Response Format | Direct JSON response | Standardized ApiResponse<T> wrapper |
| HTTP Status Codes | Mostly 200 OK | Proper codes (200, 400, 401, 500) |
| Azure Validation | ❌ Not available | ✅ Real-time Azure conflict detection |
| Correlation IDs | ❌ Not available | ✅ Included in all responses |
| Error Details | Basic error messages | Detailed error codes and nested errors |
| URL Pattern | /api/Controller/Action |
/api/v2.0/Controller/Action |
| Backward Compatible | Original API | Maintains V1 functionality |
All API requests require authentication using an API key in the request header:
APIKey: your-api-key-hereAPI keys are managed in Admin → API Keys section of the Azure Naming Tool.
Security Best Practices:
- Store API keys securely (Azure Key Vault, environment variables)
- Never commit keys to source control
- Use different keys for dev/staging/production
- Rotate keys regularly
- Use appropriate key types (Read-Only for auditing, Name Generation for CI/CD)
Learn how to enable real-time Azure resource name validation in API V2:
Azure Validation Documentation →
Upgrading to v5.0.0 or migrating from V1 to V2?
See what's new in the latest version:
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: GitHub Wiki
- Repository: Azure Naming Tool
Ready to get started?