JSON rewrite - merkator-software/GaiaBuilder-manual GitHub Wiki

Transferring content between different Environments, whether these environments are on the same or a different ArcGIS Enterprise installation or ArcGIS Online organization, is a challenging process. GaiaBuilder uses the GaiaBuilder Item Registry to keep track of all ItemID's and URLS in your DTAP. This ensures existing items are updated with the latest JSON configuration and that URL's to the Mapservices point to the right ArcGIS Server.

When possible, GaiaBuilder tries to keep the ItemID of an item or service the same when deploying the Item or Service to a different server.

Update process

The update process consists of four steps:

  1. Update all the rewrite objects from the "rewrites" JSON keyword. This a simple string search and replace. This can be used to replace any text in the items, such as Portal Title, Summary or Description, but it can also be used to update the branding of your Webapp or the title in your dashboard header. Furthermore, it can be used to update the URL's in your webmap or webapp. When registering a new Environment, there is the option to register one or more global rewrite configurations. These rewrite configurations are automatically added to a new content project.
  2. Update the ItemID's, WebmapID's and URL's using the GaiaBuilder Item Registry. The JSON configuration is will be scanned for Item ID's Webmap ID's and URL's and GaiaBuilder will query the GaiaBuilder Item Registry to find a linked target ID or target URL. Make sure to publish your content bottom up, where items or content which have no dependencies are published and registered to GaiaBuilder Item Registry first. Then publish the items or content which have the dependencies. When creating a new content project, the items in the JSON configuration are ordered on the expected dependencies, which means that Webmaps come before Webapps or Dashboards.
  3. Update the ItemID's which from the "itemIdRewrites" JSON list. This a simple string search and replace. The GaiaBuilder Item Registry will be used to find a linked target ID. Make sure the target ItemID's are already present, otherwise the ItemID will not be updated.
  4. Update the hostname and webadaptor path from the source Enviroment to the hostname and webadaptor path of the target Enviroment. This a simple string search and replace. Together with the "itemIdRewrites", it will construct the full URL to the Item in the target Environment. It will update any other old references to the source as well.