Skip to content

Unable to Import Migrated API to Another Environment Due to Missing API Policy Error #3742

Closed
@nadeepoornima

Description

@nadeepoornima

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

  1. Do a migration from APIM 3.2.0 to APIM 4.3.0
  2. 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)
  3. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions