/AWS1/IF_WKR=>LISTUSERS()¶
About ListUsers¶
Retrieves a paginated list of users in a specified Wickr network. You can filter and sort the results based on various criteria such as name, status, or security group membership.
Method Signature¶
METHODS /AWS1/IF_WKR~LISTUSERS
IMPORTING
!IV_NETWORKID TYPE /AWS1/WKRNETWORKID OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/WKRGENERICSTRING OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/WKRINTEGER OPTIONAL
!IV_SORTFIELDS TYPE /AWS1/WKRGENERICSTRING OPTIONAL
!IV_SORTDIRECTION TYPE /AWS1/WKRSORTDIRECTION OPTIONAL
!IV_FIRSTNAME TYPE /AWS1/WKRSENSITIVESTRING OPTIONAL
!IV_LASTNAME TYPE /AWS1/WKRSENSITIVESTRING OPTIONAL
!IV_USERNAME TYPE /AWS1/WKRGENERICSTRING OPTIONAL
!IV_STATUS TYPE /AWS1/WKRUSERSTATUS OPTIONAL
!IV_GROUPID TYPE /AWS1/WKRGENERICSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wkrlistusersresponse
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 from which to list users.
Optional arguments:¶
iv_nexttoken TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING¶
The token for retrieving the next page of results. This is returned from a previous request when there are more results available.
iv_maxresults TYPE /AWS1/WKRINTEGER /AWS1/WKRINTEGER¶
The maximum number of users to return in a single page. Valid range is 1-100. Default is 10.
iv_sortfields TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING¶
The fields to sort users by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'lastName', 'status', and 'groupId'.
iv_sortdirection TYPE /AWS1/WKRSORTDIRECTION /AWS1/WKRSORTDIRECTION¶
The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.
iv_firstname TYPE /AWS1/WKRSENSITIVESTRING /AWS1/WKRSENSITIVESTRING¶
Filter results to only include users with first names matching this value.
iv_lastname TYPE /AWS1/WKRSENSITIVESTRING /AWS1/WKRSENSITIVESTRING¶
Filter results to only include users with last names matching this value.
iv_username TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING¶
Filter results to only include users with usernames matching this value.
iv_status TYPE /AWS1/WKRUSERSTATUS /AWS1/WKRUSERSTATUS¶
Filter results to only include users with this status (1 for pending, 2 for active).
iv_groupid TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING¶
Filter results to only include users belonging to this security group.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wkrlistusersresponse /AWS1/CL_WKRLISTUSERSRESPONSE¶
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->listusers(
iv_firstname = |string|
iv_groupid = |string|
iv_lastname = |string|
iv_maxresults = 123
iv_networkid = |string|
iv_nexttoken = |string|
iv_sortdirection = |string|
iv_sortfields = |string|
iv_status = 123
iv_username = |string|
).
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_nexttoken( ).
LOOP AT lo_result->get_users( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_userid = lo_row_1->get_userid( ).
lv_sensitivestring = lo_row_1->get_firstname( ).
lv_sensitivestring = lo_row_1->get_lastname( ).
lv_genericstring = lo_row_1->get_username( ).
LOOP AT lo_row_1->get_securitygroups( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_securitygroupid = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_boolean = lo_row_1->get_isadmin( ).
lv_boolean = lo_row_1->get_suspended( ).
lv_integer = lo_row_1->get_status( ).
lv_boolean = lo_row_1->get_otpenabled( ).
lv_genericstring = lo_row_1->get_scimid( ).
lv_genericstring = lo_row_1->get_type( ).
lv_genericstring = lo_row_1->get_cell( ).
lv_genericstring = lo_row_1->get_countrycode( ).
lv_integer = lo_row_1->get_challengefailures( ).
lv_boolean = lo_row_1->get_isinviteexpired( ).
lv_boolean = lo_row_1->get_isuser( ).
lv_genericstring = lo_row_1->get_invitecode( ).
lv_boolean = lo_row_1->get_codevalidation( ).
lv_genericstring = lo_row_1->get_uname( ).
ENDIF.
ENDLOOP.
ENDIF.
Get paginated list of users¶
Get paginated list of users
DATA(lo_result) = lo_client->listusers(
iv_maxresults = 20
iv_networkid = |12345678|
iv_sortdirection = |ASC|
iv_sortfields = |username|
).
Filter by status and group¶
Filter by status and group
DATA(lo_result) = lo_client->listusers(
iv_groupid = |BCTY8Qhe|
iv_maxresults = 10
iv_networkid = |12345678|
iv_status = 1
).
Empty user list for network with no users¶
Empty user list for network with no users
DATA(lo_result) = lo_client->listusers( iv_networkid = |12345678| ) .