Point default prod url to different target end point

Hi,

I am using Apigee Edge Start product.

Currently all my API's have two default URLs, one for prod and other for Test.

I just have one target end point which is pointing to my QA environment.

But, I want the default prod URL to point to a different target end point which points to my prod env.

I dont want both the default URLs to point to same taget endpoint, which is my currently pointing to my QA.

Please help me in achieving this.

Thanks,

Kumud

Solved Solved
0 3 306
1 ACCEPTED SOLUTION

Hi Kumud,

you should be able to use the TargetServer feature in Apigee Edge. This allows you to configure target urls in the TargetServer differently for each backend environment (test, prod, etc) .

Depending on which environment a proxy is deployed to, the proxy uses the corresponding TargetServer created in that environment.

More info here: http://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/environments/%7Benv_name%7D...

View solution in original post

3 REPLIES 3

Hi Kumud,

you should be able to use the TargetServer feature in Apigee Edge. This allows you to configure target urls in the TargetServer differently for each backend environment (test, prod, etc) .

Depending on which environment a proxy is deployed to, the proxy uses the corresponding TargetServer created in that environment.

More info here: http://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/environments/%7Benv_name%7D...

Hi @Hansel Miranda,

I followed the docs and added target server in both prod and test with different endpoints.

In my API i added below:

<TargetEndpoint name="default">

<Description/>

<FaultRules/>

<PreFlow name="PreFlow">

<Request/> <Response/>

</PreFlow>

<PostFlow name="PostFlow">

<Request/> <Response/>

</PostFlow>

<Flows/>

<HTTPTargetConnection>

<LoadBalancer>

<Server name="target1"/>

</LoadBalancer>

</HTTPTargetConnection>

</TargetEndpoint>

I deployed my service in test and prod.

But when i call my api using the prod url using postman:

https://{myorg}-{prod}.apigee.net/{base-path}/{resource-path}

it gives me below error:

{ "fault":

{ "faultstring": "The Service is temporarily unavailable",

"detail": { "errorcode": "messaging.adaptors.http.flow.NoActiveTargets" }

}

}

In trace it gives a 503 error code.

What m i doing wrong here.

Not applicable

Hi Kumud,

Kindly do below checks, this will be helpful to resolve the issue.

1. Check whether Target endpoint url is working.

2. Check whether we have added the TargetServers(target1) in EnvironmentConfiguration(prod/test).

3. Check TargetServer (target1) in the 'test' environment pointing to correct test backend service.

4. And check TargetServer (target1) in the 'prod' environment pointing to production backend service.

5. Set the target server as below.

<TargetEndpoint name="default">

<HTTPTargetConnection>

<LoadBalancer>

<Server name="target1"/>

</LoadBalancer>

</HTTPTargetConnection>

</TargetEndpoint>

Thanks,

Kannan