You are currently reviewing an older revision of this page.

DRAFT KB-[SP-6076] Creating or importing Web API fails with error "could not insert: [com.appiancorp.webapi.WebApi]"

Symptoms

Creating or importing a web API in Appian Designer fails with the following error in the application server log:

webApi <UUID> "<WEBAPI_NAME>": An error occurred while creating webApi [uuid=<UUID>]: org.hibernate.exception.ConstraintViolationException: could not insert: [com.appiancorp.webapi.WebApi] (APNX-1-4071-007)
...
Caused by: java.sql.SQLException: Duplicate entry '<EXTENSION NAME>-<HTTP METHOD>-0' for key 'webapi_aliasmethod_idx'


Cause

A web API with the same extension already exists in the environment. Web API extension names are saved to the primary database and must be unique.

Action

Rename the extension of the web API to be unique. This can be the extension of the web API being created/imported or the existing web API.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: June 2021