def add_comment(rest_client, incident_id, comment):
    """
    api call to add a comment to an incident
    :param rest_client:
    :param incident_id:
    :param comment:
    :return: json formatted response
    """
    url = "/incidents/{}/comments".format(incident_id)
    payload = {
        "text": {
            "format": "text",
            "content": comment
        }
    }

    return rest_client.post(url, payload)