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

Adding a VPN User to a Group

Function

This API is used to add a VPN user to a specified user group.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/groups/{group_id}/add-users
Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID.

vpn_server_id

String

Yes

Specifies the ID of a VPN server.

group_id

String

Yes

Specifies the ID of a VPN user group.

Request

  • Request parameters
    Table 2 Request parameters

    Parameter

    Type

    Mandatory

    Description

    users

    Array of OpVpnUser objects

    Yes

    Specifies the VPN user list.

    Table 3 OpVpnUser

    Parameter

    Type

    Mandatory

    Description

    id

    String

    Yes

    • Specifies the ID of a VPN user.
    • The value is a UUID containing 36 characters.
    • Example request
      POST https://{Endpoint}/v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/groups/{group_id}/add-users
      
      {
        "users": [
          {
            "id": "41ad472e-d3e4-482b-8f00-7b2c1bfc4b7d"
          },
         {
            "id": "a609eecb-3fa6-4d6d-a8c3-256a12d02b6c"
          }
        ]
      }

Response

  • Response parameters

    Returned status code 201: successful operation

    Table 4 Parameters in the response body

    Parameter

    Type

    Description

    request_id

    String

    Specifies a request ID.

    • Example response
      {
          "request_id": "63c49a90467d1ee8a111e587eaedac1f"
      }

Status Codes

For details, see Status Codes.