Skip to content

/AWS1/IF_WKR=>BATCHTOGGLEUSERSUSPENDSTATUS()

About BatchToggleUserSuspendStatus

Suspends or unsuspends multiple users in a Wickr network. Suspended users cannot access the network until they are unsuspended. This operation is useful for temporarily restricting access without deleting user accounts.

Method Signature

METHODS /AWS1/IF_WKR~BATCHTOGGLEUSERSUSPENDSTATUS
  IMPORTING
    !IV_NETWORKID TYPE /AWS1/WKRNETWORKID OPTIONAL
    !IV_SUSPEND TYPE /AWS1/WKRBOOLEAN OPTIONAL
    !IT_USERIDS TYPE /AWS1/CL_WKRUSERIDS_W=>TT_USERIDS OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/WKRCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wkrbtctglusersuspst01
  RAISING
    /AWS1/CX_WKRBADREQUESTERROR
    /AWS1/CX_WKRFORBIDDENERROR
    /AWS1/CX_WKRINTSERVERERROR
    /AWS1/CX_WKRRATELIMITERROR
    /AWS1/CX_WKRRESNOTFOUNDERROR
    /AWS1/CX_WKRUNAUTHORIZEDERROR
    /AWS1/CX_WKRVALIDATIONERROR
    /AWS1/CX_WKRCLIENTEXC
    /AWS1/CX_WKRSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_networkid TYPE /AWS1/WKRNETWORKID /AWS1/WKRNETWORKID

The ID of the Wickr network where users will be suspended or unsuspended.

iv_suspend TYPE /AWS1/WKRBOOLEAN /AWS1/WKRBOOLEAN

A boolean value indicating whether to suspend (true) or unsuspend (false) the specified users.

it_userids TYPE /AWS1/CL_WKRUSERIDS_W=>TT_USERIDS TT_USERIDS

A list of user IDs identifying the users whose suspend status will be toggled. Maximum 50 users per batch request.

Optional arguments:

iv_clienttoken TYPE /AWS1/WKRCLIENTTOKEN /AWS1/WKRCLIENTTOKEN

A unique identifier for this request to ensure idempotency.

RETURNING

oo_output TYPE REF TO /aws1/cl_wkrbtctglusersuspst01 /AWS1/CL_WKRBTCTGLUSERSUSPST01

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->batchtoggleusersuspendstatus(
  it_userids = VALUE /aws1/cl_wkruserids_w=>tt_userids(
    ( new /aws1/cl_wkruserids_w( |string| ) )
  )
  iv_clienttoken = |string|
  iv_networkid = |string|
  iv_suspend = ABAP_TRUE
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_genericstring = lo_result->get_message( ).
  LOOP AT lo_result->get_successful( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_userid = lo_row_1->get_userid( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_failed( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_genericstring = lo_row_3->get_field( ).
      lv_genericstring = lo_row_3->get_reason( ).
      lv_userid = lo_row_3->get_userid( ).
    ENDIF.
  ENDLOOP.
ENDIF.

Suspend multiple users

Suspend multiple users

DATA(lo_result) = lo_client->batchtoggleusersuspendstatus(
  it_userids = VALUE /aws1/cl_wkruserids_w=>tt_userids(
    ( new /aws1/cl_wkruserids_w( |123| ) )
    ( new /aws1/cl_wkruserids_w( |456| ) )
  )
  iv_clienttoken = |6ba7b815-9dad-11d1-80b4-00c04fd430c8|
  iv_networkid = |12345678|
  iv_suspend = ABAP_TRUE
).

Unsuspend users with partial failure

Unsuspend users with partial failure

DATA(lo_result) = lo_client->batchtoggleusersuspendstatus(
  it_userids = VALUE /aws1/cl_wkruserids_w=>tt_userids(
    ( new /aws1/cl_wkruserids_w( |123| ) )
    ( new /aws1/cl_wkruserids_w( |456| ) )
  )
  iv_networkid = |12345678|
  iv_suspend = ABAP_FALSE
).