/validate: Validate Data Store

URL:
https://[root]/portals/[portalID]/datastores/validate
Methods:
GET
Version Introduced:
10.7.1

Example usage

The following is a sample ArcGIS Enterprise request URL for the validate operation using the datastore and serverId parameters:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/sharing/rest/portals/0123456789ABCDEF/datastores/validate?datastore={"path":"/enterpriseDatabases/explorationDB","type":"egdb","info":{"dataStoreConnectionType":"shared","isManaged":false,"connectionString":"SERVER=expDB.acme.com;INSTANCE=sde:postgresql:expDB.acme.com,9876;DBCLIENT=postgresql;DB_CONNECTION_PROPERTIES=machine.domain.com,9876;DATABASE=db2;USER=thatUser;VERSION=sde.DEFAULT;AUTHENTICATION_MODE=DBMS;ENCRYPTED_PASSWORD=00022e686e3264"}}&serverId=9sQswqEpB31ymiCD&f=pjson

The following is a sample ArcGIS Enterprise POST request for the validate operation using the datastoreId and serverId parameters:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /webadaptor/sharing/rest/portals/0123456789ABCDEF/datastores/validate HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

datastoreId=55d87f404a7e420bb969ccb70254bfec&serverId=9sQswqEpB31ymiCD&f=pjson

Description

The validate operation ensures that your ArcGIS Server can connect and use the datasets stored within a given data store. While this operation can be called before or after the data store has been registered with your server, it is recommended that the validate operation is performed beforehand. A data store can be validated by using either its datastoreId or the JSON for an unregistered data store. The serverId can be found on the Servers resource page.

Request parameters

ParameterDetails

datastoreId

(Optional; Required if datastore is not used)

The itemId of an existing data store item.

Example

Use dark colors for code blocksCopy
1
datastoreId=55d87f404a7e420bb969ccb70254bfec

datastore

(Optional; Required if datastoreId is not used)

The JSON of a data store not already registered to your portal.

Example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
datastore={
  "path": "/<datastore path>/<data store>",
  "type": "egdb",
  "info": {
    "dataStoreConnectionType": "shared",
    "isManaged": false,
    "connectionString": "SERVER=<server information>;INSTANCE=<instance>;
    DBCLIENT=postgresql;DB_CONNECTION_PROPERTIES=<database property information>;
    DATABASE=db2;USER=thatUser;VERSION=sde.DEFAULT;AUTHENTICATION_MODE=DBMS;
    ENCRYPTED_PASSWORD=<password>"
  }
}

serverId

(Required)

The serverId you want to validate the data store against.

Example

Use dark colors for code blocksCopy
1
serverId=9sQswqEpB31ymiCD

f

The response format. The default format is html.

Value: html | json | pjson

JSON Response examples

If either of the requests above is successful, validate will return the following success message:

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

If the operation fails, validate will return an error similar to the message below:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "machines": [
    {
      "machine": <machine name>,
      "status": "error",
      "dataItems": [
        {
          "dataItem": "<dataItem information>",
          "path": <datastore path>,
          "validationState": "FAILED",
          "message": <descriptive error message>
        }
      ]
    }
  ]
}

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