Skip to content

Misleading argument name in az apim api: --api-id #28513

@noenapply

Description

@noenapply

Describe the bug

The --api-id argument takes the name as an argument, not the ID.

Related command

az apim api show

Errors

Operation returned an invalid status 'Not Found'

Issue script & Debug output

Not relevant

Expected behavior

When passing the ID to the --api-id argument, the object is returned.

Environment Summary

azure-cli 2.58.0

core 2.58.0
telemetry 1.1.0

Extensions:
account 0.2.5
interactive 0.5.3

Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\%username%\.azure\cliextensions'

Python (Windows) 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC v.1937 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

Please state explicitly in the documentation that the --api-id argument takes the name of the API entry, and not the ID, as opposed to what is implied by the argument name.

The root cause of this seems to be that the ID has been called name, and the absolute path within the tenant has been called ID.
Both are misleading.

Stuff like this is quite infuriating to deal with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    API Managementaz apimAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions