If you are assigned the Deployer or Admin role, you can test a
managed API
and its operations.
You can either click
Test Managed API
at the managed API level or test one particular operation directly by clicking
Test Operation
.
On the
API Console
page, click the
Managed APIs
tab.
Click the
Actions
menu on the row of the
managed API
and select
Test Managed API
.
To test an operation of an API, click the API to expand the list of operations for the API, and then click
Test Operation
. You can test an operation of a managed API only when the API is in the
Active
state.
Click
API Policies
Security
.
In the Authentication panel, click
Generate New Token
.
The
Generate New Token
option is be enabled only if the API-level JSON web token is selected.
Optionally, edit the expiration date and time. You can choose a maximum of 180 days for the expiration date.
For more information about using an API-level authentication policy, see
API Policies
.
Click
Operations
and select an operation.
On the
Test
tab, click
Authorize
.
If the
managed API
requires authentication, the
Available authorizations
dialog box appears.
Based on the authentication type, enter the respective details to authenticate the
managed API
:
For basic authentication, enter the IDMC user name and password.
For OAuth 2.0 authentication, enter the
client_id
and
client_secret
.
For JWT authentication, enter the JSON web token value.
For session ID authentication, enter the session ID.
All Data Quality operations must contain a session ID based authentication policy.
For more information about the authentication methods, see
Security policies.
Click
Authorize
.
To view the API request body and response code, click anywhere on the Swagger endpoint.
To test the API, in the request body panel, perform the following steps:
Click
Try it out
.
Enter the parameter values if required.
Edit the request body and replace the example values of request fields with any value of your choice.
To test the
managed API
, click
Execute
.
The server response panel displays the response body and response headers.
To clear the server response, click
Clear
.
To exit the edit mode of the request body, click
Cancel
. The changes done to the request body are retained.
To reset the changes made to the request body, click
Reset
.
To change the request body again, click
Try it Out
.
When you run a managed API endpoint that has response caching configured, the response caching doesn't work if the upstream API response is in compressed format. The
Accept-Encoding
request header typically contains a comma-separated list of encoding formats, such as gzip, br, and deflate. The
Accept-Encoding
request header is added by default in Postman or web browser. To resolve the issue of honoring the response caching, use Postman to disable the
Accept-Encoding
header in your request, and then invoke the API. However, if you invoke the API from a web browser,
Accept-Encoding
is added automatically. As a result, the response caching policy might not be honored.