Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
I am new to Onshape, can someone guide me on how to setup webhooks?
Yatiraj_Chakre
Member Posts: 6 PRO
We are integrating Onshape and Propel using Jitterbit(its a middleware like mulesoft). Our requirement is when a document is changed, we want the drawing json data to be sent to API endpoint which is exposed by Jitterbit, then Jitterbit updates this data in Propel. It looks that a webhook can send data to an endpoint but its not clear on how to setup webhooks in ohshape.
0
Answers
-
Have you read the documentation for webhooks?
https://onshape-public.github.io/docs/app-dev/webhook/
First step is to register a webhook:
https://cad.onshape.com/glassworks/explorer/#/Webhook/createWebhook
www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications0 -
Thanks Caden, I am able to create a webhook, but landed on another issue. I am sending "events","companyid","documentid" & "elementid" in creating webhook request but in response its not returning "documentid" so I am thinking its not properly registered.(even though it comes back as 200 and webhookid) I am using "onshape.comment.create" event and I am not getting comment added notifications. Wondering what I am missing.
Create webhook Request -{"companyId": "dummyvalue","description": "dummyvalue","documentId": "dummyvalue","elementId": "dummyvalue","events": ["onshape.comment.create"],"url": "dummyvalue"}
Create webhook Response -{"filter": null,"data": null,"description": "dummyvalue","options": {"collapseEvents": true},"url": "dummyvalue","companyId": "dummyvalue","createdBy": {user details},"projectId": null,"folderId": null,"events": ["onshape.comment.create"],"isTransient": false,"externalSessionId": null,"droppedEventCount": 0,"name": null,"id": "dummyvalue",}
Onshape validation call (does not show documentid)-{
"jsonType" : "lifecycle",
"event" : "webhook.register",
"messageId" : "dummyvalue",
"timestamp" : "dummyvalue",
"webhookId" : "dummyvalue"
}0 -
Might be worth trying with workspaceId or versionId added.
www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications0 -
Yes, tried but same result. I am also sending a 200 satus when onshape tests the URL I gave. There doesnt seem a good way of checking if webhook is successfully registered or not, the documentation says that if you can ping to a webhook then it is registered but I dont get any notifications.
0 -
Isn't there an onshape/propel integration available already?
0 -
Zapier is there but we want to use Jitterbit which is our middleware for all integrations0

