User-friendly subscription webhooks for real-time updates.

Empower your engineering workflow with increased traceability and trackability using real-time updates with RESTHooks support in Valispace. Integrate your engineering data in Valispace with common tools (like Slack and JIRA using Zapier) or integrate into your native tools with the power of webhook like real-time updates from your design and the simplicity of using our REST API.

How?

Real-time updates can be configured from Valispace to any other application, by setting up subscriptions, called hooks. Setting up a hook can be done through either the admin panel of the deployment if you have admin access or with REST API.

1. Configuring hooks from admin panel

From the admin panel, Click on the hooks section and configure the hook in the UI as shown below. 

mceclip0.png

For details of each field, check below.

 

2. Configuring hooks via the REST API 

POST rest/hooks/
CODE

with request body parameters:

Field

Data Type

Description

user
NONE

int

Valispace User ID (default)

event
CODE

string

A valid event name (See valid event names below)

target
CODE

string

A target url which can accept the hook data/requests

 Supported Events:

Name

event

Description

New Vali 

vali.new
CODE

Event triggers every time that a vali is created

New Component

component.new
CODE

Event triggers every time that a component is created

New Requirement

requirement.new
CODE

Event triggers every time that a requirement is added

Violation of a Requirement 

requirement.violation
CODE

Event triggers every time a verification rule related to a requirement in a project is violated

Change of Compliance

compliance.changed
CODE

Event triggers every time the compliance corresponding to a requirement is changed

Change of Verification Status

verification_status.changed
CODE

Event triggers every time the verification status of a requirement is changed

Change of Verification Method

verification_method.changed
CODE

Event triggers every time the verification method related to a requirement is changed

Vali Deleted

vali.delete
CODE

Event triggers every time a Vali is deleted

Component Deleted

component.delete
CODE

Event triggers every time a Vali is deleted

New Task Created

task.new
CODE

Event triggers when a task is created

Task Status Change

task.status_changed
CODE

Event triggers when the status of an existing task is updated

Task Completed

task.completed
CODE

Event triggers when a task is marked Complete

Milestone Update

milestone.updated
CODE

Event triggers when the milestone is updated corresponding to a task.

 

Response Payload

When an event is subscribed to and is triggered, the target url receives a response from the Valispace server that looks like this:

{"hook": 
      {"id": 1, 
       "event": "requirement.violation", 
       "target": "http://yoursite.com/rest/bin/"},
 "data": 
      {"violated_rules": [{"id": 1, "expression": "1 > 2"}], 
       "requirement_data": 
              {"component_requirement": 2, 
               "requirement": {"id": 565, "identifier": "R001", "text": "<p>Test</p><p><br></p>"}, 
               "component": {"name": "parent", "id": 6615}, 
               "project": {"name": "Fan", "id": 35}
              } 
      }
}
CODE


The data available corresponding to each event is listed below:

 Event

Payload Data Fields

vali.new
CODE

{'id', 'name', 'value', 'unit’, 'formula', 'margin_plus', 'margin_minus', 'datatype', 'tags', 'parent', 'parent_id', 'project', 'project_id'}

component.new
CODE

{'id','name','parent','project','project_id','valis'}

requirement.new
CODE

{'id','name','text','title','project','project_id'}

notification.new
CODE

 

{"type", 'action', 'level’, 'data', 'sender'}

requirement.violation
CODE

 {'violated_rules: [{'id','expression'}] ,'requirement_data'}*

compliance.changed
CODE

 {'id','statement': {'old','new'}, 'requirement_data'}*

verification_status.changed
CODE

 {'id', 'change', 'requirement_data’}*

verification_method.changed
CODE

 

{'id', 'change', 'requirement_data'}*

vali.delete
CODE

 {'id','name','parent','parent_id','project','project_id'}

component.delete
CODE

 {'id','name','parent','project','project_id'}

task.new
CODE

{"id", "title", "status", "status_id", "description", "due_date", "created", created_by"}

task.status_changed
CODE

{"id", "title" ,"status", "status_id", "description" ,"due_date"}

task.completed
CODE

{"id", "title" ,"status", "status_id", "description" ,"due_date"}

milestone.updated
CODE

{"id", "title", "status", "description", "milestone"}

*'requirement_data'

{'component_requirement', 'requirement':{'id', 'identifier', 'text'},

 'component': { 'name', 'id'}, 'project':{'name','id'}}

 For more info on example hook payloads, go to: 
https://{yourDeploymentName}.valispace.com/rest/hooks/examples