Updated on 2024-10-23 GMT+08:00

Publishing an API

This section describes how to publish an API to service catalogs.

Scenario

For the sake of security, APIs generated and registered in DataArts DataService must be published to service catalogs before they can provide services.

Procedure

  1. On the DataArts Studio console, locate a workspace and click DataArts DataService.
  1. In the left navigation pane, choose an edition, for example, Exclusive Edition. The Overview page is displayed.
  2. In the navigation pane, choose API Development > APIs. Locate an API, click More in the Operation column, and select Publish.
  3. In the displayed dialog box, you can click More to view details.
    Figure 1 Publish
    • In DataArts DataService Exclusive, the API is published to a DataArts DataService Exclusive cluster by default. After the API is published, it can be called through the intranet. Only the APIs published to a DataArts DataService Exclusive cluster can be called for an unlimited number of times. Otherwise, an API can be called 1,000 times at most every day.
      You can also click More and select an APIG Exclusive or ROMA Connect instance to publish the API to.
      • APIG Exclusive: To publish an API to APIG Exclusive, you must buy an APIG instance on the APIG console in advance. After the instance is created, a default API group is available. The system automatically assigns a debugging domain name for internal tests to the API group. This debugging domain name is unique and cannot be changed, and it can be accessed for a maximum of 1,000 times each day. If you want to create an API group exclusively for DataArts DataService APIs, see Creating an API Group. In addition, you can bind one or more independent domain names to an API group. For details, see Binding a Domain Name. The domain names can be used to call APIs for more than 1,000 times each day.
      • ROMA Connect instance: To publish an API to a ROMA Connect instance, you must create a ROMA Connect instance and an API group on the ROMA Connect console in advance. For details, see Creating an API Group. The system automatically allocates a subdomain name to the API group for internal testing. The subdomain name can be accessed for a maximum of 1,000 times each day. You can also bind independent domain names to the API group so that they can be used to call your published APIs. For details, see Binding Domain Names.
  4. APIs must be reviewed and approved before they can be published. APIs are reviewed in the following way:
    • An API publisher who does not have the reviewer permission must submit the API to the reviewer for review.
    • An API publisher who has the reviewer permission can publish an API without review or approval.

    An API submitted by a non-reviewer is published after it is approved by the reviewer.

    The data connection of an API in the pending review state cannot be changed. It can be changed only when the application is rejected by a user with the workspace administrator role.

    An admin, developer, or operator can be a reviewer. A viewer cannot be a reviewer.

    Regardless of whether they are added as reviewers, users with the admin role of the workspace have the reviewer permissions by default.

  5. After the API is published, you can go to the Service Catalogs page to view the API information.

Related Operations

Publishing APIs in batches: On the APIs page, select APIs, click Batch Operation above the list, and select Publish.

Figure 2 Batch Operation