REST API trigger
-
- UpdatedAug 1, 2024
- 5 minutes to read
- Xanadu
- Building applications
Start a flow from an inbound API call or webhook from an external system. Configure the trigger start conditions without having to write or maintain custom code.
For example, you can create a flow that starts when a third-party IT ticket tracking system sends an inbound request to the instance. You can then parse the data from the inbound REST request into a complex data object and use the values to open an Incident on your instance.
Once you activate the flow, the endpoint that you created appears in the API explorer under the namespace you created. You can use this page to help define the webhook in your third-party system and to test your flow.
To learn more about flow triggers, see Workflow Studio trigger types.
- Use the REST API Trigger to start flows from REST calls from external systems. To start a flow from a script or API call from the same instance, use a subflow, code snippet, or Workflow Studio API. See API access to Workflow Studio and Create code snippets for flows, sub-flows, and actions.
-
ServiceNow has partnered with Boomi to deliver Boomi API Management, a cloud-based platform that enables customers to discover, manage, secure, and monetize their APIs. Boomi supports full lifecycle API management, including governance, analytics, and API security.
Boomi provides documentation though their own portal, and customers requesting support with Boomi API Management will contact the Boomi support through their standard channels.
To get started, see the Boomi API Management listing on the ServiceNow® Store, which includes information about entitlements and required plugins, as well as a link to the Boomi API Management documentation.
Available data pills
Depending on how you configure the endpoint, flow designers have access to these data pills from the trigger:
- Path Parameters
- An object containing path parameters in the inbound request.
- Query Parameters
- An object containing query parameters in the inbound request.
- Request Headers
- An object containing headers in the inbound request.
- Request Body
- Complex data object that defines the body structure of the inbound request. For more information on complex objects, see Complex data.
When setting up the trigger, define what the inbound data will look like. You can then use the associated data pills within the actions in your flow. When the system receives an inbound request that starts the flow, it uses the runtime values sent in the request.
Create a flow using the REST API trigger
Create a flow that starts when a third-party system sends a REST request to your instance.
Before you begin
Role required: flow_designer or admin.
This feature requires an Integration Hub subscription. For more information, see Legal schedules - IntegrationHub overview.
Procedure
Result
What to do next
Copy the execution ID in the result and navigate to the Executions tab in Flow Designer. You can filter by execution ID to locate the execution details and view the status of the execution.
To troubleshoot issues, you can debug the REST query or check the flow execution details. See Debug REST queries and Flow execution details.