ServiceNow Import Sets API

Operations for inserting records into import set staging tables and triggering transform map processing.

Documentation

📖
Documentation
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html
📖
APIReference
https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html
📖
Documentation
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/integrate/inbound-rest/concept/c_AggregateAPI.html
📖
Documentation
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/integrate/inbound-rest/concept/c_AttachmentAPI.html
📖
Documentation
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/integrate/inbound-rest/concept/c_ImportSetAPI.html
📖
Documentation
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/integrate/inbound-rest/concept/change-management-api.html
📖
APIReference
https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/integrate/inbound-rest/concept/change-management-api.html
📖
Documentation
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/integrate/inbound-rest/concept/c_ServiceCatalogAPI.html
📖
APIReference
https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/integrate/inbound-rest/concept/c_ServiceCatalogAPI.html
📖
Documentation
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/integrate/inbound-rest/concept/cmdb-instance-api.html
📖
APIReference
https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/integrate/inbound-rest/concept/cmdb-instance-api.html
📖
Documentation
https://www.servicenow.com/docs/r/xanadu/api-reference/rest-apis/contact-api.html
📖
Documentation
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/integrate/inbound-rest/concept/c_RESTAPI.html

Specifications

OpenAPI Specification

servicenow-import-sets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ServiceNow Contact Aggregate Statistics Import Sets API
  description: 'The Contact API provides endpoints that enable you to retrieve and update Customer Service Management (CSM) contact records.


    In addition, you can generate new social media profile records when creating a contact.


    The Contact API requires the Customer Service plugin (com.sn_customerservice) and is provided within the now namespace.


    **Authentication**: Users need the `csm_ws_integration` role for full API access.

    '
  version: Zurich
  contact:
    name: ServiceNow
    url: https://docs.servicenow.com
  x-namespace: now
servers:
- url: https://{instance}.servicenow.com/api/now
  description: ServiceNow instance
  variables:
    instance:
      default: instance
      description: Your ServiceNow instance name
security:
- basicAuth: []
tags:
- name: Import Sets
  description: Operations for inserting records into import set staging tables and triggering transform map processing.
