addToServiceDefinition

addToServiceDefinition

addToServiceDefinition(urlstring, requestOptionsIAddToServiceDefinitionOptions): Promise<IAddToServiceDefinitionResult>

Add layer(s) and/or table(s) to a hosted feature service. See the REST Documentation for more information.

Use dark colors for code blocksCopy
       
1
2
3
4
5
6
7
import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin';
//
addToServiceDefinition(serviceurl, {
 authentication: ArcGISIdentityManager,
 layers: [],
 tables: []
});
Parameters
ParameterTypeNotes
url
string

URL of feature service

requestOptions
IAddToServiceDefinitionOptions

Options for the request

Returns 
Promise<IAddToServiceDefinitionResult>

A Promise that resolves with service layer and/or table details once the definition has been updated

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