====== SwaggerUI (WMC 3.1) ====== SwaggerUI is an open-source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful Web services. ===== How to access SwaggerUI? ===== Swaggerui is available from the **Documentations** area of the dashboard : \\ {{:wiki3:pushapi.png|}} Then select "GMS API" item located in the upper right corner of the page:\\ {{:wiki3:swaggerui_acces_2.png|}} To use Swaggerui, simply click on the "Swaggerui" item displayed in the upper middle of the page: \\ {{:wiki3:swaggerui_acces.png|}} {{:wiki3:swaggerui_1.png|}} ===== How to use Swaggerui? ===== - Execute the authentication request (screenshot #1 to #4) - Save the authentication token in the environment (open the environment again to check) (screenshot #5 and #6) - Execute a request: for instance *getCustomer* (screenshot #3) ===== Screenshots ===== ==== Authentication request ==== Search for "login" method (search CTRL-F can be used for this operation): \\ {{:wiki3:swaggerui_login.png|}} screenshot #1 Click on the "POST" button to collapse the login method: \\ {{:wiki3:swaggerui_login_collapsed.png|}} screenshot #2 Click "Try it out" to edit the body of the login request: \\ {{:wiki3:swaggerui_login_editbody.png|}} screenshot #3 Enter your credentials (WMC dashboard credentials) by filling the "login" and "password" fields: \\ {{:wiki3:swaggerui_login_entercredentials.png|}} screenshot #4 Click on "execute button" to process the request. The http code of the server response should be 200 or 201: \\ {{:wiki3:swaggerui_login_responsebody.png|}} screenshot #5 Copy the token value to the clipboard buffer. ==== Save the authentication token ==== Click on the "Authorize" button at the upper right corner of the page and paste the value of the token: \\ {{:wiki3:swaggerui_savetoken.png|}} screenshot #6 Then click on the Authorize button to keep the value in the system. ==== Execute an applicative request ==== For instance, search for "getCustomer" method. Collapse the method and press the "Execute" button: \\ {{:wiki3:swaggerui_getcustomer.png|}} screenshot #7 The response is shown in the response body of the 200 "error code": \\ {{:wiki3:swaggerui_getcustomer_responsebody.png|}} screenshot #8 For this example, 3 customers are returned by the request. Scroll down to see the rest of the response body.