Problems API - GET all

This API is deprecated. Use the Problems API v2 instead.

Lists all comments on the specified problem.

The request produces an application/json payload.

GETSaaShttps://{your-environment-id}.live.dynatrace.com/api/v1/problem/details/{problemId}/comments
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/v1/problem/details/{problemId}/comments

Authentication

To execute this request, you need an access token with DataExport scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
problemIdstring

The ID of the problem where you want to read the comments.

pathrequired

Response

Response codes

CodeTypeDescription
200ProblemCommentList

Success

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Response body objects

The ProblemCommentList object

The list of comments to the problem.

ElementTypeDescription
commentsProblemComment[]

The list of comments to the problem.

The ProblemComment object

The comment to the problem.

ElementTypeDescription
contentstring

The text of the comment.

contextstring

The context of the comment.

Could be any textual comment. You can only set it via REST API.

createdAtTimestampinteger

The timestamp of the comment creation, in UTC milliseconds.

idstring

The ID of the comment.

userNamestring

The author of the comment.

Response body JSON model

{
"comments": [
{
"content": "string",
"context": "string",
"createdAtTimestamp": 1,
"id": "string",
"userName": "string"
}
]
}

Example

In this example, the request lists all comments on the problem with ID 2307087411653364173_1538400720000V2.

The API token is passed in the Authorization header.

Curl

curl -X GET \
https://mySampleEnv.live.dynatrace.com/api/v1/problem/details/2307087411653364173_1538400720000V2/comments \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v1/problem/details/2307087411653364173_1538400720000V2/comments

Response body

{
"comments": [
{
"id": "2216103859600298777_1538400720000",
"createdAtTimestamp": 1538568145285,
"content": "Checking [stack overflow](https://stackoverflow.com) for helpful answers",
"userName": "john.smith",
"context": null
}
]
}

Response code

200