az apic service returns 400 Bad Request when importing APIs from APIM

Open
#36 3 comments 0 reactions 1 assignee View on GitHub

@jukasper is already working on this.

Since May 15, 2024.

Assessment

This issue has not been assessed yet.

Description

Solution provided

Description

When trying to import APIs from an APIM instance into APIC using Azure CLI's az apic import-from-apim command in PowerShell, the result is always a 4000 BAD REQUEST with an error Object reference not set to an instance of an object. I just installed the extension today to work with apic, so it should be a newer version.

Reproduction steps

Steps to reproduce the behavior:

  1. Retrieve the APIM ID
  2. Concatenate "/apis/*" to the end of the APIM ID into a new var $apiIDs
  3. Execute the command az apic service import-from-apim --service-name <service name> --resource-group <rg-name> --source-resource-ids $apiIDs

Expected behavior

The APIs should import.

Actual behavior

Always receive a 400 BAD REQUEST with an "Object reference not set to an instance of an object" error.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Just installed the APIC extension today, so the version is newer. Followed the examples in the APIC import from APIM Microsoft Documentation.

Dominant language
PowerShell
Stars
45
Forks
21
Avg merge
21m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/api-center

All issues in Azure/api-center

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.