/createService: Create Service (Relational Catalog Service)

URL:
https://[root]/content/users/[userName]/createService
Methods:
POST
Version Introduced:
ArcGIS Enterprise 10.5

Example Usage

URL for Create Service operation

Use dark colors for code blocksCopy
1
2
3
4
https://services.myserver.com/portal/sharing/rest/content/users/portaladmin/createService

createParameters= {} //see: Create Parameters JSON object
outputType=relationalCatalogService

Description

The createService operation (POST only) allows users to create a relational catalog service on the hosting server.

Request Parameters

ParameterDetails

[Common parameters]

For a complete listing, see Common parameters.

createParameters

A JSON object specifying the properties of the newly created service. See the createParameters JSON object table below.

outputType

The newly-created service type.

Value: relationalCatalogService

Example:

Use dark colors for code blocksCopy
1
outputType=relationalCatalogService

createParameters JSON object

The createParameters JSON object is described in the table below. All properties are required.

PropertyDetails

name

Name of the service to be created. This name must be unique. If the name already exists, the operation will fail.

provider

"ADS"

connectionProperties

JSON object that describes the properties used to establish a connection with a relational database.

The following shows an example of the createParameters JSON.

Note that connectionProperties has two properties: relationalDatastoreType and userDefinedProperties.

The relationalDatastoreType refers to the id property of one of the relational data store types registered with the hosting server.

Note that all userDefinedProperties returned from the hosting server that are flagged as required must be specified in the createService call. Properties not flagged as required only need to be specified if they help refine the connectionProperties.

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
{
    "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

PropertyDetails

encodedServiceURL

The encoded URL to the hosted service.

itemId

The unique ID for this item.

name

Name of the service item.

serviceItemId

The ID of the new service item.

serviceurl

The URL to the service.

size

The size of the item.

success

Indicates if the operation was successful.

type

The type of service created.

description

The description of the new service item.

tags

The tags used to describe the service item.

snippet

Snippet or summary for the new service item.

JSON Response Syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "encodedServiceURL": "",
  "itemId": "",
  "name": "",
  "serviceItemId": "",
  "serviceurl": "",
  "size": -1,
  "success": true | false,
  "type": "",
  "description": "",
  "tags": "",
  "snippet": ""
}

JSON Response Example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "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": ""
}

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