이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 9. ServiceNow Custom actions in Red Hat Developer Hub


Important

These features are for Technology Preview only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs), might not be functionally complete, and Red Hat does not recommend using them for production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information on Red Hat Technology Preview features, see Technology Preview Features Scope.

In Red Hat Developer Hub, you can access ServiceNow custom actions (custom actions) for fetching and registering resources in the catalog.

The custom actions in Developer Hub enable you to facilitate and automate the management of records. Using the custom actions, you can perform the following actions:

  • Create, update, or delete a record
  • Retrieve information about a single record or multiple records

9.1. Enabling ServiceNow custom actions plugin in Red Hat Developer Hub

In Red Hat Developer Hub, the ServiceNow custom actions are provided as a pre-loaded plugin, which is disabled by default. You can enable the custom actions plugin using the following procedure.

Prerequisites

Procedure

  1. To activate the custom actions plugin, add a package with plugin name and update the disabled field in your Helm chart as follows:

    global:
      dynamic:
        includes:
          - dynamic-plugins.default.yaml
        plugins:
          - package: ./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-servicenow-dynamic
            disabled: false
    Copy to Clipboard
    Note

    The default configuration for a plugin is extracted from the dynamic-plugins.default.yaml file, however, you can use a pluginConfig entry to override the default configuration.

  2. Set the following variables in the Helm chart to access the custom actions:

    servicenow:
      # The base url of the ServiceNow instance.
      baseUrl: ${SERVICENOW_BASE_URL}
      # The username to use for authentication.
      username: ${SERVICENOW_USERNAME}
      # The password to use for authentication.
      password: ${SERVICENOW_PASSWORD}
    Copy to Clipboard

9.2. Supported ServiceNow custom actions in Red Hat Developer Hub

