Expand my Community achievements bar.

Event Subscription API

Avatar

Level 2
Hi All The"https://support.workfront.com/hc/en-us/articles/115000135574-Event-Subscription-API" Event Subscription API Documentation in the "https://support.workfront.com/hc/en-us/articles/115000135574-Event-Subscription-API#forming-the-subscription-resource" Forming the Subscription Resource section has a parameter for the callback URL that is as follows: url (required) String - The URL of the endpoint to which subscription event payloads are sent via HTTP. Anyone know if this works with HTTPS ? All the examples seem to use HTTP. Thanks, Tim Tim Shenton
4 Replies

Avatar

Community Advisor
Hi Tim, I suspect that callback documentation is out of date, and refers to the older JSONP technology for which Workfront recently "https://support.workfront.com/hc/en-us/articles/360006949754-Ending-Support-for-JSONP">stopped support . My colleague @Melinda Layten is Workfront's API Product Manager and might be able to confirm and elaborate. Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 2
Hi, We've done a lot with webhooks subscriptions, if you have any specific questions please let me know. I can confirm it works over both http and https, you should have valid https certificates. URL; '/attask/eventsubscription/api/v1/subscriptions' what object do you want to subscribe to? objCode; Assignment ASSGN Company CMPY Dashboard PTLTAB Document DOCU Expense EXPNS Hour HOUR Issue OPTASK Note NOTE Portfolio PORT Program PRGM Project PROJ Report PTLSEC Task TASK Template TMPL Timesheet TSHET User USER Event type you want to have fire call back. eventType; all, create, update, delete Form Body URL;Your address for the call back. Auth Token; Your own token, workfront will send this in the header to your response, this way you can verify it's legitimate call. Basically to register a subscription create a post form in your language choice. $formBody = array(); $formBody['objCode'] = $objCode; $formBody['eventType'] = $eventType; $formBody['url'] = $url; $formBody['authToken'] = $subscriptionAuthToken; With subscriptions you can not just send your API key in the form or url like most calls. You need to send it as part of the header. ['headers' => ['Content-type' => 'application/json',['headers' => ['Content-type' => 'application/json', 'Authorization' => $this->workfrontAPIKey], Dean Holmes - IO Integration IO Integration

Avatar

Level 1

Hey Dean! I'm wondering if you could help me... I trying to configure Asset Events to capture when the file is created or deleted. I already configured the webhook, and passed the challenge but, when I upload an asset on DAM is not triggering the events. Can you please point me into the right direction with this?

Avatar

Level 2
Thanks Dean. I already have the certs on order! Appreciate the response Tim Tim Shenton