Skip To Content

/validate: Validate Data Store

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

Example usage

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

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

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


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

datastoreId=55d87f404a7e420bb969ccb70254bfec
datastore

(Optional; Required if datastoreId is not used)

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

Example

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

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:

{"status": "success"}

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


{
  "machines": [
    {
      "machine": <machine name>,
      "status": "error",
      "dataItems": [
        {
          "dataItem": "<dataItem information>",
          "path": <datastore path>,
          "validationState": "FAILED",
          "message": <descriptive error message>
        }
      ]
    }
  ]
}