ListDirectories

Updated at:

Applicable editions

Central edition, Region edition

Endpoints and authorization

  • Obtain an endpoint. Replace {domain} in the request syntax with the endpoint.
  • Obtain a personal access token.
  • Obtain an organization ID: Required only for the Central edition. Go to the organization management console and obtain the organization ID from the basic information page.

Product

Resource

Required permission

test management

test case directory

read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/testhub/organizations/{organizationId}/testRepos/{id}/directories

Region edition

GET https://{domain}/oapi/v1/testhub/testRepos/{id}/directories

Request header

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

id

string

path

Yes

The ID of the test case library.

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

The ID of the organization.

Request examples

Central edition

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

Region edition

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

Response parameters

Parameter

Type

Description

Example value

-

array

A list of test case directory objects.

-

object

Details of a test case directory.

id

string

The ID of the test case directory.

testcase-directory-id-xxx

name

string

The name of the test case directory.

testcase-directory-name-xxx

parentId

string

The ID of the parent directory.

testcase-directory-parent-id-xxx

Response example

[
    {
        "id": "testcase-directory-id-xxx",
        "name": "testcase-directory-name-xxx",
        "parentId": "testcase-directory-parent-id-xxx"
    }
]

Error codes

For error codes, see the Error Code Center.