Script Debugger API
-
- UpdatedJan 30, 2025
- 6 minutes to read
- Yokohama
- API reference
The Script Debugger API provides endpoints to debug lines of server-side JavaScript code, such as business rules and script includes.
For more information about the Script Debugger, see Script Debugger and Session Log.
This API is available by default.
Script Debugger - GET /js/debugpoints/script/{tableName}/{sysId}/{fieldName}
Retrieve a list of breakpoints or logpoints in a server-side script, such as a business rule or script include.
URL format
Default URL: /api/now/js/debugpoints/script/{tableName}/{sysId}/{fieldName}
Supported request parameters
Name | Description |
---|---|
tableName | Name of the table that contains the server-side script, such as sys_script or
sys_script_include. Data type: String |
sysId | Sys_id for the server-side script. Data type: String |
fieldName | Name of the field that contains the server-side script content. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
403 | User Not Authorized. The user who executed the request does not have permission to access breakpoint or log point information for the specified record. |
Response body parameters (JSON or XML)
Example cURL request
Example: cURL request
Retrieves a list of logpoints and breakpoints for a server-side script. This script has a logpoint on line 2, a breakpoint on line 11, and a conditional breakpoint on line 18.
Script Debugger - POST js/debugpoints/process
Add, update, or remove breakpoints or logpoints in a server-side script, such as a business rule or script include. Process several breakpoints or logpoints at a time.
URL format
Default URL: /api/now/js/debugpoints/process
Supported request parameters
Name | Description |
---|---|
None |
Name | Description |
---|---|
fetchAll | When true, returns a list of all the breakpoints or logpoints added or updated
by the user. Data type: Boolean Default: false |
fetchAllFilter | Returns a filtered list of all the breakpoints or logpoints added or updated by the user. Valid values:
Use the caret (^) symbol as a separator for multiple properties. For example,
Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
Response body parameters (JSON or XML)
Example: cURL request
This example adds a conditional breakpoint at line 12 in the script.