All instructions related to Swagger require you to first authenticate yourself whenever you’ve opened a window with the Swagger UI. Below are detailed instructions on how to make sure you are fully authenticated when using Swagger API functions.
Opening new tabs, running into errors/failures, refreshing your page, or letting enough time go by can all cause your authentication to expire. If you're getting errors (especially 401 errors or any kind of "unauthorized" errors), the first thing to do is to try to re-authenticate using the instructions below.
1. Authenticate your credentials on Swagger
Go to the Swagger UI page here, and begin by completing your authorization. If you're already using Swagger, and you notice you're starting to get a lot of errors and failures, try refreshing the page, and continue following these instructions: Click "Authorize"
check off all of the boxes at the bottom of the pop-up and click "Authorize" again, and then select the email that is associated with the billing project that you'll be using to create the cloud environment
After you've clicked "Authorize" and selected your login credentials (you may be asked for a password), you'll see the pop up below. Make sure to click "close" and not "log off" to stay authenticated as you execute the API functions.
2. Execute API functions
You can now use the API functions listed on the page, assuming the email you authenticated with has access to Terra resources. You do this by selecting the function of interest to de-collapse the details, click "Try it out" in order to activate the fields, fill in the fields, then click "Execute."