Skip to content

[BUG] API Center - Deleted Services - multiple endpoints broken #43339

@maciejporebski

Description

@maciejporebski

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:

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:

$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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions