Create the Service
After creating the pipeline and task, add the Service:
- From the Apps menu, open APIM 3.0:
The Services Catalog page opens: - Click Add Service.
The Create Service panel opens:
- Click the Project field and select the Project that contains the Hello World of Services! pipeline and task.
- For the Service name, enter Hello World.
- For the URL slug, enter hello-world.
- For the Service version, enter a value for the first version. For example, 0.1.
- For Tags, enter service-tag and press Enter.
- Click in the Servers field and select a Snaplex.
- In the Description field, enter: This is the Service description. This description displays when you publish the Service and labeling the example in this way helps you identify where each description displays.
- Click Create.
Next, add the Triggered Task.
Add the endpoint
To add the native endpoint:
- Click Add endpoint. The New endpoint panel opens:
- For Endpoint type, leave the default, Triggered, selected.
- Click the Task field and select the Trigger Hello World message task.
- In the Tags field, enter Hello and press
Enter to apply it. Endpoint tags provide a way to group related endpoints.
Endpoints without a tag show up as Ungrouped in the endpoint dropdown list as
shown below.
- Leave the Server overrides field empty because we selected a Snaplex at the Service level.
- Click Create.
Next, add the path.
Add the path
To add the path:
- In the Trigger Hello World message endpoint, click Add
path. The Add new path panel opens:
- In the Description field, enter This is the path description.
- In the Rules Path Value field, enter get-message.
- Click the Methods plus icon. The New method panel opens:
- For Type, click GET.
- For Description, enter This is the method description.
- In the Tags field, enter method-tag and press Enter to apply it.
- Click the Responses plus icon.
- In the Code field, enter 200.
- In the Description field, enter OK. For a real endpoint, we would add more possible responses, including errors.
- Click Create.
- Click Create to finish the method.
- Click Create to finish the path.
To test the Service, we need to apply a Policy with at least one authorization rule. Next, let's create the Policy.