Documentation Index
Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
POST /apiops/projects/{projectName}/apiProxies/import/
Authentication
Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN
Request
| Header | Value | Required |
|---|
| Authorization | Bearer | Yes |
| Content-Type | multipart/form-data | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|
| projectName | string | Yes | Project name where the API Proxy will be imported |
| Parameter | Type | Required | Description |
|---|
| apiProxyExportFile | file | Yes | ZIP file containing the API Proxy export. Must have .zip extension |
Notes
- File must be a valid ZIP archive
- File must end with
.zip extension (case-insensitive)
- ZIP file must contain a valid API Proxy export JSON file
- If an API Proxy with the same name exists, a suffix will be added automatically
Response
Success Response (200 OK)
Response Fields
| Field | Type | Description |
|---|
| status | string | Response status: SUCCESS or FAILURE |
Error Response (400 Bad Request)
{
"error": "bad_request",
"error_description": "projectName value can not be empty!"
}
or
{
"error": "bad_request",
"error_description": "apiProxyExportFile value can not be empty!"
}
or
{
"error": "bad_request",
"error_description": "apiProxyExportFile parameter must be in zip file format and must end with zip extension!"
}
Common Causes
- Empty
projectName
- Empty or missing file
- File is not a ZIP archive
- File does not have
.zip extension
- Invalid API Proxy export format
Error Response (401 Unauthorized)
{
"error": "unauthorized_client",
"error_description": "Invalid token"
}
Error Response (404 Not Found)
{
"error": "not_found",
"error_description": "Project(MyProject) was not found or user does not have privilege to access it!"
}
cURL Example
Example 1: Import API Proxy
curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/import/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "apiProxyExportFile=@apiProxyExportFile.zip"
Example 2: Import API Proxy with Custom Filename
curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/import/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "apiProxyExportFile=@my-api-export.zip"
Notes and Warnings
-
No Override:
- This endpoint does not override existing API Proxies
- If an API Proxy with the same name exists, a suffix will be added automatically
- Original API Proxy remains unchanged
-
Automatic Naming:
- Imported API Proxy name may be modified if a conflict exists
- Relative paths may also be modified to prevent conflicts
- Check the imported API Proxy name after import
-
File Format:
- File must be a valid ZIP archive
- File must end with
.zip extension (case-insensitive)
- ZIP file must contain valid API Proxy export JSON
-
Project Validation:
- Project must exist
- User must have access to the project
- User must have
API_MANAGEMENT + EXPORT_IMPORT permission
-
Import Content:
- Import includes all API Proxy configurations
- Includes all associated policies
- Includes routing, cache, CORS, and other settings
-
Deployment Status:
- Imported API Proxy is not deployed by default
- Deployment status from export is preserved
- You may need to deploy the imported API Proxy manually
Permissions
-
User must have
API_MANAGEMENT + EXPORT_IMPORT permission in the project
-
Alternatively, user can have project admin role
-
File Size:
- Large export files may take longer to import
- Ensure sufficient network bandwidth and server resources
-
Validation:
- Import validates API Proxy structure
- Invalid configurations may cause import to fail
- Check error messages for validation issues