This topic describes how to authorize access to an API, view the APIs that you are authorized to access, and view the APIs that you authorize others to access.

Prerequisites

You can unpublish, authorize access to, or change the protocols of APIs only after the APIs are published. For more information, see Publish an API.

Go to the Manage APIs page

  1. Log on to the DataWorks console.
  2. In the left-side navigation pane, click Workspaces.
  3. After you select the region where the required workspace resides, find the workspace and click DataService Studio.
  4. Click Service Management in the upper-right corner. The APIs of Published tab of the Manage APIs page appears.
    Service Management

Authorize access to an API

  1. On the APIs of Published tab, find the required API and click Authorize.
  2. In the API Authorization dialog box, set the parameters as required.
    API Authorization
    Parameter Description
    API Name The name of the API to which you want to authorize access. You cannot change the value.
    Tenant Account ID The ID of the Alibaba Cloud account to which you want to grant the permissions to call the API. You can go to the Account Management page to view the account ID.
    Authorized Workspace The name of the workspace to which you want to grant the permissions to call the API. You can select a workspace under the current Alibaba Cloud account from the drop-down list.
    Validity Period The validity period of the permissions to call the API. Valid values: Limited and Unlimited.
    • Limited: specifies that the authorized user has the permissions to call the API before the specified expiration date.
    • Unlimited: specifies that the authorized user can permanently call the API.
  3. Click OK.
    On the APIs of Published tab, you can also perform the following operations:
    • Find the required API and click Unpublish. In the Unpublish API message, click OK to unpublish the API.
      Note
      • If you unpublish or delete an API after you authorize a workspace to access the API, the API can no longer be called by the workspace.
      • If you publish an API again after you unpublish or modify the API, you must authorize access to the API again.
    • Find the required API and click Test to test the API on the Test APIs page. For more information, see Test an API.
    • Find the required API, move the pointer over More and select Change Protocol. In the Change Protocol dialog box, change the protocol used by the API and click OK.
      Note
      • If you deselect a protocol, the API can no longer be called by using this protocol. Use caution when you perform this operation.
      • The protocol change takes effect in real time.

View the APIs that you are authorized to access

On the Manage APIs page, click the Authorized to Use tab to view the APIs that you are authorized to access.

You can perform the following operations on the APIs that you are authorized to access:
  • Find the required API and click Test to test the API on the Test APIs page. For more information, see Test an API.
  • Find the required API and click Delete. In the Delete authorized message, click OK to remove your permissions on the API.

View the APIs that you authorize others to access

On the Manage APIs page, click the Authorize Others to Use tab to view the APIs that you authorize others to access.

You can perform the following operations on the APIs that you authorize others to access:
  • Find the required API and click Test to test the API on the Test APIs page. For more information, see Test an API.
  • Find the required API and click Manage. In the Authorization dialog box, revoke or modify the permissions of a workspace on the API.