Attach or detach authorization objects

更新时间:
复制 MD 格式

Only authorized subscriber applications can invoke an API. On the Authorization Objects tab of the API details page, you can attach authorization objects, detach them, and limit the number of times an application can access the API.

Attach an authorization object

  1. Go to API Publish > API Management. Find the API and click its name to open the details page.

  2. On the Authorization Objects tab, click Attach Authorization Object to open the Add Authorized Application window.

    • Search the list for subscriber applications that are already added as authorization objects.

    • If a subscriber application has not been added as an authorization object, you must first create one. For more information, see Create an authorization object.

  3. From the list of authorization objects, select the object to authorize and click OK.

Detach an authorization object

On the Authorization Objects tab of the API details page, find the authorization object that you want to detach. In the Actions column, click Detach and confirm the action.

Configure rate limiting

You can set a rate limit for applications attached to an API. A rate limit specifies the number of times per second an application can access the API.

  1. On the Authorization Objects tab of the API details page, find the authorization object that you want to rate-limit. In the Actions column, click Configure Rate Limit.

  2. In the window that appears, configure the rate limit and click OK.

    • Rate Limit: Set the switch to On.

    • Rate Limit Threshold: Required. The maximum number of times per second that the application can access the API. Enter a positive integer greater than 0.

    • Abnormal Response Type: Required. Valid values are Return Data and Return Gateway Response Code.