Tips & Tricks: Understanding the CIT (customer integration testing) environment

04 December 2015 by Richard Süselbeck

Occasionally there is some confusion about the CIT (customer integration testing) environment. A particularly common mistake is to use the CIT in production. Let's take this opportunity to have a closer look at when and how to use it.

So, when should you use CIT? Simple. Use it when evaluating our products, running tests, making changes in your code or altering the way you access our APIs. In fact, the CIT offers a fully functional environment for development and testing. Note however, that it does not support high loads or performance testing in general. The CIT environment is specifically not intended for general production use, so make sure you deactivate it when your application goes live.

Now that we've covered then "when", let's look at the "how".

When using the HERE REST APIs, you can choose whether or not to use the CIT environment by selecting the correct base URL. If you want to use the CIT, simply add "cit." in front of the "" part of your base URL. When you are ready to go into production, simply remove the "cit." again.

Let's look at an example using the Places API and assume we are in sunny Rio de Janeiro, looking for a library (as one does). While developing, testing or modifying your application you should use the CIT environment, and your request will look like this.

Note the ".cit" in the base URL between "places." and "". Once your application goes into production, you simply remove the ".cit"" from the URL and your request will look like this.

In both cases, the API returns the same result: a list of libraries in central Rio. (This includes the gorgeous Real Gabinete Português de Leitura, which you should totally check out if you are ever in town.)

When using the JavaScript API, you can select the environment you want to use while creating the platform. Simply set the useCIT parameter to true if you want to use the CIT, or to false if you want your application to go into production. Alternatively, you can also omit the useCIT parameter. In this case the platform will default to the production environment.

Once you have set this parameter, all API calls using this platform will be run in the respective environment.

Finally, if you are using, the Android or iOS SDKs, you don't have to do a thing. Everything is handled automatically. Nice !

As always, remember that you need to replace {YOUR_APP_CODE} and {YOUR_APP_ID} with your own credentials in all of these examples. You can go here to sign up and get your credentials.