Updated on 2026-02-09 GMT+08:00

Creating a Directory

Function

This API is used to create a directory.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    codeartsperftest:cpts:createPerfTestResource

    Write

    cpts *

    g:ResourceTag/<tag-key>

    -

    -

URI

POST /v1/{project_id}/test-suites/{test_suite_id}/directory

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Method of obtaining instructions.

test_suite_id

Yes

Integer

Test project ID, which is the value of project_id in the response body of the API for creating a project.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Directory name.

Response Parameters

Status code: 201

Table 3 Response body parameters

Parameter

Type

Description

code

String

Status code.

directory_id

Integer

Directory ID, which is the value of directory_id in the response body of the API for creating a directory.

message

String

Response.

Example Requests

Creating a directory. The ID of the project to which the directory belongs is 1 and the directory name is test.

/v1/{project_id}/test-suites/1/directory

{
  "name" : "test"
}

Example Responses

Status code: 201

Response object for creating a directory.

{
  "code" : "SVCSTG.CPTS.0000000",
  "directory_id" : 524475,
  "message" : "success"
}

Status Codes

Status Code

Description

201

Response object for creating a directory.

Error Codes

See Error Codes.