Configure a Library Alias URL for a Server Application Programming Server Library - Cloud - Author-it

Development Documentation

When you use the ApiLogin method to authenticate to a library, the Server Application Programming Server determines the library to log in to by parsing the host name of the API URL. The Server Application Programming Server reads the beginning of the host name, up to the first period, as the library alias. The alias must match the value of the Alias attribute of a Library element in the APIServer.config file for the installation of the API Server Internet Information Services. For example, if the library alias is MyAitLibrary, then values that will work with the ApiLogin method for the API URL include the following.

  • http://myaitlibrary.authoritapiserver.local/
  • https://myaitlibrary.authoritapiserver.local/
  • http://myaitlibrary.authoritapiserver.local/authoritapi/
  • https://myaitlibrary.authoritapiserver.local/authoritapi/
  • http://myaitlibrary.example.com/
  • https://myaitlibrary.example.com/
  • http://myaitlibrary.example.com/authoritapi/
  • https://myaitlibrary.example.com/authoritapi/

The actual URL does not matter as long as the library alias is the first part of the host name and the URL points to the API Server Internet Information Services installation. To configure the library alias URL you can either configure your DNS server with alias entries with the URL values to point to the API Server Internet Information Services installation.

If you are developing locally, you can edit the hosts file in the C:\Windows\System32\drivers\etc folder on your local machine. The example below show entries in the hosts file that point to API Server Internet Information Services installations on the local computer that support all of the examples in the list above.

127.0.0.1 mylibrary.authoritapiserver.local

127.0.0.1 mylibrary.example.com

You can also add entries that point to IP addresses for servers other than on your local machine (for example, a centralized development server).

Note: Adding entries to the hosts file on your computer enables name resolution for the specified hosts only on your computer. This is useful for local development, but requires that each computer that requires the resolution have the entries configured in each computer's hosts file.