====== OSS Postman script ====== Postman is a REST client that can be used to easily integrate with the WMC OSS API. Kerlink provides a sample Postman configuration dump that can be imported. It contains: * One environment: defines a WMC instance, username and password. * One authentication collection: contains the login webservice, retrieves and stores the authentication token in an environment variable. * One large WMC collection: contains all the web services. ===== Installation ===== - Download {{:wiki:Backup.postman_dump.json|the configuration dump}}. - Install Postman, if not already installed. - Import the downloaded configuration dump. - Edit the environment to match your needs (credentials and WMC instance URL). - Execute the authentication request: this will save the authentication token in the environment (open the environment again to check). - Edit the collection variables, and set your ''customerId'' (for example). - Execute a request that uses the ''customerId'' variable, for example ''getCustomerFleets''. ===== Screenshots ===== Here are the screenshots of the steps mentioned above. | **Import the Postman dump** | **Setup your environment** \\ Enter your login/password, and change URL if needed. \\ The auth token will be populated automatically when performing a login request. | **Perform an authentication** \\ This will create a session that lasts 16 hours. | | {{:images:postman_import.png?400|}} | {{:images:postman_environment.png?400|}} | {{:images:postman_authentication.png?400|}} | | **Edit collection menu** | **Collection variables** \\ You can change the variables that are used in the requests | **Request execution** \\ See the variables used, and the request result | | {{:images:postman_collection_edit.png?200|}} | {{:images:postman_edit_collection_variables.png?400|}} | {{:images:postman_execute_request.png?400|}} |