API Portal 7.5.4 Cloud User Guide Test an API You can expand and test API methods listed on the API details page. The required steps depend on whether the API expects authentication or not. This information is shown above the method list. Test an unsecured API Test a secured API Test an unsecured API If an API does not require authentication, testing the methods is very straightforward. Click on the method you want to test. Fill in any values the method requires and select the content type you want. Click Try it out!. The details of the response are shown below the method description. Test a secured API An API exposed in the API Catalog can have the following authorization methods configured in API Manager: API Key authorization OAuth HTTP Basic authentication Invoke Policy You can test any of the configured authorization methods when testing a method. Testing OAuth authentication requires an OAuth access token, see Request an OAuth access token. Note For Invoke Policy, the option to select credentials is not available, but the description of the API is displayed. Click on the method you want to test. To use the same authorization method for all methods, select Use same credential for all methods. Unselect this option, if you want to choose the authorization method separately when testing each method. Select the key or token you want to use for the authorization. Fill in any values the method requires and select the content type you want. Click Try it out!. API Gateway acts as an authentication and authorization server, and authorizes API Portal to access the API. API Portal returns a formatted result set. If an error occurs, API Portal returns the error status code and error reason details. Request an OAuth access token If the API requires OAuth authentication, you must request an access token before trying the API: Click on the method you want to test. Ensure the authorization method is OAuth, and select OAuth client credentials from the drop-down list. Click on the Request token link. Select the permissions for API Portal, and click Authorize. The authorization token is displayed as shown below: To discard the authorization token and get a new one, click the Discard token link and repeat the procedure. After you select the authorization type, expand a method and click Try it out! to test it. For additional information about OAuth (OAuth 2.0) deleted access configuration and usage, see the API Gateway OAuth User Guide. Related topics API Catalog View API details Download an API Monitoring Related Links
Test an API You can expand and test API methods listed on the API details page. The required steps depend on whether the API expects authentication or not. This information is shown above the method list. Test an unsecured API Test a secured API Test an unsecured API If an API does not require authentication, testing the methods is very straightforward. Click on the method you want to test. Fill in any values the method requires and select the content type you want. Click Try it out!. The details of the response are shown below the method description. Test a secured API An API exposed in the API Catalog can have the following authorization methods configured in API Manager: API Key authorization OAuth HTTP Basic authentication Invoke Policy You can test any of the configured authorization methods when testing a method. Testing OAuth authentication requires an OAuth access token, see Request an OAuth access token. Note For Invoke Policy, the option to select credentials is not available, but the description of the API is displayed. Click on the method you want to test. To use the same authorization method for all methods, select Use same credential for all methods. Unselect this option, if you want to choose the authorization method separately when testing each method. Select the key or token you want to use for the authorization. Fill in any values the method requires and select the content type you want. Click Try it out!. API Gateway acts as an authentication and authorization server, and authorizes API Portal to access the API. API Portal returns a formatted result set. If an error occurs, API Portal returns the error status code and error reason details. Request an OAuth access token If the API requires OAuth authentication, you must request an access token before trying the API: Click on the method you want to test. Ensure the authorization method is OAuth, and select OAuth client credentials from the drop-down list. Click on the Request token link. Select the permissions for API Portal, and click Authorize. The authorization token is displayed as shown below: To discard the authorization token and get a new one, click the Discard token link and repeat the procedure. After you select the authorization type, expand a method and click Try it out! to test it. For additional information about OAuth (OAuth 2.0) deleted access configuration and usage, see the API Gateway OAuth User Guide. Related topics API Catalog View API details Download an API Monitoring