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 '<ENDPOINT NAME>-<HTTP METHOD>-0' for key 'webapi_aliasmethod_idx'

Cause

A web API with the same endpoint and HTTP method already exists in the environment. Web API endpoint and HTTP method combinations names are saved to the primary database, and the combination of the HTTP method and endpoint must be unique across all web APIs in the system.

Action

Rename the endpoint of the web API to be unique. This can be the endpoint 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