---
title: "Import an API Proxy by overriding existing one"
method: PUT
path: "/apiops/projects/{projectName}/apiProxies/{apiProxyName}/import/"
tags: ["ApiProxy"]
---

# Import an API Proxy by overriding existing one

`PUT /apiops/projects/{projectName}/apiProxies/{apiProxyName}/import/`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/apiProxies/{apiProxyName}/import/`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/apiProxies/:apiProxyName/import/put.ts> (a function with typed inputs; its response is checked against the schema)

Imports an API Proxy, by overriding existing one if there is, if there is not creates a new API Proxy with provided configuration.

## Path parameters

- `projectName` string, required
- `apiProxyName` string, required

## Query parameters

- `withDependencies` boolean

## Headers

- `X-Apinizer-Package-Passphrase` string

## Request body `multipart/form-data`

- object
  - `metadata` string, required: metadata value has the metadata needed to create API Proxy and it is optional
  - `apiProxyExportFile` string, binary, required
  - `environmentMapping` string: Optional JSON: environment name in the package -> environment name in this installation (example: {"UAT":"Production"}). An empty value means that environment is deliberately not transferred. If omitted, the current behaviour is preserved: environments with the same name are matched, unmatched ones are dropped.
  - `certEnvironmentMergeMethod` string: Optional; environment matching method when override=true: MATCH_BY_NAME (default) or OVERWRITE_ALL.
  - `certEnvironmentUncoveredAction` string: Optional; for target environments not covered by the package when override=true: FILL_FROM_PACKAGE (fill from the package) or REMOVE_FROM_TARGET (remove from the target). If omitted and an uncovered environment exists, the import is rejected with 400 (INV-36).

## Response `200`

successful operation!

- ApiOpsResponseSuccess
  - `status` 'SUCCESS' | 'FAILURE'
  - `resultMessage` string
  - `resultList` string[]
  - `resultCount` integer
  - `deploymentResult` DeploymentResult
    - `envName` string
    - `podName` string
    - `podIp` string
    - `success` boolean
    - `detail` string
    - `responseTime` integer
    - `detailList` unknown[]
      - unknown
    - `firstFromApiResultList` unknown
  - `unresolvedReferences` string[]
  - `advisories` ApiOpsAdvisoryDTO[]
    - `level` string
    - `key` string
    - `params` object

## Other responses

- `401`: not authorized for this operation!
- `500`: internal error!

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
