Updated on 2026-06-25 GMT+08:00

Authorizing API Calling

An API that uses app or IAM authentication can be called only after it is authorized.

You can select an authorization method for an API based on the authentication mode configured during API creation. APIs that use app authentication can be authorized using an app. For details, see Authorizing an API Which Uses App Authentication to Apps. APIs that use IAM authentication can be authorized using an app or whitelist. For details about authorization using an IAM app, see Authorizing an API Which Uses IAM Authentication to Apps. For details about authorization using a whitelist, see Authorizing an API Which Uses IAM Authentication Through a Whitelist. If non-API developers want to call APIs, they can contact API developers for authorization or apply for API authorization by themselves. For details about how to apply for API authorization, see Applying for API Authorization.

This section describes how to authorize an API that uses app authentication to an app.

Creating an App

  1. Log in to the DataArts Studio console by following the instructions in Accessing the DataArts Studio Instance Console.
  2. On the DataArts Studio console, locate a workspace and click DataArts DataService.
  3. In the left navigation pane, choose an edition, for example, Exclusive Edition. The Overview page is displayed.
  4. Choose API Calling > Apps.
  5. On the displayed page, click Create. In the displayed Create App dialog box, enter an app name and select an app type.

    • IAM: APIs using IAM authentication can be authorized to apps of this type. The name of an app of the IAM type is fixed at the a Huawei account. Only one such app can be created for each DataArts Studio instance and is visible to all workspaces in the instance.
    • APP: APIs using app authentication can be authorized to apps of this type. You can authorize APIs using different app authentication modes to different apps to improve data security.

    Select APP. APIs using the APP authentication mode can be authorized only to apps of the APP type.

    Figure 1 Creating an app

  6. Click OK.
  7. After the app is created, its name and ID are displayed in the app list.

Authorizing API Calling

  1. Log in to the DataArts Studio console by following the instructions in Accessing the DataArts Studio Instance Console.
  2. On the DataArts Studio console, locate a workspace and click DataArts DataService.
  3. In the left navigation pane, choose an edition, for example, Exclusive to enter the Overview page.
  4. Choose API Development > APIs.
  5. Click More in the Operation column of the created API and select View Authorization. On the Complete Information tab page, click Assign Authorization.
  6. On the Authorize Apps page, set Expires, select a cluster, and select one or more apps. Click OK.

    In this example, select the app you created.
    Figure 2 Authorize Apps

  7. After the application is approved by the review center, the API authorization is successful.

    • If you are a developer, contact the reviewer to review your request. After your request is approved, the API authorization is successful.
    • If you are both a developer and a reviewer, skip this step.
    • If you are a reviewer rather than a developer, go to the Review Center page to review the request.