API Testing · Junior · Question 58 of 75

What should happen when an API receives an unknown field in a request body?

Show the answer

Correct answer: It follows its documented rule, ignore or reject

Explanation

Some APIs reject unknown fields to catch typos; others ignore them for compatibility. Either way, behaviour should be documented and consistent.

Further reading

Problem with a question

API Testing · Junior · question 58

Test yourself

Take the API Testing · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz