Azure / Azure/azure-rest-api-specs
[BUG] API Center - Deleted Services - multiple endpoints broken
Nobody has claimed this yet.
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 6k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/apicenter/resource-manager/Microsoft.ApiCenter/preview/2024-06-01-preview/apicenter.json
### API Spec version
2024-06-01-preview,2024-03-15-preview
### Describe the bug
Multiple endpoints under the API Center Deleted Services service appear to be broken in all available API versions, with some not implemented while documented in the API spec.
The endpoints with issues are:
- Deleted Services - List By Subscription (GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ApiCenter/deletedServices?api-version=2024-06-01-preview)
- Deleted Services - Get (GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/deletedServices/{deletedServiceName}?api-version=2024-06-01-preview)
- Deleted Services - Delete (DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/deletedServices/{deletedServiceName}?api-version=2024-06-01-preview
### Expected behavior
## Deleted Services - List By Subscription
Returns a list of all deleted services within the target subscription, similar to the working Resource Group specific endpoint
## Deleted Services - Get
Returns the specified deleted service, similar to the working Resource Group specific endpoint
## Deleted Services - Delete
Purges the specified soft-deleted service
### Actual behavior
## Deleted Services - List By Subscription
502 - BadGateway
{"error":{"code":"ProviderError","message":"Resource provider 'Microsoft.ApiCenter' failed to return collection response for type 'deletedServices'."}}
## Deleted Services - Get
400 - BadRequest
{"error":{"code":"UnsupportedResourceOperation","message":"The resource type 'deletedServices' does not support this operation."}}
## Deleted Services - Delete
400 - BadRequest
{"error":{"code":"UnsupportedResourceOperation","message":"The resource type 'deletedServices' does not support this operation."}}
### Reproduction Steps
Create and delete an instance of an API Center service. Then using the details of the deleted service run the following:
```pwsh
$token = ''
$subscriptionId = ''
$resourceGroup = ''
$serviceName = ''
$headers = @{
Authorization = "Bearer $($token)"
}
"Deleted Services - List By Subscription"
$req = Invoke-WebRequest `
-Uri "https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.ApiCenter/deletedServices?api-version=2024-06-01-preview" `
-Headers $headers `
-Method Get `
-SkipHttpErrorCheck
"$($req.StatusCode) - $($req.StatusDescription)"
$req.Content
"Deleted Services - Get"
$req = Invoke-WebRequest `
-Uri "https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.ApiCenter/deletedServices/${serviceName}?api-version=2024-06-01-preview" `
-Headers $headers `
-Method Get `
-SkipHttpErrorCheck
"$($req.StatusCode) - $($req.StatusDescription)"
$req.Content
"Deleted Services - Delete"
$req = Invoke-WebRequest `
-Uri "https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.ApiCenter/deletedServices/${serviceName}?api-version=2024-06-01-preview" `
-Headers $headers `
-Method Delete `
-SkipHttpErrorCheck
"$($req.StatusCode) - $($req.StatusDescription)"
$req.Content
```
### Environment
Name Value
---- -----
PSVersion 7.6.1
PSEdition Core
GitCommitId 7.6.1
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with specification/apicenter/resource-manager/Microsoft.ApiCenter/preview/2024-06-01-preview/apicenter.json and inspect the deletedServices operation definitions. Compare those definitions with the listed PowerShell requests and their responses. Done would require the documented list, get, and delete operations to work across the stated API versions, but the issue does not identify an implementation entry point in this repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100