Skip to main content
Version: v2.0

Table API overview

The Table API enables you to perform Create, Read, Update, and Delete (CRUD) operations on ServiceNow tables. Each endpoint corresponds to a specific operation and supports both fluent and standard usage patterns.

Commonly used for:

  • Retrieving records from tables like incident, change_request, or sys_user.
  • Creating new records with specific field values.
  • Updating existing records by their unique system ID (sys_id).
  • Deleting records when they're no longer needed.

Basic usage

To interact with a table, you start from the ServiceNowServiceClient, access the now namespace, and then specify the table name using Table.

// Access the incident table
incidentTable := client.Now().Table("incident")

// Fetch a list of records
result, err := incidentTable.Get(context.Background(), nil)
if err != nil {
log.Fatal(err)
}

Available operations

The Table API supports the following standard REST operations:

  • List Records: Retrieve multiple records from a table with support for filtering, sorting, and pagination.
  • Get Record: Retrieve a single record by its sys_id.
  • Create Record: Insert a new record into a table.
  • Update Record: Modify an existing record by its sys_id.
  • Delete Record: Remove a record from a table by its sys_id.
Was this page helpful?