Updating Workflow Extension Definitions

SOLVE
Highlighted
Top Contributor

I have some questions regarding updating workflow extension definition.

 

1. The documentation states that the definition ID is required in the PUT url, and it is also required in the json payload - why?

2. Though not stated in the docs, both the 'version' and 'latestVersion' fields are required in the payload (without them the server returns error).  I have several questions here:

What exactly are these fields and how do they work?  Why would I need to supply the 'latestVersion' in my update command?  Shouldn't this be calculated intrinsically?  Also, no matter what values I supply for either during an update (including invalid ones), the definition gets updated and the latest values of 'version' and 'latestVersion' get incremented, and always match.  Also, when I get and list all definitions, only a single (the latest) version of each definition appears to exist.  Shouldn't all versions be on file?

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
HubSpot Moderator

Hi @Renegade , actually got some answers from the workflows team already. Unfortunately, we don't have a great reason as to why these fields are required. We're definitely aware of the issue, and will be fixing that in our V2 of the extension.

 

Same thing goes for the history. Right now, none of those endpoints will reveal the workflow history, but we're planning to add that in V2. No timeline at the moment.

Reply
0 Upvotes
2 Replies 2
HubSpot Moderator

Hi @Renegade !

  1. I'm not sure why that's a thing, but I'll reach out to the relevant team to get more information on why we require those fields.
  2. Same thing for this question as well. I'll get more info on why we require those fields. version and version history, as you pointed out, seem to just increment by one here. I'll get back to you on this
  3. I will see if there's any more info we can provide on retreiving historical values for an extension. I believe by default it will just return the latest version of the definiton.

I'll be following up on Monday. Thanks!

Reply
0 Upvotes
HubSpot Moderator

Hi @Renegade , actually got some answers from the workflows team already. Unfortunately, we don't have a great reason as to why these fields are required. We're definitely aware of the issue, and will be fixing that in our V2 of the extension.

 

Same thing goes for the history. Right now, none of those endpoints will reveal the workflow history, but we're planning to add that in V2. No timeline at the moment.

Reply
0 Upvotes