wso2 / docs-apim

Apache License 2.0
70 stars 395 forks source link

[APIM-4.0.0][Improvement] - Mention the API revision creation as the mandatory step in the document #3696

Closed saranki closed 3 years ago

saranki commented 3 years ago

Description: In wso2am-4.0.0, adding API revision under deployment UI is mandatory. If not, the API will not be published in the gateway and cannot invoke the API calls. The following issues will not happen if the "Create and Publish" button is clicked during the API creation process in the publisher portal. But if the "Create" button is clicked, then the revision APIs will not be created. Unless a revision is created for an API it will not be published via the gateway nor will be able to invoke the API calls. It will result in a "Bad Request". Therefore, if the API is created and published separately (Create button -> Publish button) the API revision should be added manually in the "Deployment" UI.

Case 1: When the sample endpoint(HTTP - http://run.mocky.io/v2/5185415ba171ea3a00704eed) in the doc [1] is used in a newly created REST API in the publisher portal, the Bad Request is sent as the response.

Request
curl -X GET "http://localhost:9443/restAPI/1.0.0" -H "accept: */*" -H "Authorization: Bearer eyJ4NXQiOiJNell4TW1Ga09HWXdNV0kwWldObU5EY3hOR1l3WW1NNFpUQTNNV0kyTkRBelpHUXpOR00wWkdSbE5qSmtPREZrWkRSaU9URmtNV0ZoTXpVMlpHVmxOZyIsImtpZCI6Ik16WXhNbUZrT0dZd01XSTBaV05tTkRjeE5HWXdZbU00WlRBM01XSTJOREF6WkdRek5HTTBaR1JsTmpKa09ERmtaRFJpT1RGa01XRmhNelUyWkdWbE5nX1JTMjU2IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImF1dCI6IkFQUExJQ0FUSU9OIiwiYXVkIjoiZUFwa01zMENvYlpSeEFnd1JaQTJublU1ZmVvYSIsIm5iZiI6MTYxOTA4ODY4NCwiYXpwIjoiZUFwa01zMENvYlpSeEFnd1JaQTJublU1ZmVvYSIsInNjb3BlIjoiZGVmYXVsdCIsImlzcyI6Imh0dHBzOlwvXC9sb2NhbGhvc3Q6OTQ0M1wvb2F1dGgyXC90b2tlbiIsImV4cCI6MTYxOTA5MjI4NCwiaWF0IjoxNjE5MDg4Njg0LCJqdGkiOiIzOWFkZjE1Yy1kOWEyLTQzY2MtYjg3Zi05NzIxMzBlYjllNzEifQ.TIsbZAJ_SOtGOTkLb7oBhzdDBk2lWzkKkJl9a1ODPLRTyXYkhDOj7aGGmJ1Zf7fmafnEzQmBGmv5sm-tNgyCn-f5w5w832wW_cvul8Bx5UrwEDZUMkfY3sGPBjevxl5sb736siDv3UIChs5Yo8DVypl6MSa3sL5zp24zuXglKxl1e0aXTPdRCyCPdlMHB4zTHjBOuwq2XPE-2vUAx1D0-RoJa8kB5BEFzF9uUdALqEWwZUmqHPejvyslvAAgyC8JFmkgjKATMR9IMM_etxDbAgr9kyIFlHpjBVb2I8CeAftJiUqLV-Qd8X6RT-TpLyQ7J60SUb1Yyg-cDhkHSdIJhw" -k

Response
Bad Request
This combination of host and port requires TLS.

Case 2: The servers dropdown in devportal is displayed as http:///hello/1.0.0. image

Solution: Add a revision under the "Deployment" UI in the publisher portal for the API to get published via the gateway.

[1] https://apim.docs.wso2.com/en/4.0.0/get-started/quick-start-guide/quick-start-guide/

Affected Product Version: wso2am-4.0.0-RC

lakshithagunasekara commented 3 years ago

Update the revision content with https://github.com/wso2/docs-apim/pull/3766. Closing the issue as the PR is merged.