Supported parameter settings for API authorization

Updated at:

When you grant authorization for an API, you can configure authorization parameters to improve security. This feature ensures that the API ignores any parameter value passed by a caller that differs from the authorized value. This prevents callers from changing parameter values to query data that they are not authorized to access. This topic describes how to configure parameter settings for API authorization.

Procedure

  1. Create an API. For more information, see API development.

  2. In the API Parameter Settings section, set Destination Field to Request Parameter and click Next.

  3. In the API Configuration and Testing section, select the target request parameter, set the Filter During Authorization option to Yes, and then click Next to proceed until the settings are saved.

    image

  4. When granting authorization, configure the parameter value for the authorization object in the Authorization Filter section of the form. The following figure shows an example where the request parameter "id" is set to a static value of 3.

    image

  5. After authorization is granted, when a caller invokes the API, only the data for "id=3" is returned, regardless of the value passed for the "id" request parameter.

    • If the input parameter is "id=1", the API still returns the data for "id=3".

      image

    • If the input parameter is "id=10", the API still returns the data for "id=3".