SNOW-CAD Integrating and managing application data Practice Question
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?
⚠ Common exam trap
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.
Answer choices
Why each option matters
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.
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.
- ✗
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.
Go deeper
Related to this question
About these practice questions
One of 481 original SNOW-CAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.