What is Postman? Link to heading
Well, postman is the person who delivers mail to your house. OK. This is a bad joke.
I am taking the following from Postman’s website, they explained it perfectly.
Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
I first got to know about Postman during my internship with Intuitive, I learned a lot during my 2 months there, most of my work habit is actually learned from there. I extremely appreciate it.
Postman is a great way to test on your API, have a sneak peak of your data, Postman is definitely your best options. The great thing about Postman is, you don’t need to setup really complicated process, front-end or backend, but you can just test the part that you want to test.
I like solving problems, and Postman allows you to only focus on the problem on hand without worrying about other parts. While you are working on the API, your coworkers can work on front-end design, which can make your team work more efficiently.
My use cases with Postman is mainly for testing on my database structure, when I am in process of designing database structure. I use Postman to test the following:
- How do my data structure look?
- Can I get the data easily?
- Is the relationship of my databased developed correctly?
- etc…..
Different parts of Postman Link to heading
There are different parts of Postman that you can take advantage of which will definitely make your life easier. The following are just my way of using Postman, they don’t mean the best practice, but by using Postman this way, it is making my life easier.
Workspaces Link to heading
Workspaces can be used to organize your projects, for example, you have object A, B, C; then you can add your team member in each workspace, so you guys can collaborate that easily. That also helps you to change to a different space when you are on each projects, just keep everything organized.
Collections Link to heading
I see collections as folders, you organize your files on your laptop with folders, it is the same case here. You can add APIs in each collections, for each collection, you can add your notes and documentations as well; so that when someone else taking over the projects, they know exactly what’s going on. You also have the option to share a collection. Keep it organized like that!
Variables Link to heading
Have you seen people do a Postman screenshot with blackouts? Because they don’t want you see their username and password, or secrets. Now the next time, you see that, you can suggest them to use variables! You can use variables to solve that problem along with increasing the security, variables can also help you keep everything organized. Variables can be used locally, as per collection, in that way, you only need to change the variable once! Just like in coding when you use the variables once, everywhere it is reference, the value will be synced.
Documentation Link to heading
You can add comments on anything in your interface, and you can document as you go while you are developing. I love using those when I am collaborate with others, they can understand better on why I am doing it this way, and what does each variable used for. Naming should be straightforward that they can be understand easily.
Training Link to heading
I am the type that I learn as I go and I only learn the part that I need. However, each person learn things differently. Postman also offer a tons of materials for you to train and get use to the platform. Here is an example: 30-days-of-postman-for-developers
Postman and Salesforce Link to heading
You can also get Salesforce data to Postman for testing purposes. The How-To part, I will refer you to this article here. Rahul here did a great job of explaining each step and guiding you on how to set it up.
Other Items Link to heading
I see people have questions about the access token, and sometimes people wonder if they can get an unexpired access token, but I think we need to get one thing straight, what is an access token? Access token is used at a lot of places now, and there are different types of Access Token. I think of them like “Keys” to get access to an app, portal, page, etc. All of those happens in the backend, so you probably never notice as user. Access token can expire depends on how they were setup by the developers, they are depends on how long your page or app’s sessions are, when the session is out, you will be forced to login again to gain access. That’s why sometimes, when you logged in through a social login (Facebook, Twitter, Google, etc.), and you have been idle on the app for a while, they will ask you to login again, that’s when your session is timed out. The purpose for Access Token is to gain access, at the same time, we also want to be secure. There are bad people out there could use the same portal to gain information they are not suppose to get, which is a long way of explaining the action of “hacking”. Haha. For Salesforce, when you setup the connected app, you will get the access token automatically when you first gain access, and you can get the access token from Salesforce when you pull the api from Postman initially. When the session is expired, you will have to retrieve the access token again and query your data accordingly. Now that’s the case when you are accessing it through Postman, someone might wonder if they need to provide an access token to their app constantly, well, no….they are intelligent enough to deal with all of that in the backend. You can find out more here.
Conclusion Link to heading
Postman is awesome!!!! lol
If I wrote anything wrong here please point out, and if you are using postman, and having any tricks you learned along the way, please reach out, I like to talking to you more on that.