CreateTestPlanTestcaseComment - Create a comment on a test plan test case
Applicable editions | Central edition, Region edition |
Service endpoints and authorization information
- Obtain the service endpoint: use it to replace the {domain} parameter in the API request syntax.
- Obtain a personal access token.
- Obtain the organizationId: required only for the Central edition. Go to the Organization Management console > Basic Information page to obtain the organization ID.
Product | Resource | Required permission |
Test Management | Test plan | Read/write |
Request syntax
Central edition
POST https://{domain}/oapi/v1/testhub/organizations/{organizationId}/testPlans/{testplanId}/testcases/{id}/comments
Region edition
POST https://{domain}/oapi/v1/testhub/testPlans/{testplanId}/testcases/{id}/comments
Request headers
Parameter | Type | Required | Description | Example value |
x-yunxiao-token | string | Yes | Your personal access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example value |
organizationId | string | path |
| organizationId. | |
testplanId | string | path | Yes | The unique identifier of the test plan. | |
id | string | path | Yes | The unique identifier of the test case. | |
| - | object | body | No | ||
| content | string | body | Yes | The comment content. | Comment content |
| formatType | string | body | No | The content format: RICHTEXT or MARKDOWN. Default: RICHTEXT. Valid values: [RICHTEXT MARKDOWN]. | RICHTEXT |
| parentId | string | body | No | The ID of the parent comment. | 1112333 |
Request examples
Central edition
curl -X 'POST' \
'https://{domain}/oapi/v1/testhub/organizations/{organizationId}/testPlans/{testplanId}/testcases/{id}/comments' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"content": "Comment content",
"formatType": "RICHTEXT",
"parentId": "1112333"
}'
Region edition
curl -X 'POST' \
'https://{domain}/oapi/v1/testhub/testPlans/{testplanId}/testcases/{id}/comments' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"content": "Comment content",
"formatType": "RICHTEXT",
"parentId": "1112333"
}'
Response parameters
Parameter | Type | Description | Example value |
| - | object | ||
| id | string | id. | id-xxx |
Response example
{
"id": "id-xxx"
}
Error codes
For more information, see the error code center for API-related error codes.