Updated on 2024-08-30 GMT+08:00

Applying for API Authorization

If you are an API developer and want to call an API which uses app or IAM authentication, you must apply for API authorization.

If you have authorized apps to use the API by following the instructions in Authorizing an API Which Uses App Authentication to Apps, Authorizing an API Which Uses IAM Authentication to Apps, or Authorizing an API Which Uses IAM Authentication Through a Whitelist, skip this section.

Notes and Constraints

  • In DataArts DataService Exclusive, APIs which use IAM authentication must be authorized through apps or whitelists so that they can be called.
  • You can only authorize an API through an app rather than a whitelist.
  • APIs using the app authentication can be authorized only to apps of the APP type.
  • APIs using the IAM authentication can be authorized only to apps of the IAM type.

Authorizing an API to Apps

An API that uses app or IAM authentication can be called only after it is authorized. Authorization can be performed by an API developer or an API caller. This section uses the latter as an example.

  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. Choose API Calling > Service Catalogs to view all the published APIs.
  3. Click the name of the API you want to bind to an app.
  4. On the page displayed, click Permission Application.
  5. On the displayed page, set the expiration time, select an app, and click OK.

    If Parameter Location was set to Static for an input parameter during API creation, you must also set a static parameter value. If no value is set for the static parameter, the default value of the API input parameter will be used when the API is called using an SDK, and an error will be reported indicating that the static parameter value is missing when the API is called using a tool.

    Figure 1 Applying for permissions

  6. The authorization takes effect after the submitted request is approved in the review center.
  7. After the authorization is complete, view the bound APIs on the app details page.
    • In the API list, if you no longer access an API through the app, click Unbind in the Operation column.
    • To test an API to which the app is bound, choose More > Debug in the Operation column
    • To extend the authorization period for the bound API, click Renew.