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

How to create a tag automatically of type CLOUD_FOUNDRY_SPACE?

frank_reisenhof
Newcomer

Hello all together,

We would like to create automatically a tag using the API https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/configuration-api/automaticall... .

The condition should be like



So far we failed to create such a condition type as a type "Cloud Foundry Space" is not available in [2].

We tried so far using a Request body like [1].

How can we create a tag using the API automatically with a condition of type "Cloud Foundry space"?

Thanks for a hint.

Best Regards

Frank

[2]

https://www.dynatrace.com/support/help/shortlink/api-config-auto-tags-post-auto-tag#possible-values

[1]

{  "name": "${spaceNAME}",  "rules": [   {      "type": "SERVICE",      "enabled": true,      "valueFormat": null,      "propagationTypes": [        "PROCESS_GROUP_TO_SERVICE"      ],      "conditions": [        {          "key": {            "attribute": "CLOUD_FOUNDRY_SPACE"          },          "comparisonInfo": {            "type": "STRING",            "operator": "EQUALS",            "value": "${ spaceNAME }",            "negate": false,            "caseSensitive": false          }        }      ]    }  ] }



1 REPLY 1

frank_reisenhof
Newcomer

We found the answer: The request body should look like:

{

"name": "spaceNAME",

"rules": [

{

"type": "SERVICE",

"enabled": true,

"valueFormat": null,

"propagationTypes":[],

"conditions": [

{

"key": {

"attribute": "PROCESS_GROUP_PREDEFINED_METADATA",

"dynamicKey": "CLOUD_FOUNDRY_SPACE_NAME",

"type": "PROCESS_PREDEFINED_METADATA_KEY"

},

"comparisonInfo": {

"type": "STRING",

"operator": "EQUALS",

"value": "spaceNAME",

"negate": false,

"caseSensitive": false

}

}

]

}

]

}


Featured Posts