Help Center> CodeArts Deploy> API Reference> APIs> Managing Application Groups> Moving an Application to a Specified Group
Updated on 2024-06-28 GMT+08:00

Moving an Application to a Specified Group

Function

This API is used to move applications to a specified group (batch operations are supported).

URI

PUT /v1/projects/{project_id}/applications/groups/move

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Minimum: 32

Maximum: 32

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

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.

Minimum: 0

Maximum: 20000

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

group_id

Yes

String

Group ID

application_ids

Yes

Array of strings

Application ID list

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

Array of MoveAppToGroupResult objects

Result of moving an application to a specified group. Only the list of applications that fail to be moved is returned.

status

String

Request success or failure status

Table 5 MoveAppToGroupResult

Parameter

Type

Description

code

String

Failed or not

application_id

String

Application ID

application_name

String

Application name

error_code

String

Error code

error_msg

String

Error message

Example Requests

https://{endpoint}/v1/projects/0a38ce9ba3c740c199a0f872b6163661/applications/groups/move

{
  "application_ids" : [ "a958794f9f4f4a24a96950c9cb279a4d", "a958794f9f4f4a24a96950c9cb279a4f" ],
  "group_id" : "ec3ccc617cf3405b8a6236f26223112b"
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "result" : [ ],
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK: The request is successful.

Error Codes

See Error Codes.