- Viewing Interactions
- Creating Interactions
- Editing Interactions
- Parameter, Body and Response types
When you are editing an API, Interactions are shown at the top of the menu on the left.
Internally the API Designer builds a grammatical definition of each interaction. Interactions are a grammatical description of HTTP methods represented in JSON.
Interactions contain definitions for URL Parameters, the message Body, and message Response. Parameter, body and response definitions contain various Member object definitions.
Viewing Interactions [top]
- Open the API you want to view an Interaction for.
- Click on Interactions to view a list of all interactions.
- Click on the Interaction you want to view.
This screenshot shows what it looks like to view an interaction in the designer:
- Click Interactions to show/hide the list of interactions.
- List of Interactions.
- The Interaction you are editing is highlighted.
- Click the + sign to create a new Interaction.
- HTTP method type, and Path.
- URI Parameters for the interaction — in this case only one.
- Body Members for the Interaction.
- Response for the interaction — in this case it is a Resource.
- JSON structure for the interaction.
Creating Interactions [top]
- Open the API you want to create an Interaction for.
- Click on Interactions, then click the Add New button.
Note: Alternatively you can click the + sign to the right of Resources
This screenshot shows what it looks like to create a resource in the designer:
- The new Interaction will not show in the list until after it is saved.
- Choose the HTTP Method type for the Interaction.
- Enter a Path, Title and (optional) Description for the Interaction.
- Choose the Body Type for the Message.
- Choose the Body Type for the Response.
- Click the + Add Member button to add a member variable for message or response.
- Save or Cancel changes.
Editing Interactions [top]
- Open the API you want to view a Interaction for.
- Click on Interactions to view a list of all resources.
- Click on the Interaction you want to edit.
- Click the Edit button.
This screenshot shows what it looks like to edit an Interaction in the designer:
- The Resource being edited will be highlighted in the list.
- Modify the Method, Path, Title and (optional) Description for the Interaction.
- Modify the Parameters, and Body of the message.
- Modify the Body of the response.
- Edit existing members, or click the + Add Member button to add a member variable .
Note: Changing the Response from resource to structured body will enable “add member”
- Save/Cancel changes or Delete the Resource.
Data types for Parameters and Body [top]
The allowed data types for Member objects within Interactions are as follows:
- URL Parameters:
- Can use primitive members: string, numeric, datetime or boolean
- Are optional or required
- Cannot be Tables (arrays)
- Message Body: Two types are defined Resource and Structured Body
- Contains a single Resource, which can be an array
- Are optional or required
- Structured Body:
- Can contain one or more members
- Members can be primitives: string, numeric, datetime or boolean
- Members can be resources
- Members are optional or required
- Members can be Tables (arrays) of primitive or resource types
- Message Response: Uses the same data types as the Message Body