Channel - API

API scanner polls the API configured in channel definition, converts the resulted JSON to SmartOps JSON based on the mapping and will place it in SmartOps queue.

  1. The Create New Channel window displays the API configurations related blocks as shown in FigureFigure.

  2. Define the configurations as explained in the table below:

    Field

    Description

    Request Type

    Type of request. Available values are:

    • GET

    • POST

    URL

    URL for the API request.

    Auth Method

    Authentication Method: Available values are:

    Basic: Access based on user authentication.

    No Auth: No authentication required.

    Username

    E-mail Id of the user.

    Password

    Password for user authentication.

    Header Params

    Key

    Header parameter to be passed, if required.

    Value

    Value of the header parameter.

    Json Request

    Request Json

    Request to be posted for POST requests.

    Polling Schedule

    Schedule

    Define the polling schedule. Schedule can be defined as a Cron expression or duration (milliseconds)

    Json Mapping - Shift

    Key

    Value available in Input JSON.

    Value

    Value to be mapped in SmartOps.

    Json Mapping - Default

    Key

    Field to be passed to SmartOps that is not available in input.

    Value

    Name / Value for the field.

  3. To save the configurations, click Save & Configure. An example of screen configuration is as shown in FigureFigure:


Note: In most of the cases the resulting JSON can be an array. If the JSON is an array while specifying the JSON key ‘*’ symbol should be added after the array field name to mark that as an array.
A sample array mapping is shown in FigureFigure.

Feedback

Copyright © 2021 UST Global. All Rights Reserved.