SD-WAN

 View Only
last person joined: 4 days ago 

Ask questions and share experiences with SD-WAN and Session Smart Router (formerly 128T).
  • 1.  AWS Conductor API

    Posted 10-26-2022 11:33
    Hello, 
    We're working to access the Conductor's API and are having some difficulties connecting. The Conductor is hosted in AWS. Can the API be accessed from the public facing IP, or is there something particular with AWS?

    Thanks
    Ken

    ------------------------------
    Ken Pobst
    ------------------------------


  • 2.  RE: AWS Conductor API

     
    Posted 11-15-2022 11:23
    Hi,

    Yes, the Conductor API is exposed in the same way as you access Conductor GUI.
    For example if you access your Conductor GUI via AWS public IP:  https://1.2.3.4 , the API should be accessible similarly using https://1.2.3.4/api/v1/...
    Please note that you will need to authenticate before you can call any API. 

    You can use the Swagger examples as well:
    https://1.2.3.4/api/v1/router
     
    Here is a sample of my Ansible code that I use for API calls:

    - name: Authenticate with the Conductor
    uri:
    url: https://{{ t128_conductor_ip }}:{{ t128_conductor_port }}/api/v1/login
    method: POST
    body: "{\"username\": \"{{ t128_conductor_user }}\",\"password\": \"{{ t128_conductor_pass }}\"}"
    body_format: json
    validate_certs: no
    register: web_auth
    until: web_auth.status == 200
    retries: 3
    delay: 3

    - name: Get current config
    uri:
    url: https://{{ t128_conductor_ip }}:{{ t128_conductor_port }}/api/v1/config/getJSON?source=running
    method: GET
    headers:
    Authorization: "Bearer {{ web_auth.json.token }}"
    validate_certs: no
    register: config_running
    until: web_auth.status == 200
    retries: 3
    delay: 3

    Hope it helps.

    Regards,
    Ivan

    ------------------------------
    Ivan Stanev
    ------------------------------