How do I assign a tag to a monitored entity?

The Smartscape and topology API not only offers REST endpoints for fetching information related to all the monitored components in your environment, it also allows you to assign tags to individual components. By using the same REST endpoints as described above, it's possible to perform an HTTP POST call to push a list of tags to a given entity ID, as shown in the example below.

https://{id}.live.dynatrace.com/api/v1/entity/services/{YOUR_SERVICE_ID}

with HTTP POST payload:

{
  "tags": ["myTagthroughAPI", "secondTag"]
}