Create a REST (Integration Hub) type data source

  • Release version: Zurich
  • Updated July 31, 2025
  • 3 minutes to read
  • Create a REST (IntegrationHub) type data source record to define what data an import set should import from a REST API.

    Before you begin

    Roles required: import_admin and action_designer

    Procedure

    1. Navigate to All > System Import Sets > Administration > Data Sources.
    2. Click New.
    3. Complete the form.
      Field Description
      Name A unique name for this data source.
      Import set table label A label for the import set staging table to use.
      Import set table name The ServiceNow AI Platform uses the label you entered to construct a unique table name. This prevents namespace collision with an already existing table.
      Type REST (IntegrationHub).
      Format One of the following formats: Custom (Parse by Script), JSON, or XML.
      Use Batch Import If selected, specifies that loading data should be batched when you select Load data or Test load 20 records.
      Note:
      The system keeps records in memory until it receives the number of records specified in the batch size. If the batch size is met, it commits all the records as one batched SQL. If all the records are loaded for the import set, it commits all the remaining records as one batched SQL. Since it keeps the maximum of the batch size records in memory when specified, make sure you set the correct batch size to not cause any out-of-memory issues.
      Batch Size Specifies how big the batches should be. Appears only when the Use Batch Import field is selected.
      The glide.import_set_load_usebatch and glide.import_set_load_batch_size properties affects these fields. The priority order for the properties and fields are as follows: If the property is set, use the property value. If not, use the field value. If neither property is set, use the default batch size of 1000.
      • For example, if glide.import_set_load_usebatch = true and glide.import_set_load_batch_size = 200, use 200 as the batch size, regardless of the field values.
      • For example, if glide.import_set_load_usebatch = true and the glide.import_set_load_batch_size property is not set, use the default batch size of 1000.
      • For example, if the glide.import_set_load_usebatch property is not set and the Use Batch Import field = true, use the Batch Size field value (or the default of 1000 if the Batch Size field value is not set)
      • For example, if the glide.import_set_load_usebatch property = false and the Use Batch Import field = true, do not use batch import, since the property is set to false.
      Request action Data source request action that will be invoked to get data. You can choose only published request actions.

      Click the link in the dialog box below to create/configure a new Data Source request action in Integration Hub. After the request action is published in Integration Hub, you can choose it as a Request action in the Data Source record. For more information, see Define action properties.

      Support pagination Selected to enable pagination for the request action. Pagination helps you reduce processing overhead by processing a specified number of records at a time, instead of processing all records at once.
      Limit Maximum number of records per page. For example, to process 50 records at a time, enter a Limit of 50.
      Offset The initial offset used for pagination. The offset is the starting record number. For example, to process 50 records at a time, starting with the first record, enter a Limit of 50 and an Offset of 0.
      Parsing script Type the script used to parse a single line of input. Three parameters are available in this function:
      • line: the current line to be parsed by the script
      • lineNumber: the line number of the current line in the entire response payload
      • result: output result
      Path for each row The path expression used to select JSON objects, which will become rows in the import set table. The path should be // for JSON objects.
      Discard Arrays Selected to discard JSON arrays as a value. Unselected to serialize JSON arrays as a value.
      Expand node children Selected if child elements of the XML node or JSON object should be converted into additional columns. Unselected if the parent column value should be an XML or JSON fragment. For JSON, note that selecting this option expands objects only, not arrays. For nested array support, see JSON file import examples.
      Data in single column Selected to store data in a single column.
      Xpath for each row XPath expression that selects the nodes which become rows in the import table. The children of the selected nodes will become the columns in the rows.
    4. Click Submit.

    What to do next

    Define a transform map for the new data source and run an import.