App Display Name Regex

Hi, 

A couple of our clients had some special characters in their app display name and they were failing validations.

What is the DisplayName attribute's regex validation?

Thank you,

John

0 8 286
8 REPLIES 8

I don't know the answer to that. But someone might be able to help.

Can you clarify some details for me:  Can you tell me where your clients saw the "failing validations"?  At what point, what system returned an error, how did the person observe the validation error? 

We could not change the app's display name and the network call gave us back a 404 with the following message:
Company named {COMPANY_NAME} does not exist in organization {ORG_NAME}

Their intended name was 312^App. 

Because of that we just wanted to have a clear set of rules/character limits on the app display name

As pointed out to refer @dknezic if you check the api spec little more in detail (On top of the page https://apidocs.apigee.com/docs/developer-apps/1/types/DeveloperApp there is a option to download spec) which gives you better understanding of each attribute's type & format etc and the rules. In this case App Name with caret can not be created since the attribute Name is expecting as string. My understanding it will only accept below characters for an Apigee developer App name:

  • Lowercase letters (a-z)
  • Uppercase letters (A-Z)
  • Numbers (0-9)
  • Underscore (_)
  • Hyphen (-)

Unfortunately you can not create an App with caret operator.

EDIT:

For Display Name there isn't any issue creating with "^" symbol.. However both represents similar attribute type. May be there is a need to update the api spec/docs to callout on specific rules.

If we look closely the dev app creation api contract we see the req ref as DeveloperAppRequest & if we cross verify it attributes as array & they are simple name/value string type. It would be nice to re-work on contract and add additional rules etc which will help. Also other observation around errors it wasn't callout all different types of failures for management api (in this case it was just documented only 400 but definitely can be added more types along with the error schema information.

APIEvangelist_0-1684249197281.png

APIEvangelist_1-1684249270220.pngAPIEvangelist_2-1684249284780.png

And going back to your specific error which you mentioned as

"Company named {COMPANY_NAME} does not exist in organization {ORG_NAME}"

Can you provide more information as what point you are facing this error Is it calling management API with GET operation and trying to fetch the developer app/company?

More information will help easy resolutions.

 

I understand the app name convention. However, I’ve been discussing the app display name.

If this is from Apigee X, the error message also refers back to the Apigee API Management Docs for correct format. 

This documents the character constraints of the name attribute

https://apidocs.apigee.com/docs/developer-apps/1/types/DeveloperApp

I’m asking for help on app display name, which the docs do not provide constraints on. The same character limits do not apply because I was able to have the & symbol and apostrophes 

I was able to create an on Apigee X that has ^ in the display name successfully so you may want to confirm what was entered for both fields.

I just tried modifying the app and it didn’t work and when I tried again it worked. So maybe there’s a different issue. 

 

So should I just assume there’s no character restriction? Just weird behaviors in the UI?