Welcome to the first in our Caylent API Tutorials. This post aims to simplify the process of configuring Postman to enable you to best leverage Caylent’s Easy REST API documentation. Each of these tutorials will be supported by a YouTube video.
For this tutorial, you’re going to need three things:
- An activated account with Caylent and the username and password. Sign up here to complete this step.
- Caylent’s Postman Environment JSON Template downloaded from our Github repository. This file is a template of all the environment variables that you can use and store.
- And finally, have Postman itself downloaded and installed.
5 Steps to Leverage Caylent’s Easy REST API Documentation
Once complete, follow these simple steps to configure and manage your environment variables.
Open Postman to the Builder page.
Click on the cog in the right-hand corner and select “Manage Environments.”
From here, select import and choose the downloaded Postman Environment JSON Template file.
Once the import is successful, it’s time to set up the environment variables according to your personal data. Do this by configuring the username and password to reflect your Caylent account information accordingly.
Now within the environment template, check and uncheck each of the available variables as you want to use them. All environment variables are automatically enabled by default. So, be sure to tailor these accordingly to your needs.
The available environment options are:
- aws_access_key and aws_secret_key: These are the credentials which allow Caylent’s system to deploy your stack within your AWS account. If you haven’t already done so, this is the point to add these here. For help with this, check out this article for how to connect Caylent with AWS Services.
- repo_username, repo_password, and repo_email: These are your Docker Hub repository credentials. With these, Caylent can deploy your application on each of your stacks if you have a private repository. These variables are only necessary if you need to set up access to a private repository. If using a public repo like WordPress, you can leave these blank—just uncheck the boxes.
- github_username and ssh_username: Caylent’s system uses GitHub keys to auto-configure SSH access to instances within your stack. Postman will automatically default to your github_username unless you specify an ssh_username of your own.
- azure_app_id, azure_sub_id, azure_tenant_id, and azure_secret_key: Follow this link to discover how to get these credentials and which ones to fill out.
Once you’ve enabled or disabled these options and updated your username and password, the next step is to select the environment that has just been saved: Caylent Template Env. This option is located in the right-hand corner of the Builder page.
Once you’ve completed all the above steps, you’re ready to make use of our Caylent Easy REST API documentation. To access and leverage each of the Documents, click here to load the properties into Postman. The data fields will fill out according to the collection you choose.
Example: Load the Login properties from here. Hit “Send.” This will then take the environment token key through tests and save it into “Postman.setGlobal variable.” You can now go on to use other tests, leveraging that token in each of the calls to authorize and authenticate everything.
Here’s the video tutorial to guide you through this steps screen by screen.
Watch the next Caylent API YouTube Tutorial here: Setup SSH Access and Firewall Rules via Caylent API
Check out the next Caylent API Blog Tutorial now: Caylent Stack Deployment with SSH EC2 Access and Team Management