Updated on 2024-07-05 GMT+08:00

Creating a Group

Function

This API is used to create a group.

Calling Method

For details, see Calling APIs.

URI

POST /v1/projects/{project_id}/applications/groups

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

name

Yes

String

Group name

parent_id

No

String

Parent group ID

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

String

Group ID

status

String

Request success or failure status

Example Requests

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

{
  "name" : "Group Name",
  "parent_id" : "d26da1dc24314c63a253cbc452dabd96"
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "result" : "2f1a73c269d14345aa0652a611b30c8e",
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK: The request is successful.

Error Codes

See Error Codes.