curl - WSO2 Update swagger published API -
i trying update swagger of published api curl:
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"}}'
i respond:
"error" : true, "message" : "timeout" curl: (6) not resolve host: \u0026 curl: (6) 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) not resolve host: collectie curl: (6) not resolve host: methoden ......
does know how can fix this?
i've observed error when hadn't logged in before making service call. did login before sending above curl request? if not, login first this.
curl -x post -c cookies http://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag -d 'action=login&username=admin&password=admin'
this mentioned @ top of rest api doc.
Comments
Post a Comment