The ServiceNow custom actions enable you to manage records in the Red Hat Developer Hub. The custom actions support the following HTTP methods for API requests:

  • GET: Retrieves specified information from a specified resource endpoint
  • POST: Creates or updates a resource
  • PUT: Modify a resource
  • PATCH: Updates a resource
  • DELETE: Deletes a resource

    [GET] servicenow:now:table:retrieveRecord

    Retrieves information of a specified record from a table in the Developer Hub.

    Table 9.1. Input parameters
    NameTypeRequirementDescription

    tableName

    string

    Required

    Name of the table to retrieve the record from

    sysId

    string

    Required

    Unique identifier of the record to retrieve

    sysparmDisplayValue

    enum("true", "false", "all")

    Optional

    Returns field display values such as true, actual values as false, or both. The default value is false.

    sysparmExcludeReferenceLink

    boolean

    Optional

    Set as true to exclude Table API links for reference fields. The default value is false.

    sysparmFields

    string[]

    Optional

    Array of fields to return in the response

    sysparmView

    string

    Optional

    Renders the response according to the specified UI view. You can override this parameter using sysparm_fields.

    sysparmQueryNoDomain

    boolean

    Optional

    Set as true to access data across domains if authorized. The default value is false.

    Table 9.2. Output parameters
    NameTypeDescription

    result

    Record<PropertyKey, unknown>

    The response body of the request

    [GET] servicenow:now:table:retrieveRecords

    Retrieves information about multiple records from a table in the Developer Hub.

    Table 9.3. Input parameters
    NameTypeRequirementDescription

    tableName

    string

    Required

    Name of the table to retrieve the records from

    sysparamQuery

    string

    Optional

    Encoded query string used to filter the results

    sysparmDisplayValue

    enum("true", "false", "all")

    Optional

    Returns field display values such as true, actual values as false, or both. The default value is false.

    sysparmExcludeReferenceLink

    boolean

    Optional

    Set as true to exclude Table API links for reference fields. The default value is false.

    sysparmSuppressPaginationHeader

    boolean

    Optional

    Set as true to suppress pagination header. The default value is false.

    sysparmFields

    string[]

    Optional

    Array of fields to return in the response

    sysparmLimit

    int

    Optional

    Maximum number of results returned per page. The default value is 10,000.

    sysparmView

    string

    Optional

    Renders the response according to the specified UI view. You can override this parameter using sysparm_fields.

    sysparmQueryCategory

    string

    Optional

    Name of the query category to use for queries

    sysparmQueryNoDomain

    boolean

    Optional

    Set as true to access data across domains if authorized. The default value is false.

    sysparmNoCount

    boolean

    Optional

    Does not execute a select count(*) on the table. The default value is false.

    Table 9.4. Output parameters
    NameTypeDescription

    result

    Record<PropertyKey, unknown>

    The response body of the request

    [POST] servicenow:now:table:createRecord

    Creates a record in a table in the Developer Hub.

    Table 9.5. Input parameters
    NameTypeRequirementDescription

    tableName

    string

    Required

    Name of the table to save the record in

    requestBody

    Record<PropertyKey, unknown>

    Optional

    Field name and associated value for each parameter to define in the specified record

    sysparmDisplayValue

    enum("true", "false", "all")

    Optional

    Returns field display values such as true, actual values as false, or both. The default value is false.

    sysparmExcludeReferenceLink

    boolean

    Optional

    Set as true to exclude Table API links for reference fields. The default value is false.

    sysparmFields

    string[]

    Optional

    Array of fields to return in the response

    sysparmInputDisplayValue

    boolean

    Optional

    Set field values using their display value such as true or actual value as false. The default value is false.

    sysparmSuppressAutoSysField

    boolean

    Optional

    Set as true to suppress auto-generation of system fields. The default value is false.

    sysparmView

    string

    Optional

    Renders the response according to the specified UI view. You can override this parameter using sysparm_fields.

    Table 9.6. Output parameters
    NameTypeDescription

    result

    Record<PropertyKey, unknown>

    The response body of the request

    [PUT] servicenow:now:table:modifyRecord

    Modifies a record in a table in the Developer Hub.

    Table 9.7. Input parameters
    NameTypeRequirementDescription

    tableName

    string

    Required

    Name of the table to modify the record from

    sysId

    string

    Required

    Unique identifier of the record to modify

    requestBody

    Record<PropertyKey, unknown>

    Optional

    Field name and associated value for each parameter to define in the specified record

    sysparmDisplayValue

    enum("true", "false", "all")

    Optional

    Returns field display values such as true, actual values as false, or both. The default value is false.

    sysparmExcludeReferenceLink

    boolean

    Optional

    Set as true to exclude Table API links for reference fields. The default value is false.

    sysparmFields

    string[]

    Optional

    Array of fields to return in the response

    sysparmInputDisplayValue

    boolean

    Optional

    Set field values using their display value such as true or actual value as false. The default value is false.

    sysparmSuppressAutoSysField

    boolean

    Optional

    Set as true to suppress auto-generation of system fields. The default value is false.

    sysparmView

    string

    Optional

    Renders the response according to the specified UI view. You can override this parameter using sysparm_fields.

    sysparmQueryNoDomain

    boolean

    Optional

    Set as true to access data across domains if authorized. The default value is false.

    Table 9.8. Output parameters
    NameTypeDescription

    result

    Record<PropertyKey, unknown>

    The response body of the request

    [PATCH] servicenow:now:table:updateRecord

    Updates a record in a table in the Developer Hub.

    Table 9.9. Input parameters
    NameTypeRequirementDescription

    tableName

    string

    Required

    Name of the table to update the record in

    sysId

    string

    Required

    Unique identifier of the record to update

    requestBody

    Record<PropertyKey, unknown>

    Optional

    Field name and associated value for each parameter to define in the specified record

    sysparmDisplayValue

    enum("true", "false", "all")

    Optional

    Returns field display values such as true, actual values as false, or both. The default value is false.

    sysparmExcludeReferenceLink

    boolean

    Optional

    Set as true to exclude Table API links for reference fields. The default value is false.

    sysparmFields

    string[]

    Optional

    Array of fields to return in the response

    sysparmInputDisplayValue

    boolean

    Optional

    Set field values using their display value such as true or actual value as false. The default value is false.

    sysparmSuppressAutoSysField

    boolean

    Optional

    Set as true to suppress auto-generation of system fields. The default value is false.

    sysparmView

    string

    Optional

    Renders the response according to the specified UI view. You can override this parameter using sysparm_fields.

    sysparmQueryNoDomain

    boolean

    Optional

    Set as true to access data across domains if authorized. The default value is false.

    Table 9.10. Output parameters
    NameTypeDescription

    result

    Record<PropertyKey, unknown>

    The response body of the request

    [DELETE] servicenow:now:table:deleteRecord

    Deletes a record from a table in the Developer Hub.

    Table 9.11. Input parameters
    NameTypeRequirementDescription

    tableName

    string

    Required

    Name of the table to delete the record from

    sysId

    string

    Required

    Unique identifier of the record to delete

    sysparmQueryNoDomain

    boolean

    Optional

    Set as true to access data across domains if authorized. The default value is false.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat