The deployed integration for an API flow exposes a single API and its operations, but a
deployed Toolkit integration can expose more than one API (or application) and their associated
operations. To test the deployed integration, you can invoke its API operations.
The following instructions describe how to test the deployed integration for an API flow by
invoking the API, but the steps for testing a Toolkit integration from the Dashboard are
similar.
Procedure
To invoke the API for an API flow, complete the following steps:
- From your App Connect Dashboard instance, click the integration
runtime tile on the Runtimes page.
The API tile is displayed,
with a status of Started.
-
To view the API definition, click the API tile.
On the Documentation tab, the Overview section
displays the type of API, the protocol, and the base URL for the API endpoint. A Download
OpenAPI Document link is also provided for the OpenAPI document that describes the API.
If downloaded, the document is saved as a YAML file to the default download location that is
configured for your browser. The format of this file name is
APIname-version.yaml; for example,
Customer_API-0.0.1.yaml.
From the left pane, you can click each API operation that was configured in the flows for the
imported API to view its details, which you can then use to test the operation. To the right of the
operation's description in the right pane, a tag is provided to identify which model (defined in the
API flow) the operation belongs to.
The following information is displayed for an operation:
- The HTTP request for the operation.
- The header parameters in a collapsible section.
- The body, path, or query parameters with examples, and the schema if relevant, in collapsible
sections. The parameters that you see will depend on the operation's settings.
- Tooling languages that can be used when making the request, and a code sample for calling the
operation in the selected language.
- Response codes for the operation, and the response body schema with an example.
You can also click Definitions in the left pane and expand the sections to
view the schema definition for each of the API's models, and an example with sample values.
- To test any of the API operations, click the operation and then click the Try
it tab.
This example shows how to test the following GET operation to
retrieve the details of a customer contact in
Salesforce by using
a unique contact ID. The
Details tab indicates that a Customer ID is required.
From the Try it tab, specify the ID of an existing Salesforce contact in the CustomerID field.
(Although it is possible to use the Generate link to generate a sample value,
using this value in a test would not yield successful results for a GET operation because the
Customer ID needs to be for an actual Salesforce contact.)
Click Send to invoke the GET operation for the API and then check the
request and the response that are displayed.
For our GET example, the
Response section displays the success code that is returned (200 OK), the
headers, and the contact details that were retrieved from Salesforce for the specified CustomerID value.
- If relevant for the operation, check for the expected results in the target
applications.
For our GET example, we can verify that the details retrieved pertain to a contact that exists in
our Salesforce instance. Notice that the contact ID in the URL for
the Salesforce record is identical to the
CustomerID value that was specified for testing.