Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Curl WSO2更新swagger发布的API_Curl_Wso2_Wso2 Am - Fatal编程技术网

Curl WSO2更新swagger发布的API

Curl WSO2更新swagger发布的API,curl,wso2,wso2-am,Curl,Wso2,Wso2 Am,我正试图用这个curl更新一个已发布APi的招摇过市: curl -X POST -b cookies "http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag" -d 'action=updateAPI&name=datumvalidatie&provider=admin&version=1.0.0&visibility=public&thumbUrl=&descript

我正试图用这个curl更新一个已发布APi的招摇过市:

curl -X POST -b cookies "http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag" -d 'action=updateAPI&name=datumvalidatie&provider=admin&version=1.0.0&visibility=public&thumbUrl=&description=test&tags=validation&endpointType=nonsecured&tiersCollection=Gold,Bronze&http_checked=http&https_checked=https' -d 'endpoint_config={"production_endpoints":{"url":"https://www.test.com/datumvalidatieWebApi/api","config":null},"endpoint_type":"http"}' -d 'swagger={"basePath" : "/DatumvalidatieWebApi", "paths" : {"/perioden/ingangsdatum" : {"get": {"summary" : "test", "x-auth-type": "Application \u0026 Application User", "deprecated" : false, "produces" : ["application/json", "text/json", "application/xml", "text/xml"], "operationId" : "Ingangsdatum_Get", "responses" :  {"200": {"schema" : {"$ref": "#/definitions/Periode"}, "description": "OK"}, "400" : {"schema" : {"type": "array", "items" : {"$ref" : "#/definitions/Object"}}, "description" : "BadRequest"}},  "x-throttling-tier" : "Unlimited", "tags" : ["Ingangsdatum"], "consumes": []}}}, "host" : "*******", "schemes" : ["http"], "definitions" : {"Periode" : {"description" : "Een periode", "type" : "object", "properties" : {"DatumVan " : {"format" : "date-time", "type" : "string"}, "DatumTot" : {"format" : "date-time", "type" : "string"}}}, "Object" : {"type" : "object", "properties" : {}}}, "swagger" : "2.0", "info" : {"description" : "Een collectie methoden om datumvalidaties uit te voeren.", "title" : "datumvalidatie", "version" : "1.0.0"}}'
我得到的回应是:

"error" : true, "message" : "timeout"

curl: (6) Could not resolve host: \u0026

curl: (6) Could not resolve host: Application

curl: (3) [globbing] bad range in column 43

curl: (3) [globbing] unmatched brace in column 38

curl: (3) [globbing] unmatched close brace/bracket in column 85

curl: (6) Could not resolve host: collectie

curl: (6) Could not resolve host: methoden

......

有人知道我如何解决这个问题吗?

我在打服务电话之前没有登录时就发现了这个错误。您在发送上述curl请求之前登录了吗?如果没有,请先这样登录

curl -X POST -c cookies http://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag -d 'action=login&username=admin&password=admin' 

这一点在本文的顶部提到

是的,我在尝试之前登录了。我在登录时收到一条“error:false”消息,所以这不是问题所在。嗯,在这种情况下,我可能需要查看AM的连接设置。如果我能自己找到解决方案,我会把它贴在这里。谢谢你抽出时间。