- URL:
- https://[root]/content/users/[userName]/createService
- Methods:
POST
- Version Introduced:
- ArcGIS Enterprise 10.5
Example Usage
URL for Create Service operation
https://services.myserver.com/portal/sharing/rest/content/users/portaladmin/createService
createParameters= {} //see: Create Parameters JSON object
outputType=relationalCatalogService
Description
The create
operation (POST only) allows users to create a relational catalog service on the hosting server.
Request Parameters
Parameter | Details |
---|---|
| For a complete listing, see Common parameters. |
| A JSON object specifying the properties of the newly created service. See the createParameters JSON object table below. |
| The newly-created service type. Value: Example:
|
createParameters JSON object
The create
JSON object is described in the table below. All properties are required.
Property | Details |
---|---|
| Name of the service to be created. This name must be unique. If the name already exists, the operation will fail. |
| "ADS" |
| JSON object that describes the properties used to establish a connection with a relational database. |
The following shows an example of the create
JSON.
Note that connection
has two properties: relational
and user
.
The relational
refers to the id
property of one of the relational data store types registered with the hosting server.
Note that all user
returned from the hosting server that are flagged as required must be specified in the create
call. Properties not flagged as required only need to be specified if they help refine the connection
.
{
"name":"DBConn1",
"provider":"ADS",
"connectionProperties":{
"relationalDatastoreType":"esri.sqlserver",
"userDefinedProperties":[
{
"name":"username",
"value":"user1"
},
{
"name":"password",
"value":"password1"
},
{
"name":"serverName",
"value":"dbserver1.esri.com"
},
{
"name":"databaseName",
"value":"DB1"
}
]
}
}
Response Properties
Property | Details |
---|---|
| The encoded URL to the hosted service. |
| The unique ID for this item. |
| Name of the service item. |
| The ID of the new service item. |
| The URL to the service. |
| The size of the item. |
| Indicates if the operation was successful. |
| The type of service created. |
| The description of the new service item. |
| The tags used to describe the service item. |
| Snippet or summary for the new service item. |
JSON Response Syntax
{
"encodedServiceURL": "",
"itemId": "",
"name": "",
"serviceItemId": "",
"serviceurl": "",
"size": -1,
"success": true | false,
"type": "",
"description": "",
"tags": "",
"snippet": ""
}
JSON Response Example
{
"encodedServiceURL": "https://services.myserver.com/server/rest/services/Hosted/SQLServer1/RelationalCatalogServer",
"itemId": "738972c681674a4c8ed66f5e1b1169b6",
"name": "SQLServer1",
"serviceItemId": "738972c681674a4c8ed66f5e1b1169b6",
"serviceurl": "https://services.myserver.com/server/rest/services/Hosted/SQLServer1/RelationalCatalogServer",
"size": -1,
"success": true,
"type": "Relational Catalog Service",
"description": "",
"tags": "",
"snippet": ""
}