content JSON configuration - merkator-software/GaiaBuilder-manual GitHub Wiki
Content deploy configuration
The Content deploy configuration file contains the instructions for GaiaBuilder on how to deploy the items to your Portal DTAP Environments. You can modify this file to change how your items are deployed
The example below has been generated with a Webmap, Web Mapping Application and Dashboard
- The first section up to "content_status" contains the global settings applied to all items and environments.
- The second section "items" contains the input items
- The third section "servers" contains the servers or DTAP environment specific settings. A full DTAP is configured in this example
{
"action": "deployContent",
"sourcePortal": "https://dev.yourportal.com/portal/",
"sourceGroup": "",
"portalLogo": null,
"portalFolder": "",
"protected": "false",
"content_status": "",
"overwrite_existing" , "true",
"items": [
{
"itemId": "175fdaff23334223a1f4b00c2e04073a",
"descriptionjson": "175fdaff23334223a1f4b00c2e04073a.json",
"datajson": "175fdaff23334223a1f4b00c2e04073a.data.json",
"portalLogo": "175fdaff23334223a1f4b00c2e04073a.ago_downloaded.png",
"rewrites": {
"server": "https://dev.yourportal.com/server/rest/services/"
},
"sourceUrl": "https://dev.yourportal.com/portal/sharing/rest/content/items/175fdaff23334223a1f4b00c2e04073a"
},
{
"itemId": "dd5da5f3b4e04412b35ac0a83ff94a9b",
"descriptionjson": "dd5da5f3b4e04412b35ac0a83ff94a9b.json",
"datajson": "dd5da5f3b4e04412b35ac0a83ff94a9b.data.json",
"portalLogo": "dd5da5f3b4e04412b35ac0a83ff94a9b.ago_downloaded.png",
"rewrites": {
"server": "https://dev.yourportal.com/server/rest/services/"
},
"sourceUrl": "https://dev.yourportal.com/portal/sharing/rest/content/items/dd5da5f3b4e04412b35ac0a83ff94a9b"
},
{
"itemId": "990c3dba96884f6aac3c989e7ec9b25f",
"descriptionjson": "990c3dba96884f6aac3c989e7ec9b25f.json",
"datajson": "990c3dba96884f6aac3c989e7ec9b25f.data.json",
"portalLogo": "990c3dba96884f6aac3c989e7ec9b25f.ago_downloaded.png",
"rewrites": {
"server": "https://dev.yourportal.com/server/rest/services/"
},
"sourceUrl": "https://dev.yourportal.com/portal/apps/View/index.html?appid=990c3dba96884f6aac3c989e7ec9b25f"
}
],
"servers": {
"EDN_D": {
"protected": "false",
"rewrites": {
"server": "https://dev.yourportal.com/server/rest/services/"
},
"portalLogo": null,
"portalFolder": "Windmills",
"content_status": null,
"sharing": {
"esriEveryone": "false",
"organization": "false",
"groups": [
"Windmills users"
]
},
"990c3dba96884f6aac3c989e7ec9b25f" {
"portalFolder": "Apps",
}
},
"EDN_T": {
"protected": "true",
"rewrites": {
"server": "https://tst.yourportal.com/server/rest/services/"
},
"portalLogo": null,
"portalFolder": "Windmills",
"content_status": null,
"sharing": {
"esriEveryone": "false",
"organization": "false",
"groups": [
"Windmills users"
]
},
"990c3dba96884f6aac3c989e7ec9b25f" {
"portalFolder": "Apps",
}
},
"EDN_A": {
"protected": "true",
"rewrites": {
"service": "https://acc.yourportal.com/server/rest/services/"
},
"portalLogo": null,
"portalFolder": "Windmills",
"content_status": null,
"sharing": {
"esriEveryone": "false",
"organization": "false",
"groups": [
"Windmills users"
]
},
"990c3dba96884f6aac3c989e7ec9b25f" {
"portalFolder": "Apps",
}
},
"EDN_P": {
"protected": "true",
"rewrites": {
"server": "https://prd.yourportal.com/server/rest/services/"
},
"portalLogo": null,
"portalFolder": "Windmills",
"content_status": "authoritative",
"sharing": {
"esriEveryone": "false",
"organization": "false",
"groups": [
"Windmills users"
]
},
"990c3dba96884f6aac3c989e7ec9b25f" {
"portalFolder": "Apps",
}
}
},
"sharing": null
}
Example rewriteFiles:
{
"action": "rewriteFiles",
"sourcePortal": "https://www.arcgis.com/",
"items": [
{
"filename": "5e64d7fd28bc45f886db68d3826ee8af.json",
"rewrites": {
"key": "---Development---"
},
"itemIdRewrites": [
"5e64d7fd28bc45f886db68d3826ee8af"
]
}
],
"servers": {
"merkatordev_t": {
"rewrites": {
"key": "---Test---"
}
},
"merkatordev_a": {
"rewrites": {
"key": "---Acceptance---"
}
},
"merkatordev_p": {
"rewrites": {
"key": ""
}
}
}
}
Global settings
The global settings apply to all servers or DTAP Environments. A DTAP Environment setting overrules a global setting.
Key | Type | Values | Description |
---|---|---|---|
action | string | "deployContent" / "deleteContent" / "rewriteFiles" / "deployProxy" | Required, must be deployContent when publishing the content. change it to "deleteContent" to delete the content on Portal for ArcGIS. rewriteFiles will change the process to file rewriting and does not publish content to the Portal, deployProxy will create a proxy service item with stored credentials to an external service on the portal |
content_status | string | "authoritative" / "deprecated" / "" | Optional, label the content in portal as authoritative or deprecated |
contentUser | string | Optional, the user account the published content must be assigned to | |
portalFolder | string | Optional, the Portal folder the content is published to | |
portalLogo | string | Optional, configures the item logo in portal with specified file. This file should be in the same directory | |
protected | bool | true / false | Optional, protect the items in portal from accidental removal |
sourcePortal | string | The URL of the Portal where the content originated from | |
overwrite_existing | bool | true / false | Optional, overwrite existing items when a item with the same ItemID is found in the target portal, but the item is not registered in the GaiaBuilder Itemregistry. This will overwrite the existing item and register the item to the GaiaBuilder Itemregistry. When set to false, the existing item will be untouched and a new item with a new ItemID will be created in your Portal |
sharing | Deprecated | ||
sourceGroup | reserved for future use |
Items
The "items" section contains a list of all the items. This list is used by GaiaBuilder when updating or deploying content. Be careful with the order in which the items are listed. This order defines which items is deployed first to the target environment. Low level items such as webmaps should be deployed first in order to register the unique ItemID for the webmap. Dashboards and Web Mapping Applications can be deployed thereafter and will get the reference to the webmap updated to the new ItemID, thereby maintaining the link between Webmap and Dashboard or Web Mapping Application.
Key | Type | Values | Description |
---|---|---|---|
itemId | string | The ItemID of the item in your Portal | |
itemIdRewrites | list string | List of ItemDS's. The Deploy script will search and replace the ItemID's in this list using the GaiaBuilder Item Registry. | |
descriptionjson | string | Filename of the item metadata. Defaults to itemid.json. Changing the file name on disk is possible and should be changed here as well | |
datajson | string | Filename of the item data. Defaults to itemid.data.json. Changing the file name on disk is possible and should be changed here as well | |
portalLogo | string | Filename of the item logo file. Defaults to itemid.ago_downloaded.png". Changing the file name on disk is possible and should be changed here as well | |
rewrites | json dictionary {string:string} | {"key: "value", "secondkey": "secondvalue} | Rewrite inputs. The Deploy script will search and replace the input values with the environment values using key mapping. All keys listed in this object should be present in the Environment keys |
sourceUrl | string | The full URL to the item in the source portal | |
filename | string | rewriteFiles only: The filename to update |
Servers
The "servers" section contains a dictionary with all DTAP Environments. These environments can be physically separate servers, but can also (partly) be a virtual DTAP on the same Portal. The DTAP Environment is mapped to the physical server using the Key and the GaiaBuilderEnvRegistry hosted table. The settings are applied to all the items in the item section. When differentiation between items is needed, consider splitting this file into multiple files for each unique configuration.
Key | Type | Values | Description |
---|---|---|---|
protected | bool | "true" / "false" / null | Takes presedence over the global protected setting when "true" or "false" is specified |
rewrites | json dictionary {string:string} | {"key: "value", "secondkey": "secondvalue} | Rewrite inputs. The Deploy script will search and replace the input values with the environment values using key mapping. All keys listed in this object should be present in the Environment keys |
portalLogo | string | Optional, configures the item logo in portal with specified file. This file should be in the same directory | |
portalFolder | string | Optional, the Portal folder the content is published to | |
content_status | string | "authoritative" / "deprecated" / "" | Optional, label the content in portal as authoritative or deprecated |
sharing :json dictionary {string:string / list} | {"unshare" : "true / false","esriEveryone": "true / false","organization": "true / false","groups": ["Group1","Group2" ]} ,"managementgroups" :[ "Shared update group"] | Setting esriEveryone to "true" makes the content available to anonymous users. Setting organization to "true" makes the content available to logged in users. groups contains a list of group names, separated by comma, managementgroups contains a list of group names with the Shared Update capability set, unshare ="true" will unshare the item completely on the portal before sharing it with the configured groups | |
itemid as property | object | Optional, a object containing specific overrides for a specific item. The itemid is the keyword and must be one of the items from the itemsection. See "990c3dba96884f6aac3c989e7ec9b25f" in the example configuration where this specific item is placed in the Apps folder instead of Windmills folder which is the default for the servers in the example |
More informtion
More information on how URL's, ItemID's and other texts are updated during the deploy process can be found under JSON rewrite