UpdateAppMember - Update an application member

Updated at:

Applicable versions

Central and Regional

Endpoints and authorization information

  • Get the endpoint. Replace {domain} in the API request syntax.
  • Get a personal access token.
  • Obtain the organizationId. This parameter is required only for the Central version. You can obtain the organization ID on the Basic Information page in the Organization Management console.

Product

Resource

Required permission

Application Delivery

Application

Read/Write

Request syntax

Centralized Edition

PUT https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/members

Region Edition

PUT https://{domain}/oapi/v1/appstack/apps/{appName}/members

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

Personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Position

Required

Description

Example

appName

string

path

Yes

The name of the application.

my-demo-app

organizationId

string

path

  • Yes: Central

  • No: Regional

The ID of the organization.

ec766e63aee3437d9a51f334d6exe671

-

object

body

No

player

object

body

Yes

The member to update.

id

string

body

No

The ID of the member.

1c83bd48e254405fb27297ee1fb8xxxx

type

string

body

No

The type of the member. Valid values: Member, User, Team, Group, and Org.

Member

roleNames

array[string]

body

Yes

The list of roles for the member to update. Valid values: admin (owner), developer (developer), tester (tester), and operator (O&M).

["admin"]

Request examples

Central

curl -X 'PUT' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/apps/my-demo-app/members' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "player": {
            "id": "1c83bd48e254405fb27297ee1fb8xxxx",
            "type": "Member"
        },
        "roleNames": ["admin"]
    }'

Regional

curl -X 'PUT' \
  'https://{domain}/oapi/v1/appstack/apps/my-demo-app/members' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "player": {
            "id": "1c83bd48e254405fb27297ee1fb8xxxx",
            "type": "Member"
        },
        "roleNames": ["admin"]
    }'

Response parameters

Parameter

Type

Description

Example

-

string

Indicates whether the call was successful.

true

Response example

true

Error codes

For more information about error codes, see Error Code Center.