This topic describes how to create, add, view, and remove tags for an API.

Background information

DataService Studio allows you to add tags to APIs when you manage workflows and create, register, and publish APIs. This topic uses the scenario of creating an API in the codeless UI as an example. Tags allow you to efficiently classify and search for APIs. You can maintain only one tag list in a workspace, and cannot use the tag list of a workspace in another workspace.
Note
  • Each API supports zero to five tags. You can add no tags to an API at all or add up to five tags to an API.
  • A tag can be up to 20 characters in length and can contain letters, digits, and underscores (_).

Create a tag for an API

  1. Go to the DataService Studio page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region where the target workspace resides. Find the target workspace and click DataService Studio in the Actions column.
  2. On the Service Development tab, move the pointer over Create icon and choose API > Generate API.
  3. In the Generate API dialog box, set the API mode parameter to Wizard Mode and enter a tag in the Label field.
    If the tag you entered does not exist in the workspace, Add <Tag> appears in the drop-down list. Click Add <Tag> to create the tag for the API.Add tag button
  4. Set other parameters and click OK. The tag is created for the API, and appears in the tag list of the current workspace. For more information about other parameters in the Generate API dialog box, see Create an API in the codeless UI.

Add an existing tag to an API

  1. On the Service Development tab, move the pointer over Create icon and choose API > Generate API.
  2. In the Generate API dialog box, set the API mode parameter to Wizard Mode and click a blank area or the downward arrow in the Label field. Tags in the current workspace appear in a drop-down list.
  3. Click the required tag, set other parameters, and then click OK. The tag is added to the API. For more information about other parameters in the Generate API dialog box, see Create an API in the codeless UI.

View tags of an API

  1. On the Service Development tab, double-click the target API in the API list.
  2. In the right-side navigation pane, click Properties.
  3. View the tags of the API in the Label column.
    Note You can also create, add, and remove tags for the API in the Properties pane.

    If an API is published, you can also perform the following steps to view the tags of the API:

    1. In DataService Studio, click Service Management in the upper-right corner.
    2. Click Manage APIs in the left-side navigation pane. On the page that appears, click the APIs of Published tab and click the target API. The API Details page appears.
    3. View the tags of the API under Label in the API Basic Information section.

Remove a tag from an API

  1. On the Service Development tab, double-click the target API in the API list.
  2. In the right-side navigation pane, click Properties.
  3. View the tags of the API in the Label column.
  4. Click Delete icon next to the tag to remove.
  5. On the configuration tab of the API, click Save icon in the toolbar.
  6. Click Publish in the upper-right corner. The tag is removed from the API.

Search for APIs by tag

  1. On the Service Development tab, click Service Management in the upper-right corner.
  2. Click Manage APIs in the left-side navigation pane. On the page that appears, click the APIs of Published tab and view the tags of each API in the Label column.
    If an API has multiple tags and some of them are hidden, click ... to show all the tags.
  3. On the APIs of Published tab, click Advanced Search.
  4. Enter a tag in the Label field to search for all APIs associated with the tag.
    Note You can search for APIs based on multiple tags.