Forum Discussion

k_auerbach's avatar
8 years ago

API call from stage to production environment

Hi,

is it possible to make an API call from stage environment to production environment, e.g. to get specific settings from a user, who only exists in the production environment?

 

<#assign userProfiles=restadmin("/users/id/45993/profiles?restapi.response_style=json") />

If I change the 'url' to the specific url from production environment e.g.: http://www.example-domain.../users/id/45993... it fails because it automatically uses the domain of the current (stage) environment. 

  • No, the "rest" FreeMarker context object can only be used to query the current environment.

    Also, don't see a use case to query production from stage, you should create a similar user on stage and query that one instead.

2 Replies