- URL:https://<datastores-url>/validate
- Version Introduced:10.7.1
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
Parameter | Details |
---|---|
datastoreId | The itemId of an existing data store item.
|
datastore | The JSON of a data store not already registered to your portal.
|
serverId (Required) | The serverId you want to validate the data store against.
|
f | The response format. The default format is html. Value: html | json |
Example usage
Below is a sample URL for the validateDatastores operation.
https://webadaptor.domain.com/webadaptor/sharing/rest/portals/<portal Id>/datastores/validate
JSON Request example
The following example uses the datastoreId and serverId parameters:
<self-url>/datastores/validate?datastoreId=55d87f404a7e420bb969ccb70254bfec&serverId=9sQswqEpB31ymiCD
Alternatively, you can call the operation using the datastore and serverId parameters:
<self-url>/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=dev003201.esri.com,9876;DATABASE=db2;USER=thatUser;VERSION=sde.DEFAULT;AUTHENTICATION_MODE=DBMS;ENCRYPTED_PASSWORD=00022e686e3264"}}&serverId=9sQswqEpB31ymiCD
JSON Response example
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>