import json
import requests


def getProcedures(host, service):
    """
    Get all the procedures (stations) using the WA-REST API
    """

    proc_url = f"http://{host}/istsos/wa/istsos/services/{service}/procedures/operations/getlist"

    # Request and Get the procedures from the response
    procedures = json.loads(requests.get(proc_url).text)['data']

    return procedures