An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Thanks for reaching out to Microsoft Q&A.
Use below bicep template to deploy APIM workspace:
@description('Name of the existing API Management service')
param apimServiceName string
@description('Name of the workspace to create')
param workspaceName string
@description('Display name for the workspace')
param workspaceDisplayName string = workspaceName
@description('Description for the workspace')
param workspaceDescription string = 'Sample APIM workspace created via Bicep'
resource apimService 'Microsoft.ApiManagement/service@2024-10-01-preview' existing = {
name: apimServiceName
}
resource apimWorkspace 'Microsoft.ApiManagement/service/workspaces@2024-10-01-preview' = {
name: workspaceName
parent: apimService
properties: {
displayName: workspaceDisplayName
description: workspaceDescription
}
}
output workspaceId string = apimWorkspace.id
output workspaceNameOut string = apimWorkspace.name
Az cli Command to deploy:
az deployment group create --resource-group kprg --template-file main.bicep --parameters apimServiceName='APIM_Name' workspaceName='Workspace_Name' workspaceDescription='Workspace for my APIs'
- I could deploy the workspace using above Bicep template:
az deployment group create --resource-group kprg --template-file main.bicep --parameters apimServiceName='kp-apim-service11' workspaceName='kp-workspace2' workspaceDescription='Workspace for my APIs'
{
"id": "/subscriptions/5f33XX3d2b55/resourceGroups/kprg/providers/Microsoft.Resources/deployments/main",
"location": null,
"name": "main",
"properties": {
"correlationId": "5cbba8dd-10XX0-ad6e92a185d9",
"debugSetting": null,
"dependencies": [],
"diagnostics": null,
"duration": "PT4.4776633S",
"error": null,
"extensions": null,
"mode": "Incremental",
"onErrorDeployment": null,
"outputResources": [
{
"apiVersion": null,
"extension": null,
"id": "/subscriptions/5f3XXb55/resourceGroups/kprg/providers/Microsoft.ApiManagement/service/kp-apim-service11/workspaces/kp-workspace2",
"identifiers": null,
"resourceGroup": "kprg",
"resourceType": null
}
],
"outputs": {
"workspaceId": {
"type": "String",
"value": "/subscriptions/5f33XXd2b55/resourceGroups/kprg/providers/Microsoft.ApiManagement/service/kp-apim-service11/workspaces/kp-workspace2"
},
"workspaceNameOut": {
"type": "String",
"value": "kp-workspace2"
}
},
"parameters": {
"apimServiceName": {
"type": "String",
"value": "kp-apim-service11"
},
"workspaceDescription": {
"type": "String",
"value": "Workspace for my APIs"
},
"workspaceDisplayName": {
"type": "String",
"value": "kp-workspace2"
},
"workspaceName": {
"type": "String",
"value": "kp-workspace2"
}
},
"parametersLink": null,
"providers": [
{
"id": null,
"namespace": "Microsoft.ApiManagement",
"providerAuthorizationConsentState": null,
"registrationPolicy": null,
"registrationState": null,
"resourceTypes": [
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locationMappings": null,
"locations": [
null
],
"properties": null,
"resourceType": "service/workspaces",
"zoneMappings": null
}
]
}
],
"provisioningState": "Succeeded",
"templateHash": "695XX49075224066",
"templateLink": null,
"timestamp": "2025-11-03T15:14:01.927651+00:00",
"validatedResources": null,
"validationLevel": null
},
"resourceGroup": "kprg",
"tags": null,
"type": "Microsoft.Resources/deployments"
}
Deployed Workspace in Portal:
Hope it helps!
Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you.