Updated on 2023-06-12 GMT+08:00

Module for Updating a Project

Function

Module for Updating a Project

URI

PUT /v4/projects/{project_id}/modules/{module_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the 32-bit ID of the devcloud project.

Minimum: 32

Maximum: 32

module_id

Yes

Integer

Specifies the module ID.

Minimum: 32

Maximum: 32

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

description

No

String

Description

module_name

Yes

String

Module

owner

Yes

UserRequest object

Table 4 UserRequest

Parameter

Mandatory

Type

Description

user_id

Yes

String

User ID, which is a 32-digit character string.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

description

String

Description

module_name

String

Module name

module_id

Integer

Specifies the module ID.

owner

ModuleOwner object

Table 6 ModuleOwner

Parameter

Type

Description

user_id

String

User ID, which is a 32-digit character string.

user_num_id

Integer

User ID

user_name

String

Username.

nick_name

String

Nickname of the user.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Example Requests

PUT https://{endpoint}/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/modules/662086

{
  "description" : "module demo",
  "module_name" : "demo",
  "owner" : {
    "user_id" : "09d75cde5180d4481f91c018e89cb8e2"
  }
}

Example Responses

Status code: 200

OK

{
  "description" : "module name",
  "module_name" : "demo",
  "module_id" : 46691,
  "owner" : {
    "user_id" : "09d75cde5180d4481f91c018e89cb8e2",
    "user_num_id" : 4091,
    "user_name" : "demo_user_name_06",
    "nick_name" : "demo"
  }
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.