Create New Site

URL:
https://<notebookserveradmin>/createNewSite
Methods:
GET
Required Capability:
Administrator
Version Introduced:
10.7

Description

The createNewSite operation is the first operation that you must invoke when you install ArcGIS Notebook Server for the first time. You can only run this operation when the machine is not participating in a site.

Creating a site involves the following tasks:

  • Allocate a store to save the site configuration.
  • Configure the ArcGIS Notebook Server content and log directories.
  • Create the primary site administrator user.

It takes only a few seconds to create a site. Once a site has been created, you can register ArcGIS Web Adaptor and federate the server with your ArcGIS Enterprise portal.

Included in the request to this operation are JSON objects describing the file paths for the site configuration store and server directories.

For Windows systems, to join additional ArcGIS Notebook Server machines to the site, the SYSTEM and OUTPUT server directories must be on shared drives, and the WORKSPACE directory must be local to each machine. For more information, see Join additional machines to an ArcGIS Notebook Server site.

Request parameters

ParameterDetails

username

The name of the primary administrator account to be used by the site. This can be changed at a later time.

password

The credentials for the primary administrator account.

configStoreConnection

A JSON object representing the connection to the configuration store. By default, the configuration store is maintained in the installation directory.

directories

A JSON object representing the collection of server directories to create. By default, these directories are created locally.

logsSettings

Optional log settings.

A JSON object representing the log settings for the newly created site.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "maxLogFileAge": <number of days up to which logs should be retained>,
  "logLevel": "SEVERE|WARNING|INFO|VERBOSE|DEBUG",
  "logDir": "A local or a shared directory location for writing the log files"
}

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "maxLogFileAge": 90,
  "logLevel": "WARNING",
  "logDir": "C:\\arcgisnotebookserver\\logs\\"
}

runAsync

A flag that indicates whether the operation must be run asynchronously.

Values: true | false

f

The response format. The default response format is html .

Values: html | json | pjson

Example usage

