import { addBanner, addArticle, addTitle, addHeader, addParagraph, addClassParagraph, addSubHeader, addOrderedList, addUnorderedList, addBlockquote, addInset, addInsetList, addInsetCodeListing, addInsetBulletList, addImageWithCaption, addButtonGroup, addSidebar, addSyntax, menu, global_menu } from '/scripts/import.js'; import { local_menu } from '/scripts/webdev.js'; const heading = document.querySelector(".heading"); const global = document.querySelector(".global_menu"); const local = document.querySelector(".local_menu"); const sidebar = document.querySelector(".sidebar"); const main = document.querySelector(".main_content"); heading.append(addTitle("Introducing Postman")); heading.append(addParagraph("David Fancher - LinkedIn Learning - April 2019")); heading.append(addParagraph("Chapter 3 - Manage Requests")); main.append(addHeader("Workspaces")); main.append(addParagraph("Postman organises requests in a way that is hierarchical, similar to a directory tree and offers some similar benefits in that different parts of the structure can be used to store groups of requests and can be stored for collabarative purposes.")); main.append(addParagraph("When you access a file from a directory structue, you often don't really need to care too much about the structure. You only need to be able to navigate through it to find the data that you need and that is largely true in Postman too. The workspace is the highest level of the hierarchy so all of the requests we have worked with so far have been in a workspace. If we only use Postman for simple, ad hoc requests like these, we won't need to know anything more about workspaces or its substructures, but if you want to use Postman for anything more advanced than that, you will need to know more about it!")); main.append(addParagraph("Postman serves the following functions.")); main.append(addSubHeader("Container")); main.append(addParagraph("As I mentioned, the workspace is the top level in the Postman hierarchy, but you can have more than one workspace and this can be thought of as being analogous to having separate drives or volumes attached to a system. This allows us to maintain separate projects, for example. You might be developing three APIs for different clients and you would need to keep the data for these clients separate. The easiest way to do that is to create a workspace for each.")); main.append(addParagraph("You can further organise things in the workspace using collections, folders and environments. If you don't have an account with Postman, but even a free account allows youi to have multiple workspaces. However, if you are a casual Postman user, it is entirely possible to use it without even being aware that workspaces exist.")); main.append(addSubHeader("Request History")); main.append(addParagraph("This is like a versioning system for Postman. Request histories are saved to a workspace.")); main.append(addSubHeader("Monitoring")); main.append(addParagraph("This can be used both to record the uptime for an API and to issue an alerts when an API is down. You can check out the page for Monitoring API uptime in the Postman docs, but the subject is not covered in this course.")); main.append(addSubHeader("API Mocking")); main.append(addParagraph("\"Postman enables you to create mock servers to assist with API development and testing. A mock server simulates the behavior of a real API server by accepting requests and returning responses. By adding a mock server to your collection and adding examples to your requests, you can simulate the behavior of a real API.")); main.append(addParagraph("When you send a request to a mock server, Postman matches the request to a saved example in your collection. Postman then responds with the data you added to the example. To view existing mock servers in your workspace, select Mock Servers in the sidebar.\"")); main.append(addParagraph("The above quote is taken from the Postman docs on the page for Setting Up mock servers and this neatly summarises the topic. Again, this is not a subject covered in this course.")); main.append(addParagraph("If you take a look at some of the screenshots that show the Postman interface in chapter 2 such as the one shown in figure 26, you can see the default worksapce in the top-right corner, which is My Workspace. We have ignored it in previous chapters. Note that we have buttons to create a new workspace oe two import a workspace. If you click on the button to create a new workspace, you will see the dialog shown in figure 27.")); main.append(addImageWithCaption("images/create_new.png", "Figure 27 - The dialog box you see when clicking the new button next to the workspace name.")); main.append(addParagraph("As you can see in figure 27, the Create New dialog box allows you to create a number of things, including a workspace. I will create a new workspace called Personal and in figure 28, you can see the Create Workpace dialog with the appropriate name and a brief summary already added.")); main.append(addImageWithCaption("images/create_workspace.png", "Figure 28 - The new workspace dialog box with the name and a summary added.")); main.append(addParagraph("Note that in addition to a name and summary, you can also set visibility which is important if you want to share this workspace with other members of a team. If you select Team, but you haven't already created one, Postman will create that for you.")); main.append(addParagraph("You can switch between workspaces by selecting the Workspaces drop-down menu in the menu bar. If we select the Personal workspace, this opens up the Workspace Overview. This shows us how many Collections, APIs, Environments and so on that we have in this workspace. Since it has just been created, we don't have any. If we click on Workspace Settings, we can edit the name or delete the workspace and we can also change the visibility. Since our workspace is only visible to me, I can modify this to make it visible either to a team or we can make it public. We cannot convert it to Private because that requires a paid account.")); main.append(addParagraph("Another restriction you may come across when changing the visibility of a workspace is that you cannot select a more restrictive level of accesss. For example, having converted my personal workspace to be visible to a team, I cannot change this back to make it visible only to me.")); main.append(addParagraph("Since the workspace is now visible to a team, the workspace settings also provides a way to invite team members to access it and we can invite people using their names, email addresses or a group name and I would guess that this is based on the assumption that you have Postman contacts set up is some way so that it recognises a name (assuming it is correct) as a Postman user, for example. You can also copy a link that you can send to people by some other means, such as email or via a Slack message. Note that you can also use this option with a personal workspace but if you do, this it will be converted to a team workspace so you may need to take some care with that.")); main.append(addParagraph("Workspaces make collaboration easier, but htey also enable some features as we mentioned above so we will look at one of these, Collections and Folders, next.")); main.append(addHeader("Collections and Folders")); main.append(addParagraph("We can store requests in a workspace by putting them into a collection and within that collection, we can also have folders to further organise the request. For example, if I were creating an API for access to data on my website, I might create a workspace for my website with a collection inside it for requests. Inside that collection, I might have folders for requests relating to web development, raspberry pi, programming and so on.")); main.append(addParagraph("To create a collection, we click the same new button we clicked to create a workspace (see figure 27) and this time we click Collection. I have used Postman Sample API as the name for this collection and once the name has been inserted, we can click on Collections in the menu to the left to see that collection.")); main.append(addParagraph("If you hover the mouse over the collection name, star and some breadcrumbs appear. The star simply allows you to add that collection to your favourites and the breadcrumbs gives you access to the View more actions menu from which you can perform a number of management tasks as seen in figure 29.")); main.append(addImageWithCaption("images/collection.png", "Figure 29 - The collections View more actions menu.")); main.append(addParagraph("One of the available actions here is Add request, which you may find convenient but there are easier ways to add a request to a collection so you may not use it very often. However, it does have the advantage that it adds a request directly to the collection. As far as I can tell, if you create a request in the same way as we did before, clicking on the plus sign in the top menu or pressing control and t, you can then save it to a collection. This is slightly different to what I see in the course video which suggests that perhaps Postman has been updated to make this the more normal method of adding a collection to a request. In any case, when you select the menu item, you are asked to name the request but otherwise, it just asks you to enter the request details as you would when adding a request in one of the other ways.")); main.append(addParagraph("To give me some practice with this, I have added a request and given it the name sample1. I will just create a simple request, so the URL will be")); main.append(addSyntax("http://localhost:3000/api")); main.append(addParagraph("You should also send the request just to make sure you are happy with it and then save it by clicking the save button although Postman does seem to sometimes automatically save it! If it doesn't, the Save button should be enabled and you will be able to save it with control and s.")); main.append(addParagraph("We can use that same View more actions menu to create a folder. Let's say that we want to group all our requests relating to boards together.")); main.append(addParagraph("We will add another request, but this time, we will use the more familiar method of clicking the plus icon and entering the URL as")); main.append(addSyntax("http://localhost:3000/api/boards/")); main.append(addParagraph("Again, we will send it to make sure it is correct and then click Save. Notice that it defaults to the URL as the request name so we will change that to")); main.append(addSyntax("Get boards list")); main.append(addParagraph("It may default to Boards as the save location, but if it doesn't, we can select it in the save dialo/g box and then click the Save button.")); main.append(addParagraph("So, we now have a collection and a folder within that collection and this makes it easier for us to not only save requests so that they can easily be re-run later, but it also helps us to organise the requests so if we do need to re-run a particular request, it's going to be easier to find. In that sense, it is also helpful to give these request meaningful names such as Get boards list.")); main.append(addHeader("Authenticate Requests")); main.append(addParagraph("In addition to being used to orgianise requests, both collections and folders can also contain information controlling the behaviour of the requests. For example, when we send a request like")); main.append(addSyntax("http://localhost:3000/api/boards/")); main.append(addParagraph("We aren't using any authentication and as a result, we only get results that are accessible without authentication. The boards listed in the API are mostly public but there is at least one private board and since authentication is required for that, by sending a request without authentication, we only see the public boards returned.")); main.append(addParagraph("In order to authenticate a request, we will normally send a request that returns an authentication token and we will subsequently use that token to authenticate requests. It's worth noting that in many cases, an API will use a token that, once it has been generated, can be used for all subsequent requests so in that sense, it's a little like a password and we don't need to generate a new one for every request. This applies to our sample API where we generate the token and then use it in subsequent requests where authentication is required and we will demonstrate that by sending a request for a token.")); main.append(addParagraph("To get a token, we have to send our credentials to the API so this means we will need to use the POST method. The request will be routed via auth so the URL is")); main.append(addSyntax("http://localhost:3000/api/auth")); main.append(addParagraph("The credentials will be provided in the request and we will specify them using the JSON format, so we need to click on the Body, select raw and then select JSON from the drop-down menu. The JSON has two attributes, \"username\" with a value of \"demouser\" and \"password\" with a value of \"demopassword\" so that gives us the body as shown below.")); main.append(addInsetCodeListing(["{", " \"username\":\"demouser\",", " \"password\":\"demopassword\"", "}"])); main.append(addParagraph("If we send the request now, we will get a token returned, as shown in figure 30.")); main.append(addImageWithCaption("images/auth_token.png", "Figure 30 - The authentication token.")); main.append(addParagraph("We will save this request to our Postman Sample API and we will name it Authorization so that we can easily access it again if we need to.")); main.append(addParagraph("Now that we have a token, we are going too use it to again request a list of boards so we will run this request again.")); main.append(addSyntax("http://localhost:3000/api/boards/")); main.append(addParagraph("Before we add the authentication token to the request, we will resend it to remind ourselves of what the results we will see without any authorisation and these results are shown in figure 31.")); main.append(addImageWithCaption("images/unauthenticated_request.png", "Figure 31 - The boards list returned when no authentication is used.")); main.append(addParagraph("If you click on the Auth tab in Postman, you will most likely see that the default option is Inherit auth from parent, but there are a number of other options as shown in figure 32.")); main.append(addImageWithCaption("images/auth_options.png", "Figure 32 - The authorization options available when sending a request.")); main.append(addParagraph("At this point, it's worth pointing out that the options shown in figure 32 are those shown when a request is selected, but we would see the same options if we select either a collection or a folder. What this means is that we can set that auth option for a request, a folder or a collection. Since, in this example, the same aithorisation token can be applied to all requests, it makes sense to set this at the collection level so we will do that and the option we want is bearer token. We will click on the collection in Postman, select Bearer Token and copy and paste our token into the Token field as shown in figure 33.")); main.append(addImageWithCaption("images/bearer_token.png", "Figure 32 - The bearer_token option.")); main.append(addParagraph("If we send the request again, we should see that there are now 5 items in our results rather than the 4 that we saw without using any authentication since these should include a board marked as private and this is shown in figure 33.")); main.append(addImageWithCaption("images/authenticated_request.png", "Figure 33 - The boards list returned when the authentication token is used.")); main.append(addParagraph("In addition to the private board being returned, note that we can also see in figure 31 that the authentication type is Inherit auth from parent and we can also see that this request is indeed using the Bearer Token that has been inherited from the collection, Postman Sample API. This is the default option so any future requests, as well as any that may be in the collection already, will use that token.")); main.append(addParagraph("That is, generally, a good thing, but there is one time when we don't want to send that token with the request. That is, when we are requesting a new token using the auth request we created earlier and saved in our collection. As a general rule, we don't want to send credentials if we don't need to so I will call up that request again and set the authentication type to No Auth. This is shown in figure 34.")); main.append(addImageWithCaption("images/no_auth.png", "Figure 34 - The Authorization request showing No Auth as the authentication type.")); main.append(addHeader("Using Request History")); main.append(addParagraph("Figure 35 shows the Postman request history.")); main.append(addImageWithCaption("images/history.png", "Figure 35 - The request history.")); main.append(addParagraph("The request history logs all requests that have been sent so it is easy for us to rerun a previous request. Notice that there is an icon labelled History in the left-hand pane which we can click to call it up. The requests themselves are grouped by day and if you hover over a particular day, you will see a plus sign, a trashcan and some breadcrumbs which allow you to access a context menu as shown in figure 36.")); main.append(addImageWithCaption("images/history1.png", "Figure 35 - The options available for requests from a day.")); main.append(addParagraph("The plus sign can be used to add all of the requests for that day to a collection and the transhcan can be used delete all of the requests for that day. Both of these options, along with a couple of others can be accessed from the context menu.")); main.append(addImageWithCaption("images/history2.png", "Figure 36 - The context menu.")); main.append(addParagraph("These options and the context menu are also available for individual requests so if you hover over one, you will see the same plus sign, trashcan and breadcrumbs.")); main.append(addParagraph("I will now send a couple of requests which will appear in the history and we will then save them to the boards folder in the Postman Sample API collection. We will start with a simple search and we will look for anything in the boards where the word Chapter appears in the name field. The URL we will start with is")); main.append(addSyntax("http://localhost:3000/api/boards/search")); main.append(addParagraph("For this request, we will be passing some parameters over to the API so we need to use the HTTP POST method rather than GET and the parameters will be configured in the request body using the JSON format. As a quick reminder, the JSON will be the filters attribute with an array as the value and that array will hold two attributes and values. These are field with a value of name and value with a value of Chapter. These values are case-sensitive so if we provided a value of chapter, we won't get the same results back. This request and the corresponding results are shown in figure 37.")); main.append(addImageWithCaption("images/request.png", "Figure 37 - A sample request Search: Chapter in name.")); main.append(addParagraph("We can add that request to the boards folder by clicking on the plus sign for that request and I have given it the more descriptive name of Search: Chapter in name. Note that this request has also been added to the request history. I will run another similar request that searches for the term management in the description field and this request, along with the results generated, is shown in figure 38.")); main.append(addImageWithCaption("images/request1.png", "Figure 38 - A sample request Search: management in description.")); main.append(addParagraph("We will switch back to Collections in Postman and we can see these requests under the Boards folder. As with the requests in the request history, we have a context menu for each of the requests in the collection and this is shown in figure 39.")); main.append(addImageWithCaption("images/request2.png", "Figure 39 - A sample request Search: management in description showing the context menu.")); main.append(addParagraph("There are some advantages to having these requests as part of the collection. One, of course, is that it allows us to keep our requests very well organised and we can, if we need to, call up one of these requests at any time in order to create a new request. For example, let's say we want to create a new request that searches for the term Chapter 1 in the name. We can call that request up from the collecion, if it is not already open, modify the search term in the body and send the request.")); main.append(addParagraph("Similarly, if we want to search for the term request in the description, we can call up the Search: management in description request and modify it appropriately. Another method is to select Duplicate froim the requests context menu in the collection. This creates a new request with the same, but with copy tagged on the end and we can select the context menu for the duplicate request to rename it. Note, you can also rename it by using the Save as option in Postman but this will save the new request as, for example, Search: request in description, but it will save it in addition to the duplicate request we already have so rename is a better option.")); main.append(addParagraph("Perhaps more importantly, recall that the default authentication type for requests is Inherit from parent, but this doesn't really mean anything when we initially created these requests because they didn't have a parent. When the request are added to the collection, they will then inherit the autherntication type we set at the collection level including the token that has already been added.")); main.append(addHeader("Document Requests")); main.append(addParagraph("The way in which you organise requests (via workspaces, collections and folders) can tell users quite a lot about the API, but Postman also offers some useful facilities for explicitly documentating our requests.")); main.append(addParagraph("You may have noticed in many of the previous examples that there are description fields and you will see that in many of the images here. For example, figure 7 in chapter 2 shows the params key value editor where you have 3 fields - 1 each for key and value and 1 for description. The description is optional but you can use it to provide some information for the user on that particular parameter.")); main.append(addParagraph("Another example of this can be seen in figure 27 in this chapter. This shows the Create Workspace dialog and there is a filed there where you can type in a summary.")); main.append(addParagraph("You might expect to see a similar facility for Collections. There doesn't seem to be anything when creating a collection, but we can certainly add comments to a collection which we can use as documentation. To start with, either right-click the collection name and select edit or click on the breadcrumbs which will open up the same menu, so again, you would select edit which will bring up the screen shown in figure 40.")); main.append(addImageWithCaption("images/edit_collection.png", "Figure 40 - Editing the Postman Sample API collection - Info.")); main.append(addParagraph("Note the Collection Details panel to the right. There are several icons to the left of this panel from which we can access Documentation, Comments, Changelog (which is a useful form of auto-documentation), Pull Requests, Forks and Info (which is the default selection shown in figure 40). So we can learn a lot about this collection even before we add our own comments.")); main.append(addParagraph("Clicking the Documentation icon brings up the options shown in figure 41.")); main.append(addImageWithCaption("images/edit_collection1.png", "Figure 41 - Editing the Postman Sample API collection - Documentation.")); main.append(addParagraph("Notice that there is a note - \"Make things easier for your teammates with a complete collection description\". If you hover over this, a pencil icon appears which you can click to edit the description as shown in figure 42.")); main.append(addImageWithCaption("images/edit_collection2.png", "Figure 42 - Editing the Postman Sample API collection - Documentation - edit description.")); main.append(addParagraph("We can write our description in plain text or we can use Markdown. I won't cover Markdown here so I will be just using plain text but there are some edit options to make the description look a little better. For example, we can use Bold, Itallics, Strikethrough etc and we can add bullet or numbered lists. We can also select some more advanced options by clicking on the breadcrumbs which allow us to add such things as an image, a link or a code block.")); main.append(addParagraph("In the same way, we can add a description to a folder.")); main.append(addParagraph("If you hover over anything in the collection, that is the collection itself, a folder or an individual request, you can then click the breadcrumbs to open the context menu which can also be opened by right-clicking the item. One of the options on that menu is View Documentation and if you select that, you will see the collection documentation as shown in figure 43.")); main.append(addImageWithCaption("images/collection_documentation.png", "Figure 43 - The documentation for our Postman Sample API collection.")); main.append(addParagraph("Notice that right at the top, we have the name of the collection in large text and this is repeated underneath in a more normal-sized text. The three lines below the large heading is the description I added to the collection - as a matter of interest, the Course Link links to this course on LinkedIn Learning. You can also edit the description for both the collection and the Boards folder here. We also have the individual requests shown here with the body for each and from here, we can add a description for any of these requests. This is added in the same way by hovering over the placeholder text which causes the edit icon to appear and then clicking it. The description here uses more or less the same editor seen in figure 42.")); main.append(addParagraph("It could be argued that the best time to document a request is when you are creating it since that is when you are most likely to have the details of what the request is trying to achieve so you don't have to spend time figuring out what it is doing in order to document it. It is possible to do that, but the process is the same for an existing request so I will demonstrate this using the Authorization request.")); main.append(addParagraph("Call up or open the request and notice that at the top, we have the name of the request and its location which is the collection in this case so it looks like this.")); main.append(addSyntax("Postman Sample Api / Authorization")); main.append(addParagraph("This request isn't stored in a folder, but if it was, we would also see the folder name there. If you hover over that name, you will see the familiar pencil edit icon which you can click to open the editor. The editor has two modes. Build mode is selected by default and allows you to edit the request name and comment mode and this is shown in figure 44.")); main.append(addImageWithCaption("images/comment_mode.png", "Figure 44 - The comment mode when editing a request.")); main.append(addHeader("Provide Examples")); main.append(addParagraph("Examples can provide a useful addition for requests in a collection. You may find it useful to chgeck the Postman documentation under Specifying Examples. Examples are useful because they include both a request and response so they can demonstrate requests that work as examples of how a request should be written or requests that don't work as an example of a potential problem.")); main.append(addParagraph("To demonstrate this, we will add a couple of examples to the Authorization request in our sample collection. Note that we can only add examples to a request if it is in a collection.")); main.append(addParagraph("The easiest way to do that is to send the request and then save the response by clicking on the down arrow next to Save Response and selecting Save as example (as shown in figure 45).")); main.append(addImageWithCaption("images/example.png", "Figure 45 - Save as example.")); main.append(addParagraph("By default, the example has the same name as the request, in this case, Authorization. Since this is a valid request, I have renamed it valid user. To create the second example, I will run the request again, but before I do, I will change the value of the password field from demopassword to demopass. Sending that request generates a 404 response because the authenctication has failed. I will save this reponse as well and rename it to invalid user.")); main.append(addParagraph("The examples can be viewed directly in the collection or you can view the documentation as described in the previous section and this is shown in figure 46.")); main.append(addImageWithCaption("images/example1.png", "Figure 46 - Our examples shown in the documentation.")); main.append(addParagraph("Note that we can only see one example in the documentation but if you click the down arrow next to the name of that example (Valid user), you can then select the other example.")); main.append(addHeader("View Documentation")); main.append(addParagraph("As we saw earlier, you can view the documentation for your collection by right-clicking on the colection name and selecting View Documentation. You can also view the documentation in a web browser. Earlier versions of Postman had a View in Web button which no longer seems to be the case so the process is a little more convoluted.")); main.append(addImageWithCaption("images/view_in_web.png", "Figure 47 - The link to view the documentation in a web browser.")); main.append(addParagraph("Figutr 47 shows the documentation as viewed within Postman. Notice that the mouse is hovering over the name field which causes a link icon to appear which you can select to copy the documentation link. You can then paste this into a browser and this will give you the documentation in a format which is typical for many APIs.")); main.append(addParagraph("We can navigate through the documentation as we would if viewing it from within Postman. This includes our code examples shown in the default fromat which is cURL. There is a language menu at the top of the page and from here, we can select other formats such as JavaScript or node.")); main.append(addHeader("Publish Documentation")); main.append(addParagraph("The dcoumentation in Postman is available to anyone who has access to the collection, but to make it available to the general public, it will have to be published. If you open up the Documentation in Postman or in a web browser, you should see a Publish button in the top right corner. If you click it, it will open up a webpage (this is the case whether you are doing that from Postman or the web view) and from here you can set various options including layout, colours and so on. There is also an option to use a custom domain but that requires a paid Postman account.")); main.append("When done, click the Publish button at the bottom of this page. This will bring up a summary page including the URL and this is shown in figure 48.") main.append(addImageWithCaption("images/publish.png", "Figure 48 - documentation publish summary.")); main.append(addParagraph("Notice the warning in the bottom right corner which is probably due to the fact that our documentation includes an example of the authentication request which includes the returned token. In general, it would be something of a security breach to have valid tokens on display in the documentation. In this case, it's only a token for a sample API and I don't intend to keep this documentation online so I can safely ignore the warning. In a real-world scenario, you would of course want to pay careful attention to such a warning.")); main.append(addParagraph("You can remove your onlne documentation by clicking the Unpublish button. Before I do that, I have opened it in a new tab and this is shown in figure 49.")); main.append(addImageWithCaption("images/publish1.png", "Figure 49 - The published documentation.")); main.append(addParagraph("If you keep the documentation published but then decide to remove it at a later date, you can do that by going back to Postman and following the same steps to publish the documentation again. This brings up the same summary page we saw earlier and you can then click the Unpublish button. If you try to access the online docs again after unpublishing it, you will see a 404 response as shown in figure 50.")); main.append(addImageWithCaption("images/publish2.png", "Figure 50 - The published documentation.")); main.append(addHeader("Challenge: Organize and Document")); main.append(addParagraph("In this challenge, we will practice some of the things we've just learned by performing the following tasks in Postman.")); main.append(addInsetBulletList(["Create a new collection.", "Add a Tickets folder to the new collection and describe it.", "Retrieve a list of tickets and save the requests to the Tickets folder.", "Describe the request.", "View the documentation."])); main.append(addParagraph("I started by opening the collections panel and clicking the + sign to add a new collection. I have called it Postman Sample API 2. I can then right click-on the collection and select Add folder which I can then rename a Tickets.")); main.append(addParagraph("Next, I open the new folder in Postman and click on the Documentation icon in the right-hand pane which you can see in figure 51.")); main.append(addImageWithCaption("images/challenge.png", "Figure 51 - The documentation icon for our folder.")); main.append(addParagraph("Note that the icon has been circled in red. If we click that icon and then hover over the description's placeholder text, we can click the edit icon to call up the same text editor we saw previously when adding descriptions. I have added a simple description here and for good measure, I have added a description to the collection. I also added an authorization request, similar to the one we saw with the previous collection, just in case it is needed and I have generated a token and used it to set the Auth type to Bearer token at the collection level.")); main.append(addParagraph("To create the request, what we want to do is something similar to the request we sent when getting a list of boards, but it is slightly different because in this case, we will use an id for one of the boards in order to get the list of tickets assocaited with it so we start by running that boards request again and grabbing an id.")); main.append(addParagraph("The URL is the same URL that we used to get a list of boards, but we will add the board id to it and then route the request to tickets so the URL becomes")); main.append(addSyntax("http://localhost:3000/api/boards/4af02b20-0e35-11e9-86bb-a1378ad71a65/tickets")); main.append(addParagraph("This request returns 5 items and I have used the Save Response to save this request/response pair as an example which I have named Board id 4af02b20-0e35-11e9-86bb-a1378ad71a65. I also added a description to that request which is similar to the description of it shown here.")); main.append(addParagraph("The final part of the challenge is to view the documentation for this collection. I have opened this in a web browser and published it. Figure 52 shows the first part of the documentation and this includes the descriptions for the collection, the tickets folder and the Get tickets for a board request. We can also see the example request in the right-hand panel along with the start of the response.")); addSidebar("webdev");