Replies: 6 comments 2 replies
-
I am also looking for this and I dont see documentation for it anywhere. |
Beta Was this translation helpful? Give feedback.
-
If I'm understanding the code correctly, the survey-vars are 'just' written into the
Also please share the payload stripped of your personal information! |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, the payload for those who might be interested: |
Beta Was this translation helpful? Give feedback.
-
@N3ruru Thanks.
If you get it working using the |
Beta Was this translation helpful? Give feedback.
-
while it is totally true that survey vars will be treated as "normal" environment variables at the end there is a way to also create survey variables over the API! That becomes very useful as pushing those to the environment will make them "fixed" which removes the flexibility of survey vars. Here an example CURL call (assuming you had stored a cookie in
Here a more complex example as an ansible task of the same but 3 survey vars and using an access token. note: the first "set_fact" is not actually needed that way but I find it more readable then specifying it within the body.
Of course that one is a more complex one as I iterate over a list (and filter out only those I need) but I guess you get the idea. |
Beta Was this translation helpful? Give feedback.
-
@steadfasterX Thank you for the example for creating templates via API. I think @N3ruru asked how to pass survey_vars when starting tasks via API. In that case there is no |
Beta Was this translation helpful? Give feedback.
-
Hello a i need to pass survey Variables via httprequest to semaphore API, i didn't find any example on the API documentation, is it possible to do that? And how? Can you give a body example?
Beta Was this translation helpful? Give feedback.
All reactions