paths:
  /import/{stagingTableName}:
    post:
      operationId: insertImportSetRecord
      summary: Servicenow Insert a Record Into an Import Set Staging Table
      description: Inserts a single record into the specified import set staging table. If an active transform map exists for the staging table, the record is synchronously transformed and loaded into the target table. The response includes the transformation result indicating whether the record was inserted, updated, or encountered an error.
      tags:
      - Import Sets
      parameters:
      - name: stagingTableName
        in: path
        required: true
        description: The name of the import set staging table. This table must extend sys_import_set_row and have an associated transform map configured.
        schema:
          type: string
        example: u_import_incidents
      requestBody:
        required: true
        description: The field name-value pairs to insert into the staging table. Field names must match the column names defined on the staging table.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportSetInput'
            examples:
              InsertimportsetrecordRequestExample:
                summary: Default insertImportSetRecord request
                x-microcks-default: true
                value: {}
          application/xml:
            schema:
              $ref: '#/components/schemas/ImportSetInput'
            examples:
              InsertimportsetrecordRequestExample:
                summary: Default insertImportSetRecord request
                x-microcks-default: true
                value: {}
      responses:
        '201':
          description: Record successfully inserted into the staging table and transformation completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    items:
                      $ref: '#/components/schemas/ImportSetResult'
              examples:
                Insertimportsetrecord201Example:
                  summary: Default insertImportSetRecord 201 response
                  x-microcks-default: true
                  value:
                    result:
                    - transform_map: example_value
                      table: example_value
                      display_name: example_value
                      display_value: example_value
                      record_link: https://www.example.com
                      status: inserted
                      status_message: example_value
                      sys_id: '500123'
                      target_sys_id: '500123'
                      import_set: example_value
        '400':
          description: Bad request. The staging table name is invalid or the request body contains malformed data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Insertimportsetrecord400Example:
                  summary: Default insertImportSetRecord 400 response
                  x-microcks-default: true
                  value:
                    error:
                      message: example_value
                      detail: example_value
        '401':
          description: Unauthorized. Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Insertimportsetrecord401Example:
                  summary: Default insertImportSetRecord 401 response
                  x-microcks-default: true
                  value:
                    error:
                      message: example_value
                      detail: example_value
        '403':
          description: Forbidden. The user does not have the import_transformer role or ACL access to the staging table.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Insertimportsetrecord403Example:
                  summary: Default insertImportSetRecord 403 response
                  x-microcks-default: true
                  value:
                    error:
                      message: example_value
                      detail: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /import/{stagingTableName}/insertMultiple:
    post:
      operationId: insertMultipleImportSetRecords
      summary: Servicenow Insert Multiple Records Into an Import Set Staging Table
      description: Inserts multiple records into the specified import set staging table in a single request. Each record is individually transformed if an active transform map exists.
      tags:
      - Import Sets
      parameters:
      - name: stagingTableName
        in: path
        required: true
        description: The name of the import set staging table.
        schema:
          type: string
        example: example_value
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                records:
                  type: array
                  description: An array of records to insert into the staging table.
                  items:
                    $ref: '#/components/schemas/ImportSetInput'
            examples:
              InsertmultipleimportsetrecordsRequestExample:
                summary: Default insertMultipleImportSetRecords request
                x-microcks-default: true
                value:
                  records:
                  - {}
      responses:
        '201':
          description: Records successfully inserted and transformed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    items:
                      $ref: '#/components/schemas/ImportSetResult'
              examples:
                Insertmultipleimportsetrecords201Example:
                  summary: Default insertMultipleImportSetRecords 201 response
                  x-microcks-default: true
                  value:
                    result:
                    - transform_map: example_value
                      table: example_value
                      display_name: example_value
                      display_value: example_value
                      record_link: https://www.example.com
                      status: inserted
                      status_message: example_value
                      sys_id: '500123'
                      target_sys_id: '500123'
                      import_set: example_value
        '400':
          description: Bad request. The request body is malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Insertmultipleimportsetrecords400Example:
                  summary: Default insertMultipleImportSetRecords 400 response
                  x-microcks-default: true
                  value:
                    error:
                      message: example_value
                      detail: example_value
        '401':
          description: Unauthorized. Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Insertmultipleimportsetrecords401Example:
                  summary: Default insertMultipleImportSetRecords 401 response
                  x-microcks-default: true
                  value:
                    error:
                      message: example_value
                      detail: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    ImportSetInput:
      type: object
      description: The field name-value pairs corresponding to columns in the import set staging table.
      additionalProperties:
        type: string
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: A human-readable error message.
            detail:
              type: string
              description: Detailed information about the error.
          example: example_value
    ImportSetResult:
      type: object
      description: The result of processing an import set record including the transformation outcome.
      properties:
        transform_map:
          type: string
          description: The name of the transform map used to process the record.
          example: example_value
        table:
          type: string
          description: The target table into which the record was transformed.
          example: example_value
        display_name:
          type: string
          description: The display name of the transform map.
          example: example_value
        display_value:
          type: string
          description: The display value of the target record created or updated.
          example: example_value
        record_link:
          type: string
          format: uri
          description: A link to the target record in ServiceNow.
          example: https://www.example.com
        status:
          type: string
          description: The transformation status. Common values include inserted, updated, error, and ignored.
          enum:
          - inserted
          - updated
          - error
          - ignored
          example: inserted
        status_message:
          type: string
          description: A descriptive message about the transformation result, especially useful when the status is error.
          example: example_value
        sys_id:
          type: string
          description: The sys_id of the import set row record in the staging table.
          example: '500123'
        target_sys_id:
          type: string
          description: The sys_id of the record created or updated in the target table.
          example: '500123'
        import_set:
          type: string
          description: The sys_id of the parent import set.
          example: example_value
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Basic authentication with ServiceNow credentials. User must have the csm_ws_integration role.