Publishing the Activities API

To make an API active, you must publish the API by adding the API information to file published-apis.yaml, located in the following directory in the Studio Project window:
  • configuration > config > Integrations > apis
In the base REST API framework, file published-apis.yaml takes the following form:
apis:
- name: gw.pl.framework.api_list-1.0
- name: gw.pl.system.server_tools-1.0
defaultTemplate:
- name: gw.pl.framework.dev_template-1.0
Notice that the file contains two distinct areas:
  • apis - A list of APIs to expose, with each API listing the fully qualified path to its Swagger schema file
  • defaultTemplate - One or more default templates to use with the listed APIs

Although not shown in the file example, it is also possible to publish an API or template to a specific environment or environments. You do this by setting an env environment variable for the affected API or template.

Adding the Activity API to file published-apis.yaml

As file published-apis.yaml exists as part of the Guidewire REST API framework, you need merely to add the Activities API to the file in the correct location. The following code sample adds the fully qualified path to the Activities API schema file to file published-apis.yaml:
apis:
- name: gw.pl.framework.api_list-1.0
- name: gw.pl.system.server_tools-1.0
- name: mc.activityapi.activityAPI-1.0
defaultTemplate:
- name: gw.pl.framework.dev_template-1.0