The following is an example usage of createNewSite on a Windows machine:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
username=admin
password=secret
configStoreConnection= {
  "connectionString": "\\myshare\arcgis\notebookserver\usr\config-store",
  "configPersistenceType": "FILESYSTEM",
  "className": "com.esri.arcgis.carbon.persistence.impl.filesystem.FSConfigPersistence"
},
directories=[{"path":"\\myshare\arcgis\notebookserver\usr\directories\arcgisoutput","name":"arcgisoutput","id":"b3f2cb48-40d2-4ba0-bc94-58481c8c0d7d","type":"OUTPUT"},{"path":"C:\\arcgisworkspace","name":"arcgisworkspace","id":"8f20d192-f503-4776-9f07-2dd728d4f0c6","type":"WORKSPACE"},{"path":"\\myshare\arcgis\notebookserver\usr\arcgissystem","name":"arcgissystem","id":"9939ee58-0187-4405-9eb7-9fc78100ae0d","type":"SYSTEM"}]
logsSettings={"maxLogFileAge":90,"logLevel":"WARNING","logDir":"\\myshare\arcgis\notebookserver\usr\logs\"}"

The following is an example usage of createNewSite on a Linux machine:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
username=admin
password=secret
configStoreConnection= {
  "connectionString": "/myshare/arcgis/notebookserver/usr/config-store",
  "configPersistenceType": "FILESYSTEM",
  "className": "com.esri.arcgis.carbon.persistence.impl.filesystem.FSConfigPersistence"
},
directories=[{"path":"/myshare/arcgis/notebookserver/usr/directories/arcgisoutput","name":"arcgisoutput","id":"b3f2cb48-40d2-4ba0-bc94-58481c8c0d7d","type":"OUTPUT"},{"path":"/myshare/arcgis/notebookserver/usr/directories/arcgisworkspace","name":"arcgisworkspace","id":"8f20d192-f503-4776-9f07-2dd728d4f0c6","type":"WORKSPACE"},{"path":"/myshare/arcgis/notebookserver/usr/directories/arcgissystem","name":"arcgissystem","id":"9939ee58-0187-4405-9eb7-9fc78100ae0d","type":"SYSTEM"}]
logsSettings={"maxLogFileAge":90,"logLevel":"WARNING","logDir":"/myshare/arcgis/notebookserver/usr/logs/"}"

The following is an example of a configStoreConnection JSON object for an Amazon store (with pre-10.8 values):

Use dark colors for code blocksCopy
1
2
3
4
5
configStoreConnection= {
  "connectionString":"NAMESPACE=namespace;REGION=region;ACCESS_KEY_ID=access_key_id;SECRET_KEY=secretKey",
  "configPersistenceType":"AMAZON",
  "className":"com.esri.arcgis.carbon.persistence.impl.amazon.AmazonConfigPersistence"
}

The following is an example of a configStoreConnection JSON object for an Amazon store:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
configStoreConnection= {
  "configPersistenceType":"AMAZON",
  "connectionString":"NAMESPACE=namespace;REGION=us-east-1",
  "username":"<ACCESS_KEY_ID>",
  "password":"<SECRET_KEY>",
  "className":"com.esri.arcgis.carbon.persistence.impl.amazon.AmazonConfigPersistence"
}

The following is an example of a configStoreConnection JSON object for an Azure store (with pre-10.8 values):

Use dark colors for code blocksCopy
1
2
3
4
5
configStoreConnection= {
  "configPersistenceType":"AZURE",
  "connectionString":"NAMESPACE=inamespace;EndpointSuffix=core.windows.net;DefaultEndpointsProtocol=https;AccountName=accountname;AccountKey=accountkey",
  "className":"com.esri.arcgis.carbon.persistence.impl.azure.AzureConfigPersistence"
}

The following is an example of a configStoreConnection JSON object for an Azure store:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
configStoreConnection= {
  "configPersistenceType": "AZURE",
  "connectionString": "NAMESPACE=testnamespace;EndpointSuffix=core.windows.net;DefaultEndpointsProtocol=https",
  "username":"<AccountName>",
  "password":"<AccountKey>",
  "className": "com.esri.arcgis.carbon.persistence.impl.azure.AzureConfigPersistence"
}

The following is an example of a configStoreConnection JSON object for an Azure Service Principal:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "connectionString": "NAMESPACE=testNameSpace;AccountName=myStorageAccount;CredentialType=ServicePrincipal;TenantId=tenantId;ClientId=clientId",
  "connectionSecret": "Client Secret",
  "type": "AZURE"
}

The following is an example of a configStoreConnection JSON object for and Azure user-assigned managed identity. This is only supported when the Notebook Server is installed on an Azure VM:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "configPersistenceType": "AZURE",
  "connectionString": "NAMESPACE=<managedIdentityNameSpace>;EndpointSuffix=core.windows.net;DefaultEndpointsProtocol=https;CredentialType=UserAssignedIdentity;ManagedIdentityClientId=<ManagedIdentityClientiD>",
  "username": "<Name of the storage account>",
  "password": "",
  "className": "com.esri.arcgis.carbon.persistence.impl.azure.AzureConfigPersistence"
}

The following is an example of a configStoreConnection JSON object for an Azure Shared Access Signature (SAS) token:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "configPersistenceType": "AZURE",
  "connectionString": "NAMESPACE=<namespace>;AccountName=<Name of the storage account>;EndpointSuffix=core.windows.net;DefaultEndpointsProtocol=https;CredentialType=SASToken;SASToken=<SASToken>",
  "className": "com.esri.arcgis.carbon.persistence.impl.azure.AzureConfigPersistence"
}

JSON Response syntax

Use dark colors for code blocksCopy
1
{"status":"<success|failure>"}

JSON Response example

Use dark colors for code blocksCopy
1
{"status":"success"}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.