Description
Description
During the API import process, Migrated APIs with policies fail to import, resulting in the following error:
Error importing API.
Status: 400
Response: {"code":902005,"message":"Cannot find the selected api policy","description":"Selected api policy is not found","moreInfo":"","error":[]}
apictl: Error importing API Reason: 400
Exit status 1
Reason: The policy directory doesn't contain with the necessary policy XML files in the exported API package. However, the api.json file does reference the missing policy, as shown below:
"apiPolicies": {
"request": [],
"response": [
{
"policyName": "xml_to_json_out_message",
"policyVersion": "v1",
"policyId": "2351faef-2ad1-4dd3-a368-21aeeab92ccd"
}
],
"fault": []
},
Due to this missing policy, the import process is interrupted.
Steps to Reproduce
- Do a migration from APIM 3.2.0 to APIM 4.3.0
- Export and Import an API with policies from one APIM 4.3.0 to Another APIM 4.3.0 via APICTL tool(APIM CTL 4.3.0)
- The import process will fail with a 400 error code and message is "Selected api policy is not found".
Version
APIM 4.3.0
Environment Details (with versions)
No response