Run that List All request, first goal tackled, make sure you copy the domain value of the app you want to reveal next into the domain variable. You can list all the applications available for the user in the business group in the environment. Getting the list of applications and the application status Select the id of the environment you want to work on and manually set the value for the environment-id variable. Time for Environments (Get Env) Request, not the org-id in the URL. Run User Details (api/me) note the Header is the previous api-auth-header, when successful it will look like the screen below and the Root Business Group will automatically be stored in your variables as org-id (You can manually change the script or the variable if a different BG is needed). When successful, it will return the access token which will automatically be stored in your Environment variable api-auth-header Setting up your environmentįirst, execute the Login (/login) request. Requests are CSRF protected, your Collections has the cookie clear script, but still, to avoid an invalid csrf token you need to open your Postman Cookies, Whitelist Domains and add *., if you need more help adding those Whitelist Domains see this article. Import both files and make sure to add both anypoint-username and anypoint-password to your Postman Environment, the fields highlighted below. Make sure you have Postman installed, that you do know how to import the Postman Collection and the Environment and then you can finally download the postman assets from here. (Keep it mind for some cases Anypoint CLI, a wrapper of PlatformAPIs is enough!) Prerequisitesīefore we start working with platform APIs, you need these three pieces of data: a session token, the organization id and the environment id as shown in the below image. Preview: This will show the preview of the page that has been sent.Now, let’s use an example scenario: one of the automation devs in our team is looking for a quick way to query Anypoint Platform to get a full list of applications and to query the status of a specific application, which then can be integrated in a pipeline, one of the requirements is to execute those through HTTP Requests. Raw: This is almost similar to pretty but shows the code without colors and in single lines. Pretty: In this option, code will show colorfully with different keywords and have indentations in the code, which is useful for reading. In the Body tab of the response box, we have multiple options to see the response in a different format. Here, we got the status code 200 200, which means we got a successful response for the request. Make sure you have a proper internet connection otherwise, you will not get a response. Step 5: Once you press the send button, you will get the response from the server. We will use Step 3: Now, select the GET request from the list of request methods. Step 2: Enter the URL in the address bar. Once you create a new request then you will get the following window: You can also open the new tab by entering ctrl+T or from the Open New menu select Tab option. To create a new request, open a new tab, click from the + plus button. To create the first GET request in Postman, follow the following steps: You can try to search for something on Google you will get the same search string in the URL. For example, if you search anything on Google, you actually using a GET request because there is no sensitive information, and you are just requesting the page. GET request contains all information inside the URL, and because of that, some people do not prefer to use GET request while they are sending some confidential data such as passwords. Means, there is no creation, updation, addition, or deletion of data on the server when you are making a GET request. GET request will not affect any data on the server. When you make the GET request on the server, then the server responds to the request. A GET request gets the information from the server. Since now we know how to create the request in Postman, it's time to work on GET request.
0 Comments
Leave a Reply. |