Creating and editing Interactions

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 basically 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]

  1. Open the API you want to view an Interaction for.
  2. Click on Interactions to view a list of all interactions.
  3. Click on the Interaction you want to view.

This screenshot shows what it looks like to view an interaction in the designer:

  1. Click Interactions to show/hide the list of interactions.
  2. List of Interactions.
  3. The Interaction you are editing is highlighted.
  4. Click the + sign to create a new Interaction.
  5. HTTP method type, and Path.
  6. URI Parameters for the interaction — in this case only one.
  7. Body Members for the Interaction.
  8. Response for the interaction — in this case it is a Resource.
  9. JSON structure for the interaction.

Creating Interactions [top]

  1. Open the API you want to create an Interaction for.
  2. 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:

  1. The new Interaction will not show in the list until after it is saved.
  2. Choose the HTTP Method type for the Interaction.
  3. Enter a Path, Title and (optional) Description for the Interaction.
  4. Choose the Body Type for the Message.
  5. Choose the Body Type for the Response.
  6. Click the + Add Member button to add a member variable for message or response.
  7. Save or Cancel changes.

Editing Interactions [top]

  1. Open the API you want to view a Interaction for.
  2. Click on Interactions to view a list of all resources.
  3. Click on the Interaction you want to edit.
  4. Click the Edit button.

This screenshot shows what it looks like to edit an Interaction in the designer:

  1. The Resource being edited will be highlighted in the list.
  2. Modify the Method, Path, Title and (optional) Description for the Interaction.
  3. Modify the Parameters, and Body of the message.
  4. Modify the Body of the response.
  5. 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”
  6. 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
    • Resource:
      • 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

Leave A Comment?