Unable to execute api from api explorer due to certicate error

book

Article ID: 145132

calendar_today

Updated On:

Products

CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

When running an api created in the Api Gateway from the API Portal, using  API explorer  to do  a post , we get the following error:
 "Error occurred submitting request to service endpoint: Certificate for <xxx.xxx.xxx.xxx> doesn't match common name of the certificate subject: "gw-hostname"

The link used to acces the api looks like :
https://xxx.xxx.xxx.xxx:port/testapi

Cause

The problem is that the endpoint is called with the ip address and not with the host name specified in the certificate.
This link with the ip address is filled in in the api explorer and can not be changed in the UI .

Environment

Release : 9.x 

Component : API GTW 

Resolution

The API  explorer needs to access the gateway by name otherwise the certificate can not be matched against the CN and is considered invalid .
This ip address is defined in the api definition when creating the api in API portal and is defined in the wadl file which is used for creating the API .
check the wadl file and make sure to specify the fqdn name in url specification