Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Deployment / URL Creation for an API Proxy

Former Member
0 Likes
1,176
  • SAP Managed Tags

Hello Experts,

I've been trying to implement SAP API Management on one project.

For one of the APIs,

1. I created an API Proxy to be authenticated with API Keys, Checked 'Publish API Product', marked 'Enable Direct Browser Access for Your API'.

2. Build the API.

3. Got an error message 'No environment named "test", so API proxy will not be automatically deployed.'

4. On the Overview page of the API Proxy, deployed it across all the environments.

However, the URLs for these deployments were not generated. it only shows NA under the URL column.

What am I doing wrong here. Any help is appreciated.

Thanks,

Pratik.

1 ACCEPTED SOLUTION
Read only

0 Likes
1,071
  • SAP Managed Tags

Hi Pratik,

You are seeing NA under deployed URLs because during on-boarding -> Creation of Virtual Hosts , You have not provided Virtual Host alias .

Updating the Virtual Hosts created with Alias name would show Urls under deployment .

Steps to update Virtual hosts :

1. Create an file *.xml in management Server system as shown


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<VirtualHost name="Enter Virtual Host Name">

    <HostAliases>

<HostAlias>Give Fully qualified Domain Name1</HostAlias>

    </HostAliases>

    <Interfaces/>

    <Port>Provide Port Details</Port>

</VirtualHost>

2. Update the existing Virtual host 

curl -u <EmailId of Sysadmin/OrgAdmin>:<Password> -X PUT http://localhost:8080/v1/organization/<Org_Name>/environment/<Env_Name>/virtualhosts/<VirtualHostNam...>   -d’@./<*.xml file name> -H "Content-Type:application/xml"


Note: Alias name should be the fully qualified DNS name of the system where Router /Message processor is installed .

Regards,

Suma

5 REPLIES 5
Read only

0 Likes
1,072
  • SAP Managed Tags

Hi Pratik,

You are seeing NA under deployed URLs because during on-boarding -> Creation of Virtual Hosts , You have not provided Virtual Host alias .

Updating the Virtual Hosts created with Alias name would show Urls under deployment .

Steps to update Virtual hosts :

1. Create an file *.xml in management Server system as shown


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<VirtualHost name="Enter Virtual Host Name">

    <HostAliases>

<HostAlias>Give Fully qualified Domain Name1</HostAlias>

    </HostAliases>

    <Interfaces/>

    <Port>Provide Port Details</Port>

</VirtualHost>

2. Update the existing Virtual host 

curl -u <EmailId of Sysadmin/OrgAdmin>:<Password> -X PUT http://localhost:8080/v1/organization/<Org_Name>/environment/<Env_Name>/virtualhosts/<VirtualHostNam...>   -d’@./<*.xml file name> -H "Content-Type:application/xml"


Note: Alias name should be the fully qualified DNS name of the system where Router /Message processor is installed .

Regards,

Suma

Read only

0 Likes
1,071
  • SAP Managed Tags

Hi Suma,

Many Thanks for your reply.

Is there a way to construct the URL somehow using which I can test the Proxy without updating the Virtual host. ?

Regards,

Pratik.

Read only

0 Likes
1,071
  • SAP Managed Tags

Hi Pratik,

Yes , you can test . Below is the Url Format

http://<Give Fully qualified Domain Name>:<port>/Basepath of the proxy

  • Give Fully qualified Domain Name of  -> Fully qualified Domain Name of the system where router component is installed .
  • Port of Virtual host given during onboarding (for eg: 9001)

Regards,

Suma

Read only

0 Likes
1,071
  • SAP Managed Tags

Hi Suma,

I had already tried that.. But it gave me a 404 error.

I'll work on updating the Virtual Host.

Also, the Port number in the URL which hosts api management is different from the port number of the Default Virtual Host as visible in Environment configuration.

I tried with both port numbers.

Regards,

Pratik

Read only

0 Likes
1,071
  • SAP Managed Tags

Hi Pratik,

From your reply this is what I understand. Correct me if am wrong

  • Port number in the URL which hosts api management is different -> You are referring to API management UI

         http://<Management Server IP Address>:<port>/login ... Here by default port is 9000

  • default port of VirtualHosts will be 9001 and if you have selected same then your deployed url should be same as given below :    http://<Give Fully qualified Domain Name>:<port>/Basepath of the proxy

    Can you send me the details

  • Type of Installation
  • details provided during onboarding or snapshot of environment configuration
  • API Management Logon URL

Regards,

Suma