Closed ManushiM closed 5 years ago
Checkpoints for site creation (not necessarily in this order)
Open Data site
Initiative site
@dbouwman am I missing anything in these ^ checkpoints?
Ok... so - what you are trying to replicate is the "core" of the site-service
Specifically the create(...)
fn, and parts of fromTemplate(...)
and ensureUniqueDomainName(...)
Along with the registerSiteAsApplication(...)
function in the domain-service
You need to verify that the domain is not currently used... we do that by issuing a GET
to the domain service like https://opendataqa.arcgis.com/utilities/domains/dave-private-1-dc.hubqa.arcgis.com
- if we get a 404 in response, we know the domain is available. There is different portal logic.
For automated site creation, we have logic that increments the requested subdomain...
so if myfancysite
is the requested subdomain, that becomes myfancysite-{{orgUrlKey}}.hub{{ENV}}.arcgis.com
. If that is in use, we then check myfancysite-1-{{orgUrlKey}}.hub{{ENV}}.arcgis.com
etc
For the javascript API's we use, the item.data is set when we create the item... not sure if that's an option w/ the python api.
Looking at the code, the process is more like this:
create(...)
fn - look at the fromTemplate(...)
fn. That's also where we do any interpolation (aka "AdLib") At this point we'd have the json structure of the item... the hash is structured like {item:{...}, data: {...}}
and we have helpers that know how to serialize that into the mess that the AGO API wants anyhow... steps are...
Functionality supported: