Client icon indicating copy to clipboard operation
Client copied to clipboard

How to remove variables[] from triggerPipeline?

Open datawench opened this issue 1 year ago • 2 comments

As far as I can tell, the triggerPipeline method always includes the "variables" attribute in the json sent to the endpoint, even if there are no variables specified. But this returns "variables is invalid." If I send a POST on my own, with a json payload that just includes the "ref" and "token" attributes, it works fine.

How can I remove the "variables" attribute before the payload is sent?

datawench avatar Apr 11 '24 12:04 datawench

I've just run into this problem myself. I did however get it to work with a little duplication. If in the variables you send over:-

[ 'token' => 'token', 'ref' => 'ref' ]

and use the same values that you used in the previous 2 parameters to the method call, then everything works as intended. Not sure why this is the case, but discovered it by trial/error.

rawveg avatar May 15 '24 15:05 rawveg

Ah. Interesting. Thanks.

datawench avatar Jul 18 '24 15:07 datawench