SoftLayer getUsers by userStatusID

2019-03-02 01:20发布

I am trying to retrieve SoftLayer user profiles by userStatusId.

I am using URL:

 <curl -X GET -k -n "https://api.softlayer.com/rest/v3/SoftLayer_Account/getUsers.jsoni?objectMask=mask\[virtualGuestCount,hardwareCount,userStatus,username,id,email,createDate;accountId,passwordExpireDate,secondaryPasswordTimeoutDays,secondaryPasswordModifyDate,userStatusId\]&objectFilter=\{\"userStatusId\":\{\"operation\":1021\}\}">

The user profiles returned are only 1001 status id for Active.

How do I retrieve other status IDs like 1002 = Disabled, 1003 = Inactive, 1021 = cancel_pending, 1022 = VPN Only

Thank you.

1条回答
家丑人穷心不美
2楼-- · 2019-03-02 02:02

Try the following request:

For the example, we are filtering by an inactive user:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getUsers.json?objectMask=mask[id;username,userStatus]&objectFilter={   "users": {     "userStatus": {       "id": {         "operation": "1003"       }     }   } }

The statuses that you can filter will the same statuses displayed to change in user profile: Active, Disabled, Inactive, VPN Only.

Once any user is deleted, it won't show in Portal nor Api.

查看更多
登录 后发表回答