You can associate a function with an API and use the function as a prefilter or a post-filter for the API only after you publish the function. This way, the function can process the request parameters or responses of the API. This topic describes how to publish a function on the DataService Studio page.
Publish a function
- Go to the DataService Studio page.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- In the top navigation bar, select the region in which the workspace that you want to manage resides. Find the workspace and click DataService Studio in the Actions column.
- In the left-side navigation pane of the Service Development page, find the function that you want to publish and double-click the name of the function.
- On the configuration tab of the function, click Submit in the upper-right corner.
- In the right-side navigation pane of the configuration tab, click Version. On the Version tab, find the version that is in the Can Be Published state and click Publish in the Actions column.
- After the function is published, click Version in the right-side navigation pane of the configuration tab to view the publishing record. You can also click Version Details or Roll Back in the Actions column.