Skip to content
URL:
https://<root>/createNewSite
Methods:
POST
Version Introduced:
10.2

Access requirements

Required privileges

The Portal Administrator API requires privilege-based access. An administrator must be assigned a specific user privilege, or role, to access any given endpoint. Listed below are the user privileges or roles an administrator can be assigned that provides access to this endpoint. If multiple privileges are listed, only one needs to be assigned to gain access.


Tokens

This API requires token-based authentication. A token is automatically generated for administrators who sign in to the Portal Administrator API directory's HTML interface. Tokens generated in this way are stored for the entirety of the session.

Those accessing the API directory outside of the HTML interface will need to acquire a session token from the generateToken operation in the Portal Directory API. For security reasons, all POST requests made to the Portal Administrator API must include a token in the request body.


Learn how to generate a token

Description

The createNewSite operation initializes and configures an ArcGIS Enterprise portal for use. It must be the first operation invoked after installation. Creating a new site involves the following:

  • Creating the initial administrator account
  • Creating a database administrator account (which is same as the initial administrator account)
  • Creating token shared keys
  • Registering directories

This operation is time consuming, as the database is initialized and populated with default templates and content. If the database directory is not empty, the operation attempts to migrate the database to the current version while keeping its data intact. At the end of the operation, the web server that hosts the API is automatically restarted.

Request parameters

ParameterDetails

username

The initial administrator account name.

Example
Use dark colors for code blocksCopy
1
cadmin

password

The password for the initial administrator account.

Example
Use dark colors for code blocksCopy
1
admin.secret

fullname

The full name for the initial administrator account.

Example
Use dark colors for code blocksCopy
1
Administrator

email

The account email address.

Example
Use dark colors for code blocksCopy
1
admin@email.com

description

An optional description for the account.

Example
Use dark colors for code blocksCopy
1
The initial admin account

securityQuestionIdx

The index of the secret question to retrieve a forgotten password. The secret questions and their indexes are listed below.

Example
Use dark colors for code blocksCopy
1
1

securityQuestionAns

The answer to the secret question specified in the securityQuestionIdx parameter.

Example
Use dark colors for code blocksCopy
1
Mumbai

contentStore

The JSON string including the path to the location of the site's content.

Example
Use dark colors for code blocksCopy
1
2
3
4
5
{
  "type": "fileStore",
  "provider": "FileSystem",
  "connectionString": "C:/arcgisportal/content"
}

file

The portal license file. You obtain the portal license file (a multipart POST file that contains information regarding your user types, apps, and app bundles) from My Esri. For more information, see Obtain a portal license file.

userLicenseTypeId

The user type for the initial administrator account. The values listed below are the user types that are compatible with the Administrator role. For more information about roles and user types, see User types, roles, and privileges.

Values: creatorUT | GISProfessionalStdUT | GISProfessionalAdvUT

enableDebug

Introduced at ArcGIS Enterprise 11.3. Specifies the log level when creating a portal site. If true, the log level is set to DEBUG, which can aid in troubleshooting issues related running the createSite operation. After the operation completes, the log level will still be set to DEBUG. If false, the log level is set to VERBOSE during site creation and set to WARNING once the portal site is created. The default value is false.

Values: true | false

async

Introduced at ArcGIS Enterprise 12.0. This parameter specifies whether the operation is performed asynchronously. If set as false, the operation is performed synchronously and a response is only returned when the site is created succesfully or when site creation fails. If set as true, the operation is performed asynchronously and returns a more verbose JSON response that lists the different stages of site creation and the current status of each step. Administrators can then poll the the Root resource for job status updates.

Values: true | false

f

The formatting parameter. The default format is html.

Values: html | json | pjson

Secret questions and indexes

The securityQuestionIdx parameter defines a security question that is used when retrieving a forgotten password. Listed below are the security questions and their associated index numbers:

Index numberSecurity question

1

What city were you born in?

2

What was your high school mascot?

3

What is your mother's maiden name?

4

What was the make of your first car?

5

What high school did you go to?

6

What is the last name of your best friend?

7

What is the middle name of your youngest sibling?

8

What is the name of the street on which you grew up?

9

What is the name of your favorite fictional character?

10

What is the name of your favorite pet?

11

What is the name of your favorite restaurant?

12

What is the title of your favorite book?

13

What is your dream job?

14

Where did you go on your first date?

Example usage

The following is a sample POST request for the createNewSite operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
POST /<context>/portaladmin/createNewSite HTTP/1.1
Host: organization.example.com
Content-Type: multipart/form-data; boundary=----boundary
Content-Length: []

------boundary
Content-Disposition: form-data; name="username"

cadmin
------boundary
Content-Disposition: form-data; name="password"

admin.secret
------boundary
Content-Disposition: form-data; name="fullname"

Administrator
------boundary
Content-Disposition: form-data; name="email"

admin@email.com
------boundary
Content-Disposition: form-data; name="description"

The initial admin account
------boundary
Content-Disposition: form-data; name="securityQuestionIdx"

1
------boundary
Content-Disposition: form-data; name="securityQuestionAns"

Mumbai
------boundary
Content-Disposition: form-data; name="contentStore"

{"type": "fileStore","provider": "FileSystem","connectionString": "C:/arcgisportal/content"}
------boundary
Content-Disposition: form-data; name="file"; filename=""
Content-Type: application/octet-stream

portal_license.json
------boundary
Content-Disposition: form-data; name="userLicenseTypeId"

creatorUT
------boundary
Content-Disposition: form-data; name="async"

true
------boundary
Content-Disposition: form-data; name="f"

pjson
------boundary

JSON Response examples

The sample response below is returned when the operation is performed synchronously and the site is created succesfully:

Use dark colors for code blocksCopy
1
2
3
4
{
  "status": "success",
  "recheckAfterSecs": 10
}

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