ListWorkitemComments - List workitem comments

Updated at:

Applicable editions

Central edition, Region edition

Service endpoints and authorization

  • Get a service endpoint: Replace {domain} in the API request syntax.
  • Get a personal access token.
  • Get the organizationId: Required only for the Central edition. Go to the organization management console and get the organization ID from the basic information page.

Product

Resource

Required permissions

Projex

workitem comments

read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}/comments

Region edition

GET https://{domain}/oapi/v1/projex/workitems/{id}/comments

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

Your Alibaba Cloud DevOps personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example

id

string

path

Yes

The unique identifier of the workitem.

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

The organization ID.

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}/comments' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/workitems/{id}/comments' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example

-

array

An array of comment objects.

-

object

A comment object.

content

string

The comment content.

test

contentFormat

string

The format of the comment content. Valid values: "RICHTEXT" or "MARKDOWN".

RICHTEXT

gmtCreate

string

The creation time.

gmtModified

string

The last modified time.

id

string

The ID of the comment.

id-xxx

parentId

string

The parent comment ID.

1222333

top

boolean

Indicates whether the comment is pinned.

false

topTime

string

The time when the comment was pinned.

user

object

The user who posted the comment.

id

string

The user ID.

674d96abd497cd558d68****

name

string

The name of the user.

name-xxx

Response example

[
    {
        "content": "test",
        "contentFormat": "RICHTEXT",
        "gmtCreate": "",
        "gmtModified": "",
        "id": "id-xxx",
        "parentId": "1222333",
        "top": false,
        "topTime": "",
        "user": {
            "id": "674d96abd497cd558d68****",
            "name": "name-xxx"
        }
    }
]

Error codes

See the Error Code Center for a list of API error codes.