This API is deprecated. Use the Problems API v2 instead.
Adds a comments to the specified problem.
The request consumes and produces an application/json
payload.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/v1/problem/details/{problemId}/comments |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v1/problem/details/{problemId}/comments |
To execute this request, you need an access token with DataExport
scope.
To learn how to obtain and use it, see Tokens and authentication.
The ID of the problem where you want to add the comment.
PushProblemComment
objectA comment of a problem
A comment on the problem.
The context of the comment. It can contain any additional information.
The author of the comment.
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"comment": "This is a comment!","context": "Slack","user": "user1"}
ProblemComment
objectThe comment to the problem.
The text of the comment.
The context of the comment.
Could be any textual comment. You can only set it via REST API.
The timestamp of the comment creation, in UTC milliseconds.
The ID of the comment.
The author of the comment.
{"content": "string","context": "string","createdAtTimestamp": 1,"id": "string","userName": "string"}
In this example, the request adds a new comment on the problem with ID 2307087411653364173_1538400720000V2.
The API token is passed in the Authorization header.
curl -X POST \https://mySampleEnv.live.dynatrace.com/api/v1/problem/details/2307087411653364173_1538400720000V2/comments \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \-H 'Content-Type: application/json' \-d '{"comment": "This one is probably caused by network","user": "john.smith","context": "Slack"}'
https://mySampleEnv.live.dynatrace.com/api/v1/problem/details/2307087411653364173_1538400720000V2/comments
{"comment": "This one is probably caused by network","user": "john.smith","context": "Slack"}
{"id": "-6026872125973307382_1538400720000","createdAtTimestamp": 1538559856030,"content": "This one is probably caused by network","userName": "john.smith","context": "Slack"}
200