---
title: "Update a CMDB table"
method: PUT
path: "/enrichment/integrations/servicenow/{integration_id}/tables/{table_id}"
tags: ["Enrichment Integrations"]
---

# Update a CMDB table

`PUT /enrichment/integrations/servicenow/{integration_id}/tables/{table_id}`

## Request

- Base URL: `https://api.pagerduty.com`
- URL: `https://api.pagerduty.com/enrichment/integrations/servicenow/{integration_id}/tables/{table_id}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/pagerduty/apis/rest-api/docs/enrichment/integrations/servicenow/:integration_id/tables/:table_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Replaces a ServiceNow CMDB table configuration. This is a full replacement — all fields, including `ci_table_name` and the complete `field_mappings` list, must be provided. A table can only be updated while its synchronization is disabled and before its initial backfill has started.

<!-- theme: warning -->

> ### Early Access
> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.

Scoped OAuth requires: `contextual_data.write`

## Path parameters

- `integration_id` string, required
- `table_id` string, required

## Headers

- `Accept` string, required
- `Content-Type` 'application/json', required

## Request body

- object
  - `cmdb_table` ServiceNowTableInput, required
    - `display_name` string, required: A human-readable name for the CMDB table configuration. This name is used to identify the generated enrichment schema in the Event Enrichment rule editor.
    - `ci_table_name` string, required: The name of the ServiceNow CMDB table to synchronize (for example, `cmdb_ci_server` or `cmdb_ci_ip_switch`). Table names are case-sensitive.
    - `query_filter` string, nullable: An optional ServiceNow encoded query used to limit which records are synchronized from the table (for example, `operational_status=1^u_environment=production`). Set to `null` to synchronize all records.
    - `field_mappings` ServiceNowFieldMappingInput[], required: The mappings between ServiceNow fields and event fields. Must contain between 2 and 20 mappings, including at least one enrichment field. At most 3 mappings may be marked as query fields.
      - `servicenow_field` string, required: The ServiceNow field (column) to read the value from. Dot-walked fields are supported to traverse relationships (for example, `support_group.manager.email`).
      - `event_field` string, required: The event field that the ServiceNow value is mapped to.
      - `type` 'query': Set to `query` to use this mapping as a lookup key for matching incoming events to Configuration Items. Omit it for enrichment fields (the default). At most 3 mappings may be marked `query`, and at least one mapping must be left as an enrichment field. When no mapping is marked `query`, the `name` field is used as the query field automatically. Only `query` is accepted here — any other value is rejected.

## Response `200`

The CMDB table configuration was updated successfully.

- object
  - `cmdb_table` ServiceNowTable
    - `id` string: Base32-encoded UUID v7 (26 uppercase alphanumeric characters) identifying the CMDB table configuration.
    - `display_name` string: A human-readable name for the CMDB table configuration. This name is used to identify the generated enrichment schema in the Event Enrichment rule editor.
    - `ci_table_name` string: The name of the ServiceNow CMDB table to synchronize (for example, `cmdb_ci_server` or `cmdb_ci_ip_switch`). Table names are case-sensitive.
    - `query_filter` string, nullable: An optional ServiceNow encoded query used to limit which records are synchronized from the table (for example, `operational_status=1^u_environment=production`). Set to `null` to synchronize all records.
    - `field_mappings` ServiceNowFieldMapping[]: The mappings between ServiceNow fields and event fields. Must contain between 2 and 20 mappings, including at least one enrichment field. At most 3 mappings may be designated as query fields.
      - `servicenow_field` string, required: The ServiceNow field (column) to read the value from. Dot-walked fields are supported to traverse relationships (for example, `support_group.manager.email`).
      - `event_field` string, required: The event field that the ServiceNow value is mapped to.
      - `type` 'query' | 'enriched' | 'discriminator': Determines how the field is used during enrichment. `enriched` fields add contextual data to a matched event, while `query` fields are used to match incoming events to Configuration Items. When no mapping specifies a `type`, the field defaults to `enriched` and the `name` field is automatically used as the single query field. To match on a different field — or on more than one field — set `type: query` on those mappings; in that mode `name` is no longer used as a query field unless it is itself marked `query`. Up to 3 query fields may be configured, and when more than one is set an event must contain a matching value for every query field to be enriched (logical AND). At least one mapping must be an enriched field. In responses, a mapping's `type` is `query`, `enriched`, or `discriminator`. `discriminator` is assigned automatically to the `sys_id` field of `cmdb_rel_ci` relationship tables to distinguish relationship types; it appears in responses but cannot be set on requests.
    - `status` 'disabled' | 'syncing' | 'active' | 'error': The current data synchronization status of the table. `disabled`: sync is not enabled (the default for newly created tables). `syncing`: an initial sync is in progress. `active`: sync is healthy and incremental updates are running. `error`: sync failed (check the credentials or table configuration).
    - `created_at` string, date-time: The date/time the table configuration was created.
    - `updated_at` string, date-time: The date/time the table configuration was last updated.
    - `deleted_at` string, date-time, nullable: The date/time the table configuration was deleted, or `null` if it has not been deleted.

## Other responses

- `400`: Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.
- `401`: Caller did not supply credentials or did not provide the correct credentials. If you are using an API key, it may be invalid or your Authorization header may be malformed.
- `403`: Caller is not authorized to view the requested resource. While your authentication is valid, the authenticated user or token does not have permission to perform this action.
- `404`: The requested resource was not found.
- `429`: Too many requests have been made, the rate limit has been reached.
- `500`: Internal Server Error the PagerDuty server experienced an error.

---

[API](https://skmtc.dev/pagerduty/apis/rest-api.md) - [All operations](https://skmtc.dev/pagerduty/apis/rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pagerduty/apis/rest-api/revisions/b679a8f3f02c?raw)
