Unable to execute Alpine API when SSL is enabled on python notebooks

Unable to execute Alpine API when SSL is enabled on python notebooks

book

Article ID: KB0074776

calendar_today

Updated On:

Products Versions
Spotfire Data Science Team Studio 6.5.0

Description

Alpine API fails to execute when SSL is enabled on python notebooks with the error below: 

 
<html>\r\n<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>\r\n<body bg color="white">\r\n<center >
<h1>400 Bad Request</h1></center>\r\n<center>The plain HTTP request was sent to HTTPS port</center>\r\n</body>\r\n</html> 

Issue/Introduction

Alpine API fails to execute when SSL is enabled on python notebooks

Environment

Operating system: Linux

Resolution

By default the Alpine API uses http port and the parameter is_secure is set to 'false'. Change the parameter is_secure to 'true' as shown below: 

==================================
import alpine as AlpineAPI
session = AlpineAPI.APIClient(host="
xxx.com", port=443, is_secure=True)
session.base_url = 'https:xxx.com:443/api'
====================================

Additional Information

Refer to the documentation to learn more about the Alpine API.