- URL:
- https://[root]/content/users/[userName]/createService
- Methods:
POST
Example usage
URL for Create Service operation
https://myserver.mydomain.com/sharing/rest/content/users/jsmith/createService
Description
The create
operation allows you to create a hosted image service. You can use the API to create a hosted image service from raster data.
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 for further information. |
| The newly created service type. Value: Example:
|
createParameters JSON object
The create
JSON object is described in the table below. All properties are optional unless marked as Required.
Property | Description |
---|---|
| (Required) Name of the service to be created. This name must be unique. If the name already exists, the operation will fail. The ArcGIS Enterprise portal does not allow spaces or special characters other than underscores in a service name. |
| Description given to the service. |
| Specifies the image service capabilities: |
| A user-friendly description for the published dataset. |
| Copyright information associated with the dataset. |
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 hosted service. |
| The size of the item. |
| Indicates whether 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. |
Example of JSON used to create an image service
The following shows an example of the create
JSON used to create an image service from a raster dataset. To create an empty service, remove the path parameter.
{
"name": "SanDiego",
"path": "\\datastore\elevation\SanDiegoSRTM.crf"
}
JSON Response syntax
{
"encodedServiceURL": <URL>,
"itemId": "<item id>",
"name": "<name of new service>",
"serviceItemId": "<service id>",
"serviceurl": "<url of service>",
"size": "<size of new service>",
"success": true | false,
"type": "Image Service",
"description": "<description of the new service>",
"tags": "<tags used for service>",
"snippet": "<snippet given for service>"
}
JSON Response example
{
"encodedServiceURL": "https://myportal.mydomain.com/arcgis/rest/services/Hosted/SanDiego/ImageServer",
"itemId": "43769096bf8d468e9a82394cf2c6f189",
"name": "SanDiego",
"serviceItemId": "43769096bf8d468e9a82394cf2c6f189",
"serviceurl": "https://myportal.mydomain.com/arcgis/rest/services/Hosted/SanDiego/ImageServer",
"size": -1,
"success": true,
"type": "Image Service"
}