SoftLayer getUsers by userStatusID

会有一股神秘感。 提交于 2019-12-02 08:00:40

问题


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:


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.



来源:https://stackoverflow.com/questions/34167799/softlayer-getusers-by-userstatusid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!