Getting body parameter formats for ION API-based IDOs

In cases where you are using an ION API that uses a <body> parameter (such as an announcement endpoint), you must obtain and format that body parameter's template, in order for it to work correctly with a Mongoose form.

This template must be obtained from the swagger documentation for the endpoint and must be in JSON format.

  1. In ION API, locate and copy the JSON-formatted body template.
  2. Paste the text into a text editor.
  3. Modify the JSON code of the template to align the value part of each name/value pair with the corresponding IDO properties selected by the user.
    For example, suppose you have these output parameters (among others) defined for the IDO:
    • AnnouncementType
    • Title
    • Description
    • AnnouncementStartDisplayDate
    • AnnouncementEndDisplayDate
    • AnnouncementGuid

    When you obtain the JSON code for the body template, it has this format:

    { 
       "AnnouncementType":1,
       "Title": "string", 
       "Description": "string",
       "AnnouncementStartDisplayDate": "string",
       "AnnouncementEndDisplayDate": "string",
       "AnnouncementGuid": "string"
    } 

    You must then modify this code to align the output parameter values with the names, like this:

    { 
       "AnnouncementType": "AnnouncementType",
       "Title": "Title", 
       "Description": "Description",
       "AnnouncementStartDisplayDate": "AnnouncementStartDisplayDate",
       "AnnouncementEndDisplayDate": "AnnouncementEndDisplayDate",
       "AnnouncementGuid": "AnnouncementGuid"
    } 
  4. Copy the modified JSON code.
  5. Paste the modified JSON code into the appropriate Value field in the wizard.

When the form that uses this code is run, the form calls and uses the JSON template to generate the necessary body of the parameter.