Spaces are a part of the API Connect syndication feature, which will allow you to subdivide your Catalog into partitions. Of all of the configurations we have covered within this chapter thus far, this is the first optional configuration we will demonstrate. Spaces could be useful if you have different divisions within your organization that you need to segregate within a Catalog.
For example, our sample healthcare organization might be split into two divisions within the company. One for prescription benefit management (PBM), and one for insurance. We might want to segregate these divisions within our Catalogs so that each division will be independent of the others within the Catalog. This independence would include the separation of authorized users, product life cycle, and runtime environment altogether.
Spaces would be the ideal feature to accomplish this because it provides this logical partition from all other spaces within the Catalog as well as a segregated runtime environment. In addition, Spaces will provide its own analytics for each space configured. Keep in mind that this only provides this segregation for development, management, analytics, and runtime, which are all internal. Spaces will not be evident within the Developer Portal to an outside consumer. To the outside consumer who will discover and consume your APIs, they will all appear to be within the same Catalog.
New with v10.0.1.5
There is a new feature to apply Catalog actions to Spaces. You can read more on this capability in the What’s New section: https://www.ibm.com/docs/en/api-connect/10.0.1.x?topic=overview-whats-new-in-latest-release-version-10015
If you decide that your organization will require the use of Spaces, you must configure them at the Catalog level within each individual Catalog configuration.
Configuring your spaces
Here is how we configure the spaces:
- To accomplish this, you will click the Catalog you wish to configure from the Manage catalogs screen. If you are at the Home screen from within the API Manager, you will navigate to Manage catalogs | DEV.
- You will now be on the configuration screen for your Catalog. From here, you will click on the Catalog settings tab at the top of the screen and toggle the Spaces slider to On as shown in Figure 3.13:
Figure 3.13 – Enable Spaces for a Catalog
Once you enable Spaces within a Catalog, you can no longer configure a gateway service for the Catalog. At least one space must be configured and assigned a gateway service. Products and APIs can only be published to a space and not the Catalog itself.
3. You can now begin to configure the individual spaces for your Catalog. While in Catalog configuration, click on the Spaces tab at the top of the screen. By default, you will see one Space listed with the same name as your Catalog. To create a new space, click the Add button in the top-right corner of the screen and then Create space as shown in Figure 3.14:
Figure 3.14 – Create a new Space
4. This will now bring you onto the configuration screen to configure your new space where you will enter the details required. These details should be starting to look familiar to you as they are similar to the ones entered for your Provider Organization and your Catalogs. Like these, you will select the owner for space and provide a title that will then be converted to lower case and used to auto-populate the Name field.
If you wish to invite a new user to be the owner of the space, you will go to the previous screen and click Add | Invite space owner. Once these fields are populated, you can click Create to create your new Space. Figure 3.15 shows the creation of a new space for our healthcare organization with a Title of PBM:
Figure 3.15 – Create a new Space
5. Once you click the Create button, the space is created and you are brought back to the Catalog configuration page. Here, you should see your new space listed and a message at the top right. You can see in Figure 3.16 the new Space we created within the DEV Catalog named PBM:
Figure 3.16 – New Space created
6. Once you have created all of your spaces for your Catalog, you must repeat the process for each Catalog in your Provider Organization that you want to use spaces within. In our fictional healthcare company, we configured two spaces for each Catalog, one for PBM and one for Insurance as we want each division to have its own management, life cycle, analytics, and runtime. When we publish our products and APIs, this isolation is never seen in the Developer Portal. Figure 3.17 shows our DEV Catalog with these two spaces created:
Figure 3.17 – DEV Catalog Spaces
7. If you recall when we configured our Catalogs, you had to add a gateway service but only if you were not planning on utilizing spaces within the Catalog. That is because each space will have its own runtime, or gateway service, configured. To configure the gateway service for each of your spaces, you will click on the space from within the Spaces tab of your Catalog. From here, you will navigate to the Space settings tab and click the Gateway services link on the left navigation menu. From here, you can add a gateway service to the space the same way you would have for a Catalog by clicking Edit, selecting the gateway service to add, and then Save.
The structure of our new organization is now starting to take form. Up to this point, we have defined our Provider Organization, Catalogs, and spaces. We now have the ability to start publishing products and APIs, which we will cover in later chapters.