Delete a testcase

Updated at:

Applicable editions

Central edition, Region edition

Service endpoints and authorization

  • Get service endpoints: Replace {domain} in the request syntax with the actual service endpoint.

  • Get a personal access token.

  • Get the organization ID: Required for the Central edition only. Go to the organization management console and find the organization ID on the basic information page.

Product

Resource

Required permissions

test management

testcase

Read and write

Request syntax

Central edition

DELETE https://{domain}/oapi/v1/testhub/organizations/{organizationId}/testRepos/{testRepoId}/testcases/{id}

Region edition

DELETE https://{domain}/oapi/v1/testhub/testRepos/{testRepoId}/testcases/{id}

Request header

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

The personal access token.

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

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes (for the Central edition)

  • No (for the Region edition)

The organization ID.

testRepoId

string

path

Yes

The ID of the test case repository.

id

string

path

Yes

The ID of the test case.

Request examples

Central edition

curl -X 'DELETE' \
  'https://{domain}/oapi/v1/testhub/organizations/{organizationId}/testRepos/{testRepoId}/testcases/{id}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'DELETE' \
  'https://{domain}/oapi/v1/testhub/testRepos/{testRepoId}/testcases/{id}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

None.

Error codes

Visit the error code center to view API-related error codes.