# Force Https redirection

Enable 'http' to 'https' redirection.

# HTTP Request:

GET https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/ssl/force-https

# Curl Request example:

curl --request GET \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/ssl/force-https" \
  --header 'content-type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>'

# Response:

# Force Http to Https Redirection

  • 200 (Ok)
{
  "message": "http to https redirection is now enabled!"
}

# SSL Install Check

  • 500 (Internal Server Error)
{
    "message": "Application does not have SSL Certificate installed!"
}

# Already Enabled Http to Https

  • 500 (Internal Server Error)
{
    "message": "Already enabled http to https redirection!"
}

# Organization Not Found

  • 404 (Not Found)
{
    "message": "Organization not found!"
}

# Application Not Found

  • 404 (Not Found)
{
    "message": "Application not found!"
}

# Server Not Found

  • 404 (Not Found)
{
    "message": "Server not found!"
}

# Server Error

  • 500 (Internal Server Error)
{
    "message": "Something went really wrong!"
}
Last Updated: 3/1/2023, 1:57:58 PM