Logo
30-day challenge API Documentation

Collections and environments

Number of APIs: 2


1. POST raw text

POST {{baseUrl}}/post

It's time to work on your next challenge.

  1. Create a variable: Notice the same request from the last challenge. Copy the first part of the request URL (the part before /post) and replace it with {{baseURL}}.

The double curly braces is how you get variables in the text fields of Qodex. If you hover over the variable, the tool tip says Unresolved Variable because it hasn't been set yet. 1. Create an environment: [Create a new environment] with a key baseURL. The value for this new variable should be the part you copied from the request URL in the previous step. You can enter it under both INITIAL VALUE and CURRENT VALUE. Remember to select the new environment as the active environment so Qodex will read in the values properly.

If you hover over the variable {{baseURL}} in the request URL, you should see Qodex reading in the variable value from the actively selected environment. Now that you've stored the base URL in a variable named baseURL, you can reference it in your requests using {{baseURL}}. If the base URL value is https://Qodex-echo.com, and is listed as part of the request URL using {{baseURL}}/post, Qodex will send the request to https://Qodex-echo.com/post. Save your changes in the collection and environment. 1. Add a request: Rename the request from echo to POST raw text. Then, duplicate the request in this folder, and rename the second request GET with query params. Update the new request HTTP method to GET and update the request URL from /post to /get. Add two [query parameters] This can be anything you like, for example, foo and bar or name and ferret. Send to make sure you get a 200 status code.

Once you complete these steps, move on to the next folder in this collection to submit your solution.



2. GET with query params

GET {{baseUrl}}/get?name=postman&work=awesome



ENDPOINTS