0

我已阅读文档并发布有关其余 api 的信息,但没有找到任何问题的答案。

我用来测试它的命令:

curl -H "Accept: application/json" -X POST -d "method=login&input_type=JSON&response_type=JSON&rest_data={"user_auth":{"user_name":"admin","password":"encrypted md5"},"application_name":"dummy"}" http://myhost/service/v2/rest.php

我已经检查了用户表中的管理员密码。

SugarCE 是 6.5.0(构建 8338)

接下来我需要检查什么?谢谢

4

1 回答 1

0

你可以试试这个。我已经用单引号替换了双引号。

curl -H "Accept: application/json" -X POST -d 'method=login&input_type=JSON&response_type=JSON&rest_data={"user_auth":{"user_name":"admin","password":"21232f297a57a5a743894a0e4a801fc3"},"application_name":"dummy"}' http://localhost:8888/SugarCE-Full-6.5.15/service/v2/rest.php

样本输出为:

{
    "id": "dc67f918eb13843fbc7446ed4e3e4cf0", 
    "module_name": "Users", 
    "name_value_list": {
        "user_currency_id": {
            "name": "user_currency_id", 
            "value": "-99"
        }, 
        "user_currency_name": {
            "name": "user_currency_name", 
            "value": "US Dollars"
        }, 
        "user_id": {
            "name": "user_id", 
            "value": "1"
        }, 
        "user_language": {
            "name": "user_language", 
            "value": "en_us"
        }, 
        "user_name": {
            "name": "user_name", 
            "value": "admin"
        }
    }
}
于 2013-10-26T17:29:01.407 回答