Creation of webhooks to send inbound events to DevOps Change Velocity using token
You must create webhooks to send inbound events to DevOps Change Velocity using token based authentication.
<instance_url>/api/sn_devops/v2/devops/tool/{capability}?toolId=<toolId> where capability can be
plan, code, or orchestration.You can copy the details like the tool Id, instance URL, and so on by selecting Configure manually from the tool record or in the configure step while onboarding the tool. You can then select
Copy in the appropriate field to copy the value to your clipboard. The field label changes to Copied, but you can copy multiple times. The following image displays the page
from where the values can be copied for the GitHub tool in DevOps Change Velocity.
- Pass the token as a header by using the following format: Header Name: Authorization Header Value: sn_devops.DevOpsToken <ToolId>:<Token>, where <ToolId> is the ID of the tool, and <Token> is the authentication token copied from the Tool Record page.
- Pass the token as a query parameter in the URL: <instance_url>/api/sn_devops/v2/devops/tool/{capability}?toolId=<toolId>&ni.nolog.token=<Token>, where <ToolId> is the ID of the tool, and <Token> is the authentication token copied from the Tool Record page.
For Basic authentication, you can use the following V1 endpoint: https://user:password@<instance_url>/api/sn_devops/v1/devops/tool/{capability}?toolId=<toolId>, replace user and password with your ServiceNow credentials.
If you have a custom tool or a different authentication method, you can implement your own authentication logic. For example, you can implement an authenticateToken function in your handler class. The function should verify the token and ensure proper authentication. You must have the admin role in ServiceNow to implement your own authentication logic.