While deploying Ontology Actions through Foundry Templates, I got OntologyMetadata:InvalidApiNameFormat

92 Views Asked by At

When deploying multiple assets through Foundry Templates, I got the following error message:

OntologyMetadata:InvalidApiNameFormat
Failed to deploy an action.

The only further error details I see in templates are:

apiNames
[notional3-generated-8dasd32-4bc9-4c312-831231232-113d31231236d80-new-action-312391c1-af321d-24-03123213129c]
safeMessage
Failed to deploy an action. Unknown error encountered.

We've deployed this same template successfully multiple times before, and the only addition we've made was adding prefixes to the Action Name APIs.

The asset that is failing deployment is an Ontology Action.

I wasn't able to find this, but I please get some specifics around OntologyMetadata API usage and constraints around InvalidApiNameFormat so I'm able to resolve the issue?

1

There are 1 best solutions below

0
On

There are multiple checks for the generated API name for an action to be valid, including no spaces, special characters and a max limit of 100 chars.

I found that when we've added a prefix to the generated API name in the Foundry Templates Set Parameters, the API name for the deployed actions extended beyond 100 characters.

By shortening the prefix we were able to deploy successfully.