cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workflows

veranika_k
Helper

Hi! I am trying to create a new workflow passing some labels to it as `labels: {labelKey: "labelValue"}`, the label is in payload while making the request, although when I am asking about this particular workflow that I had created using its id, labels are undefined in the response. Can you help me with that? 

7 REPLIES 7

sinisa_zubic
Dynatrace Champion
Dynatrace Champion

Hi @veranika_k 

 

I am not sure if I fully understand your question.

Do you want to create a workflow via the API and have to it assigned labels? because in the swagger API documentation for creating workflows there is no possibility to add labels. You can add a description to the workflow.

 

Or are maybe labels an result of a workflow task and you want to make use of those labels with the help of jinja expressions? Like the example here: https://docs.dynatrace.com/docs/shortlink/automation-workflow-expression-reference#result 

 

Best,
Sini

Hi! 

Yes, according to the documentation it looks like I can pass labels to the body of my request, as a key:value pairs and then access it, so that is my purpose. 

Can you maybe share the documentation page you are referring to?

https://developer.dynatrace.com/reference/sdks/client-automation/#workflowrequest - This is the object that can be passed as a part of the body when creating a workflow - https://developer.dynatrace.com/reference/sdks/client-automation/#createworkflow if I understood this correctly. So when I am creating workflow and adding labels, these labels are part of the payload but then disappear. 

There seems to be an issue on our side. workflowsClient.createWorkflow is basically wrapping following API call 

sinisa_zubic_0-1699352519698.png

And as you see in the schema definition there is no labels property. So labels should not be part of the WorkflowRequest at all. I am checking with the team about the next steps and will keep you updated.

 

Best,
Sini

 

Thanks a lot! 

michal_zawislak
Dynatrace Advisor
Dynatrace Advisor

Hi @veranika_k,

Thank you for bringing this to our attention. The labels have indeed been removed from the AutomationEngine API definition (version 2.365). We've overlooked those changes when releasing the automation SDK client's latest version (1.6.1). We already fixed that, and the next version of the automation SDK (1.6.2) will reflect these changes. 

We're sorry for any inconvenience this may have caused.

Your AutomationEngine ally!

Featured Posts