Table of contents
Issues
Download API definition:
GET https://api.bentley.com/issues/{id}/comments

Retrieves the text and metadata for all comments that have been posted to the given issue. If the Prefer header was specified with the value "return=representation", the response will include the email address of each comment author, though this may incur additional processing time. If there is an extraordinarily large number of comments, only 50 distinct user email addresses will be retrieved and shown. Regardless of the Prefer header value, the "_links" object associated with each comment will provide a link to additional information about the comment author.

Permissions

To use this endpoint, the user is required to have the Forms View (Forms_ViewAccess) permission for the iTwin, or for the issue's associated form definition if form definition security is specified. (Having any other level of Forms permission automatically grants the View permission as well.)

Authentication

Requires Authorization header with valid Bearer token for scope itwin-platform.

For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.

Request parameters

Name
Required?
Description
id
Yes

The ID of the issue to get comments for

Request headers

Name
Required?
Description
Prefer
No

Sets the level of detail to return. For this endpoint, setting 'return=representation' will add the comment authors' email addresses to the response.

Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Response 200 OK

OK

json
{
    "comments": [{
            "id": "VcVcVcC8sUuVcgeXz1Ih_aqgKUQJ4YZCg5ED6ED6ED6",
            "text": "Second comment",
            "authorDisplayName": "Joe User",
            "createdDateTime": "2020-10-20T16:08:30.2960969Z",
            "_links": {
                "author": {
                    "href": "https://api.bentley.com/projects/30273027-1111-2222-3333/members/9e399e39-0000-1111-2222-8d8a8d8a8d8a"
                }
            }
        },
        {
            "id": "VcVcVcC8sUuVcgeXz1Ih_dQVJUOk7VpMmONsENsENsE",
            "text": "First comment",
            "authorDisplayName": "Joe User",
            "createdDateTime": "2020-10-20T16:08:30.3117243Z",
            "_links": {
                "author": {
                    "href": "https://api.bentley.com/projects/30273027-1111-2222-3333/members/9e399e39-0000-1111-2222-8d8a8d8a8d8a"
                }
            }
        }
    ]
}

Response 401 Unauthorized

This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 404 Not Found

This response indicates that the specified issue does not exist or is inaccessible to the user.

json
{
    "error": {
        "code": "IssueNotFound",
        "message": "Requested issue is not available.",
        "target": "id"
    }
}

Response 429 Too many requests

This response indicates that the user has sent too many requests in a given amount of time.

json
{
    "error": {
        "code": "TooManyRequests",
        "message": "More requests were received than the subscription rate-limit allows."
    }
}

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.

Comments List (Prefer return=minimal)

Name
Type
Description

Comment (get, Prefer return=minimal)

Name
Type
Description
id
String

String that uniquely identifies this comment.

text
String

The contents of the comment.

authorDisplayName
String

Display name (i.e., given name and surname) of the user who posted this comment. (If the comment was posted using this API, it is inferred to be the authorized user making the request.)

createdDateTime
Date-time

Date and time the comment was posted.

workflowNoteFrom
String, null

Will only be set if the comment is a workflow transition note. This is the name of the status the issue was in before the transition.

workflowNoteTo
String, null

Will only be set if the comment is a workflow transition note. This is the name of the status the issue is in after the transition.

_links.author.href
String

A URL that can be used to retrieve more information about the comment author.

Comments List (Prefer return=representation)

Name
Type
Description

Comment (get, Prefer return=representation)

Name
Type
Description
id
String

String that uniquely identifies this comment.

text
String

The contents of the comment.

authorDisplayName
String

Display name (i.e., given name and surname) of the user who posted this comment. (If the comment was posted using this API, it is inferred to be the authorized user making the request.)

authorEmail
String

Email address of the user who wrote this comment.

createdDateTime
Date-time

Date and time the comment was posted.

workflowNoteFrom
String, null

Will only be set if the comment is a workflow transition note. This is the name of the status the issue was in before the transition.

workflowNoteTo
String, null

Will only be set if the comment is a workflow transition note. This is the name of the status the issue is in after the transition.

_links.author.href
String

A URL that can be used to retrieve more information about the comment author.

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target of the error.

Error Response

Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.

Name
Type
Description
error

Error information.