====== GMS API 3.x Swagger Inspector ====== Swagger like Postman is a RESTful client that can be used to perform http requests to the WMC through GMS API. \\ You can find information about GMS API in the [[.documentation|Documentation]] section of the dashboard. ===== Installation ===== To be able to use Swagger Inspector, you need to: - Install the Swagger Inspector extension for your Browser (Firefox, Chrome) - Download the openAPI json file from the WMC dashboard [[.documentation|Documentation]] - Import the OpenAPI json file - Execute an authentication request - Execute a GMS API request (getCustomers for instance) ===== Screenshots ===== Here are the screenshots of the steps mentioned above. | **1. Install the Firefox Swagger Inspector extension from the Firefox Catalog** | | {{ :wiki3:firefox_swagger_inspector_extension_1.png?600 |}} {{ :wiki3:firefox_swagger_inspector_extension.png?800 |}} | | **2. Download the openAPI json file** \\ from the WMC Documentation section \\ a) Right click on the OpenAPI JSON description item \\ b) Save the JSON file | | {{ :wiki3:wmc_gms_get_openapi_json.png?600 |}} {{ :wiki3:wmc_gms_get_openapi_json_2.png?600 |}} | | **3. Import the OpenAPI Json file** \\ a) Select the upload button \\ b) Select the OpenAPI json file \\ c) Open the file | | {{ :wiki3:swagger_inspector_upload_openapi_json_file.png?600 |}} {{ :wiki3:wmc_gms_get_openapi_json_3.png?600 |}} | | **4. Perform an authentication request** \\ This will create a session that lasts 16 hours. \\ a) Search for application/login request in the list \\ b) Add /gms/ in the path if missing \\ c) Fill-in parameters with your credentials \\ d) Press SEND button \\ e) Copy the token value to your clipboard | | {{ :wiki3:swagger_inspector_login_wmcintegrationbeta_1.png?500 |}} {{ :wiki3:swagger_inspector_login_wmcintegrationbeta_4.png?700 |}} {{ :wiki3:swagger_inspector_login_wmcintegrationbeta_2.png?700 |}} | | **5. Perform a GMS API request (getCustomers for instance)** \\ a) Search for your request definition \\ b) Copy the token \\ c) Execute the request \\ d) Check the request result (HTTP 200 expected) | | {{ :wiki3:swagger_inspector_getcustomers_1.png?600 |}}{{ :wiki3:swagger_inspector_init_token.png?700 |}} {{ :wiki3:swagger_inspector_getcustomers.png?700 |}} |