---
sourceDocument: Australia API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/api-reference

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Guarded script API support

# JavaScript APIs supported by guarded script {#ariaid-title1}

* Release version: Australia
* 
* Updated May 5, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

Review the JavaScript APIs that guarded script supports to help you analyze scripts in the Incompatible Guarded Scripts list and either rewrite them or create an exemption for them.{#guarded-script-allowed-apis__patch-rn-ap2-1}
The guarded script evaluator permits the following methods from the ServiceNow server-side JavaScript APIs and the built-in JavaScript APIs. The guarded script evaluator handles scripts that call unsupported APIs differently depending on the transaction type and instance
configuration. For more information, see [Guarded script evaluator](https://www.servicenow.com/docs/vGoAT93xaAhFUcHpSXVJyg "The guarded script evaluator enhances instance security by supporting only a restricted scripting language and detecting or rejecting untrusted scripts that use unsupported JavaScript features.").

## ServiceNow JavaScript APIs supported by guarded script {#guarded-script-allowed-apis__section_allowed_apis}

Guarded script permits calling the following methods from server-side JavaScript APIs in untrusted scripts. For more information about server APIs, see [Server API reference](https://www.servicenow.com/docs/BEoSM3ygWLP99GqH7uS0LQ "Use server APIs in scripts to change the functionality of applications, or when you create new applications.").
{#guarded-script-allowed-apis__table_allowed_apis__entry__2}

| Class | Method |
|-|-|
| GlideSystem (gs) | * beginningOfCurrentHour() * beginningOfCurrentMinute() * beginningOfDay() * beginningOfLast120Days() * beginningOfLast12Months() * beginningOfLast15Minutes() * beginningOfLast2Hours() * beginningOfLast2Quarters() * beginningOfLast2Years() * beginningOfLast30Days() * beginningOfLast30Minutes() * beginningOfLast3Months() * beginningOfLast45Minutes() * beginningOfLast60Days() * beginningOfLast6Months() * beginningOfLast7Days() * beginningOfLast90Days() * beginningOfLast9Months() * beginningOfLastHour() * beginningOfLastMinute() * beginningOfLastMonth() * beginningOfLastQuarter() * beginningOfLastSchedulePeriod() * beginningOfLastWeek() * beginningOfLastYear() * beginningOfMonth() * beginningOfNext2Quarters() * beginningOfNextMonth() * beginningOfNextQuarter() * beginningOfNextSchedulePeriod() * beginningOfNextWeek() * beginningOfNextYear() * beginningOfOneYearAgo() * beginningOfSchedulePeriodsAgo() * beginningOfThisMonth() * beginningOfThisQuarter() * beginningOfThisSchedulePeriod() * beginningOfThisWeek() * beginningOfThisYear() * beginningOfToday() * beginningOfTomorrow() * beginningOfWeek() * beginningOfYear() * beginningOfYesterday() * calDateDiff() * dateAdd() * dateDiff() * dateGenerate() * datePart() * daysAgo() * daysAgoEnd() * daysAgoLocal() * daysAgoStart() * endOfCurrentHour() * endOfCurrentMinute() * endOfDay() * endOfLast120Days() * endOfLast12Months() * endOfLast15Minutes() * endOfLast2Hours() * endOfLast2Quarters() * endOfLast2Years() * endOfLast30Days() * endOfLast30Minutes() * endOfLast3Months() * endOfLast45Minutes() * endOfLast60Days() * endOfLast6Months() * endOfLast7Days() * endOfLast90Days() * endOfLast9Months() * endOfLastHour() * endOfLastMinute() * endOfLastMonth() * endOfLastQuarter() * endOfLastSchedulePeriod() * endOfLastWeek() * endOfLastYear() * endOfMonth() * endOfNext2Quarters() * endOfNextMonth() * endOfNextQuarter() * endOfNextSchedulePeriod() * endOfNextWeek() * endOfNextYear() * endOfOneYearAgo() * endOfSchedulePeriodsAgo() * endOfThisMonth() * endOfThisQuarter() * endOfThisSchedulePeriod() * endOfThisWeek() * endOfThisYear() * endOfToday() * endOfTomorrow() * endOfWeek() * endOfYear() * endOfYesterday() * generateGUID() * getCurrentScopeName() * getDurationDate() * getMessage() * getPreference() * getUser() * getUserDisplayName() * getUserID() * getUserName() * hasRole() * hoursAgo() * hoursAgoEnd() * hoursAgoLocal() * hoursAgoStart() * isFirstDayOfMonth() * isFirstDayOfWeek() * isFirstDayOfYear() * isInteractive() * isLastDayOfMonth() * isLastDayOfWeek() * isLastDayOfYear() * isLoggedIn() * lastWeek() * minutesAgo() * minutesAgoEnd() * minutesAgoStart() * monthsAgo() * monthsAgoEnd() * monthsAgoStart() * nil() * now() * nowDateTime() * nowGlideDateTime() * nowNoTZ() * quartersAgo() * quartersAgoEnd() * quartersAgoStart() * user() * userID() * user_id() * yearsAgo() * yesterday() {#guarded-script-allowed-apis__ul_gs_methods} |
| GlideUser | * getCompanyID() * getCompanyRecord() * getCountry() * getDateFormat() * getDateFormatEx() * getDateTimeFormat() * getDepartmentID() * getDisplayName() * getDomainDisplayValue() * getDomainID() * getEmail() * getFirstName() * getFullName() * getLanguage() * getLastName() * getLocation() * getManagedGroups() * getManagerID() * getManagerName() * getMobileNumber() * getMyExplicitGroups() * getMyGroups() * getMyGroupsExcludeAdmin() * getTZ() * getTimeFormat() * getTimeFormatEx() * getTimeZoneLabel() * getTimeZoneLabelLang() * getTitle() * getUserRoles() * isExplicitMemberOf() * isMemberOf() {#guarded-script-allowed-apis__ul_glideuser_methods} |
| GlideDate | * getByFormat() * getDayOfMonthNoTZ() * getDisplayValue() * getDisplayValueEx() * getDisplayValueInternal() * getDisplayValueLang() * getMonthNoTZ() * parseDate() * setDisplayValue() * setDisplayValueEx() * setDisplayValueLang() * setValue() {#guarded-script-allowed-apis__ul_glidedate_methods} |
| GlideDateTime | * add() * addDays() * addDaysLocalTime() * addDaysUTC() * addMonths() * addMonthsLocalTime() * addMonthsUTC() * addSeconds() * addWeeks() * addYears() * compareTo() * getDate() * getDayOfMonth() * getDayOfMonthLocalTime() * getDayOfMonthUTC() * getDayOfWeek() * getDayOfWeekLocalTime() * getDayOfWeekUTC() * getDaysInMonth() * getDaysInMonthLocalTime() * getDaysInMonthUTC() * getDisplayValue() * getDisplayValueEx() * getDisplayValueInternal() * getDisplayValueLang() * getLocalDate() * getLocalTime() * getMonth() * getMonthLocalTime() * getMonthUTC() * getNumericValue() * getTZOffset() * getTime() * getUserTimeZone() * getValue() * getWeekOfYearLocalTime() * getWeekOfYearUTC() * getYear() * getYearLocalTime() * getYearUTC() * isDST() * onOrAfter() * onOrBefore() * setDayOfMonthUTC() * setDisplayValue() * setDisplayValueEx() * setDisplayValueLang() * setMonth() * setNumericValue() * setTZ() * setTimeZone() * setValue() * setValueUTC() * subtract() * toString() {#guarded-script-allowed-apis__ul_glidedatetime_methods} |
| GlideTime | * getDisplayValue() * setValue() {#guarded-script-allowed-apis__ul_glidetime_methods} |
| GlideRecord | * getDisplayValue() * getUniqueValue() * getValue() * isValid() * isValidRecord() {#guarded-script-allowed-apis__ul_gliderecord_methods} |
| GlideBusinessCalendarUtil | * getCalendarEnd() * getCalendarFilterOptions() * getCalendarSpanBounds() * getCalendarStart() * getCalendars() * isLegacySchedule() {#guarded-script-allowed-apis__ul_glidebusinesscalendarutil_methods} |
| GlideApplicationProperty | getValue() |
| GlidePluginManager | isActive() |
| GlideLocale | get() |
| GlideSessionDebug | * disable() * enable() {#guarded-script-allowed-apis__ul_glidesessiondebug_methods} |
| GlideDomainSupport | getCurrentDomainValueOrGlobal() |
| GlideAccessibility | isEnabled() |
| GlideJSUtil | * nil() * notNil() {#guarded-script-allowed-apis__ul_glidejsutil_methods} |
| GlideNumberManager | getNextObjNumberPadded() |
| TableUtils | getAllExtensions() |
| GlideListFilter | * getItilDefaultGroupTypes() * getNonItilDefaultGroupTypes() {#guarded-script-allowed-apis__ul_glidelistfilter_methods} |
| GlideEmailWatermark | optionallyRandomize() |
| GlideCounter | next() |
| GlideProperties | get() |
| GlideTSDebug | enable() |
| DashboardFiltersParser | * getBookmarked() * getCertified() * getCreatedByMe() * getDashboardsWithCategories() * getRecent() * getSharedWithMe() {#guarded-script-allowed-apis__ul_dashboardfiltersparser_methods} |
[Table 1. Allowed ServiceNow JavaScript methods]

{#guarded-script-allowed-apis__table_allowed_apis}

## JavaScript built-in APIs supported by guarded script {#guarded-script-allowed-apis__section_builtin_methods}

Guarded script also permits calling the following methods on JavaScript built-in objects in untrusted scripts.
{#guarded-script-allowed-apis__table_builtin_methods__entry__2}

| Object | Method |
|-|-|
| Array | Static methods: * isArray() * of() {#guarded-script-allowed-apis__ul_array_static} Instance methods: * concat() * entries() * flat() * includes() * indexOf() * join() * keys() * lastIndexOf() * length * slice() * toString() * values() {#guarded-script-allowed-apis__ul_array_instance} |
| Object | Static methods: * entries() * getOwnPropertyDescriptor() * getOwnPropertyNames() * is() * isExtensible() * isFrozen() * isSealed() * keys() * values() {#guarded-script-allowed-apis__ul_object_static} Instance methods: * hasOwnProperty() * isPrototypeOf() * propertyIsEnumerable() * toLocaleString() * toString() * valueOf() {#guarded-script-allowed-apis__ul_object_instance} |
| String | Static methods: * fromCharCode() * fromCodePoint() {#guarded-script-allowed-apis__ul_string_static} Instance methods: * at() * charAt() * charCodeAt() * codePointAt() * concat() * endsWith() * includes() * indexOf() * lastIndexOf() * length * normalize() * replace() * replaceAll() * slice() * split() * startsWith() * substr() * substring() * toLocaleLowerCase() * toLocaleUpperCase() * toLowerCase() * toString() * toUpperCase() * trim() * trimEnd() * trimStart() * valueOf() {#guarded-script-allowed-apis__ul_string_instance} |
| Number (constructor) | Static methods: * isFinite() * isInteger() * isNaN() * isSafeInteger() * parseFloat() * parseInt() {#guarded-script-allowed-apis__ul_number_static} Instance methods: * toExponential() * toFixed() * toLocaleString() * toPrecision() * toString() * valueOf() {#guarded-script-allowed-apis__ul_number_instance} |
| Boolean (constructor) | Instance methods: * toString() * valueOf() {#guarded-script-allowed-apis__ul_boolean_instance} |
| Date (constructor) | Static methods: * now() * parse() * UTC() {#guarded-script-allowed-apis__ul_date_static} Instance methods: * getDate() * getDay() * getFullYear() * getHours() * getMilliseconds() * getMinutes() * getMonth() * getSeconds() * getTime() * getTimezoneOffset() * getUTCDate() * getUTCDay() * getUTCFullYear() * getUTCHours() * getUTCMilliseconds() * getUTCMinutes() * getUTCMonth() * getUTCSeconds() * toDateString() * toGMTString() * toISOString() * toJSON() * toLocaleDateString() * toLocaleString() * toLocaleTimeString() * toString() * toTimeString() * toUTCString() * valueOf() {#guarded-script-allowed-apis__ul_date_instance} |
| Math | Static methods: * abs() * acos() * asin() * atan() * atan2() * ceil() * cos() * exp() * floor() * log() * max() * min() * pow() * random() * round() * sin() * sqrt() * tan() {#guarded-script-allowed-apis__ul_math_static} |
| JSON | Static methods: * parse() * stringify() {#guarded-script-allowed-apis__ul_json_static} |
[Table 2. Allowed JavaScript built-in methods]

{#guarded-script-allowed-apis__table_builtin_methods}

