{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
1
Question by Mohit Rupani · May 28, 2015 at 04:27 PM · 534 Views jsonjson payload

What does "ArrayElementCount" in JSON Threat Protection Policy means?

Can I use "ArrayElementCount" to determine how many employees are there in a department?

Here is my JSON:

{
  "dept": "Dev",
  "Employees": [{
    "empName": "Name1",
    "id": 123
  }, {
    "empName": "Name2",
    "id": 456
  }]
}

I want to basically limit the number of employees in a department to 1. Over here, we have 2 employees for the dept. Can i use JSON threat protection to implement this?

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

2 Answers

  • Sort: 
avatar image
0
Best Answer

Answer by Dino   · May 28, 2015 at 06:10 PM

Hi Mohit, thanks for the question .

When testing this myself, I see that it's not behaving as I would expect. In other words when I pass in an array that has a length greater than the limit specified in the policy, the policy does not trigger a fault.

I think this may be a bug in the implementation of the policy.

As a workaround, you could build a custom JS callout to check this. If you need help with that let me know, and I'll work up some code for you. or look here

Comment
Add comment Show 5 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mohit Rupani · May 28, 2015 at 06:15 PM 0
Link

Thanks Dino. I do have a JS workaround for it. I just wanted to know if we could implement this via JSON threat Protection.

Is there some log that is being released everytime after APIGEE fixes the bug? It would be good to know the bug fixes provided by APIGEE after every release.

avatar image birute@google.com ♦♦ Mohit Rupani   · May 28, 2015 at 06:20 PM 0
Link

@Mohit Rupani check out this page http://apigee.com/docs/release-notes/content/apigee-release-notes . This page provides release notes for Apigee Edge cloud and on-premises products. It also includes release notes archives.

avatar image Mohit Rupani birute@google.com ♦♦ · May 28, 2015 at 06:41 PM 0
Link

Thanks @Birute

avatar image Mohit Rupani · May 28, 2015 at 06:42 PM 0
Link

@Dino : Since we are on this topic, can you guide me as to how to use JSON threat protection properly? Is there some link I can look into to understand its usage better?

avatar image Dino ♦♦ Mohit Rupani   · May 28, 2015 at 08:40 PM 0
Link

@Mohit Rupani - Just the documentation. I think maybe you've already seen this: http://apigee.com/docs/api-services/reference/json-threat-protection-policy If this page isn't clear enough, let me know, and I'll try to make it better.

avatar image
0

Answer by davidmehi · Aug 26, 2016 at 06:28 PM

Make sure the header Content-Type: application/json is set, otherwise the policy won't check it because it doesn't know the payload is JSON.

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I send JSON body to my POST request in Javascript and same way do do I get JSON response in my APIGEE api proxy program 2 Answers

Not able to extract values from json response 2 Answers

JSON string to be extracted from header 1 Answer

unable to get JSON data in body of the the output. 1 Answer

Rest > Soap (using POST), json payload parameters are not propagated 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges