Custom Attribute length limitation

HI Team,

Understood that only 18 custom attributes are allowed when creating company.

Is there is any length limitation for a custom attribute value?

for Example custom Attribute size can be only 500 characters or something ?

0 5 794
5 REPLIES 5

Hi @santhoshkumar.nagulanchi,

Right now, there is not specific length has been specified for custom attributes. But there is a limit in size. To save your time here is the summary -

  • 18 Custom attributes on developers, developer apps, API products, OAuth access tokens, and other Edge entities
  • 1KB Custom attribute name size
  • 2KB Custom attribute value size (text data only)

You can check the details from the doc - https://docs.apigee.com/api-platform/reference/limits

soosmarci
Participant I

Hi @itravindrasingh , @kurtkanaskie 

similar question: 

https://www.googlecloudcommunity.com/gc/Apigee/API-Product-Custom-Attribute-Limits/m-p/52807 

I use Hybrid.

Could you please help understanding those limits? 
In what level are those numbers defined?

1. if i have 2 DeveloperApp and 3 API products, then I can have 18 custom attributes or 3*18 custom attributes, 18 for each APIProducts plus 2*18 customAttributes, 18 for each DeveloperApp, so 5*18 per environment / per organization..?

2. In what level is the 2KB value size validated? Considering the previous example, can I have 5*2KB customAttributes value, or just 2kb at sum (per entityType or per environment..?)?

3. I observed that when I have an ApiProduct customAttribute that exceeds 50 char, then when I click on Save APIProduct btn, I'm facing with the following error msg:

"Product not saved. Error: Custom attribute (Key+Value) size in Operation Group exceeded limit {0}."

It seems key+value size must be  <= 50, though I did not find any evidence of this limitation in ApiGee documentation, neither in this forum.

Thx in advance,

Marcello

Hi @soosmarci ,

The custom attribute limits are per entity as defined: https://cloud.google.com/apigee/docs/api-platform/reference/limits#keys,-developers,-apps

I'm not seeing those errors. I just tested the limits on an API Product in Apigee Edge, Apigee X and Apigee X Hybrid using both the UI and via APIs. I didn't see any errors. So apparently it's not enforced yet.

I entered an attribute named "maxSize" with a sequence of numbers for the value (e.g. 11111111112222222222...) that totaled 32724 characters in a text file. 

I also entered an attribute named "1111111111222..." that is 100 characters long and the value from above.

$ curlx https://apigee.googleapis.com/v1/organizations/$ORG/apiproducts/maxSize
{
  "name": "maxSize",
  "displayName": "maxSize",
  "approvalType": "auto",
  "attributes": [
    {
      "name": "1111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000",
      "value": "1111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000,111111111122222222
... content clipped

 

soosmarci
Participant I

Hi @kurtkanaskie ,

My bad, probably I could not express myself clear enough, so let me clarify the issue.

The documentation you are referring to contains information regarding Keys, Developers, Apps, Products. If I am correct in your example you created a custom attribute on APIProduct level. It works for me too, actually if I am correct it accept much more than 1 or 2kb, but this is not my problem now.

My problem is with the customAttributes that I would record on the operation (operationgroup?) level, at the level below APIProduct.

The "Operation" window accepts the values (when I close this "Operation" window with Save btn) - so the Save btn here does not have any problem with it - I assume there is no any validation at this point.

Custom attribute - Operation window.PNG

So now I closed the Operation window successfully. After that I click on the SAVE btn (the one between Edit and Delete at the top of the Page), the browser receives HTTP400, so saving the Product is not possible, and the following error message is displayed:

Custom attribute (Key+Value) size in Operation Group exceeded limit.PNG

I did not find any documentation about this error message, furthermore it seems incomplete - I am not sure the {0} is what we should see here, maybe the configured limit (50) should be in place of it. Saving with key+value <= 50 works properly.

Response payload:

 

{
  "error": {
    "code": 400,
    "message": "Custom attribute (Key+Value) size in Operation Group exceeded limit {0}",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
        "violations": [
          {
            "type": "keymanagement.service.AttributeSizeLimitExceeded",
            "subject": "[2002:a17:531:4bc5::]:4377:enbfd5:9869:377875:100741935",
            "description": "Custom attribute (Key+Value) size in Operation Group exceeded limit {0}"
          }
        ]
      },
      {
        "@type": "type.googleapis.com/google.rpc.RequestInfo",
        "requestId": "2830721417413489133"
      }
    ]
  }
}

 

I hope I could explain my problem and you can help me finding some explanation and documentation of the AttributeSizeLimitExceeded error, how to resolve it, where to check the configuration etc.

Thank you in advance,

Márton Soós

Hi @soosmarci ,

Thanks for the clarification, I see the issue now. I'll file a documentation issue.