The answer is that the sysparm_query parameter cannot accept scripts in ServiceNow REST API calls, so using one triggers a bad request error. This is because the REST API specification for the /api/now/table endpoint strictly expects an encoded query string—composed of operators like '=', '^', and 'STARTSWITH'—not executable code. When a developer mistakenly passes a script into sysparm_query, the API interprets it as invalid syntax, rejecting the call outright. On the ServiceNow Certified Application Developer CAD exam, this scenario tests your understanding of REST API constraints versus server-side scripting; a common trap is assuming GlideRecord-style scripted queries work in REST endpoints. Remember the memory tip: “REST reads queries, not scripts”—if you see a script in sysparm_query, expect a 400 error.
SNOW-CAD Integrating and managing application data Practice Question
This SNOW-CAD practice question tests your understanding of integrating and managing application data. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
{
"method": "GET",
"endpoint": "/api/now/table/sys_user",
"headers": {
"Accept": "application/json"
},
"queryParameters": {
"sysparm_query": "active=true^role=ITIL^sys_created_on>=javascript:gs.beginningOfLastMonth()"
}
}
A developer is testing a REST API call to retrieve active users with the ITIL role created since last month. The response returns an error. What is the most likely cause?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The query parameter sysparm_query uses a script which is not allowed in REST API calls.
The error occurs because the sysparm_query parameter in a REST API call to the /api/now/table/sys_user endpoint does not support scripts; it only accepts encoded query strings using operators like '=', '^', 'STARTSWITH', etc. Using a script in sysparm_query violates the REST API specification, which expects a simple query string, not executable code, leading to a bad request error.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The Accept header should be application/xml.
Why it's wrong here
The Accept header can be application/json or application/xml; JSON is valid.
✓
The query parameter sysparm_query uses a script which is not allowed in REST API calls.
Why this is correct
ServiceNow REST API does not evaluate client-side scripts in query parameters; the date must be precomputed.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
The endpoint should be /api/now/table/sys_user_list.
Why it's wrong here
The correct endpoint for table API is /api/now/table/{tableName}.
✗
The query should use sysparm_fields instead of sysparm_query.
Why it's wrong here
sysparm_fields is used to specify fields to return, not to filter records.
Common exam traps
Common exam trap: answer the scenario, not the keyword
ServiceNow often tests the misconception that sysparm_query can accept any JavaScript expression, when in fact it only supports a predefined set of operators and encoded query strings, not arbitrary scripts.
Detailed technical explanation
How to think about this question
ServiceNow REST API endpoints accept query parameters like sysparm_query that must be URL-encoded and follow the encoded query string syntax (e.g., 'active=true^role=ITIL^sys_created_onONLast month@javascript:gs.beginningOfLastMonth()@javascript:gs.endOfLastMonth()'). Scripts are not evaluated server-side in REST API calls because the API is designed for stateless, simple query operations; for dynamic queries, developers must use GlideRecord in scripts or the Scripted REST API. A real-world scenario is when a developer tries to pass a JavaScript condition like 'sysparm_query=active=true^role=ITIL^sys_created_on>=gs.daysAgoStart(30)' which fails because the API does not interpret gs.daysAgoStart() as a function.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the SNOW-CAD exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Integrating and managing application data — This question tests Integrating and managing application data — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The query parameter sysparm_query uses a script which is not allowed in REST API calls. — The error occurs because the sysparm_query parameter in a REST API call to the /api/now/table/sys_user endpoint does not support scripts; it only accepts encoded query strings using operators like '=', '^', 'STARTSWITH', etc. Using a script in sysparm_query violates the REST API specification, which expects a simple query string, not executable code, leading to a bad request error.
What should I do if I get this SNOW-CAD question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SNOW-CAD practice question is part of Courseiva's free ServiceNow certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SNOW-CAD exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.