第一步:
第二步:
期间如遇到以下截图的问题,首先排除网络不通的问题(即调用此接口的PC机/Server与PMP服务器机器的网络连通性有问题),可能的原因是DNS解析有问题。在API检查期间,PMP将对目标服务器运行nslookup,以验证目标计算机的IP地址或主机名。可以使用以下步骤在hostname字段中为API用户提供三个不同的值,请按照以下说明启用。另外,有两种方案来处理此问题。
方案一:
- Stop the PMP service and edit the file named
system_properties.conf present in PMP/conf directory using Wordpad.
- Add the following line at the end of this file and
save it.
- restapi.hostname.csv=true
- Start the PMP service and go to Admin-->Users
section. Create new API user account.
- Now in the hostname field, you can supply multiple
values in CSV format. Like IP, Hostname, and FQDN.
- So supply all three values. That is
IP,hostname,FQDN.
- Save the user and try using the API feature again
from the same server.
方案二:
- Stop the PMP service and edit the file named
system_properties.conf present in PMP/conf directory using Wordpad.
- Add the following line at the end of this file and
save it.
- api.hostcheck.disabled=true
- Start the PMP service and go to Admin-->Users
section. Create new API user account.
- Save the user and try using the API feature again
from the same server.
重新调用接口,文档中第一个接口“获取用户拥有的及分享给他的资源”成功调用postman截图: