ArcGIS Desktop

  • ドキュメント
  • サポート

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

DeleteMapService

  • サマリー
  • 説明
  • 構文

サマリー

レガシー:

This method has been deprecated starting at ArcGIS 10.1 for Server and ArcGIS 10.1 for Desktop and will return a runtime error. Please consult the ArcGIS documentation for the usage of the new ArcGIS Server Administrator API.

Deletes a map service from a designated ArcGIS Server.

説明

This method has been deprecated at ArcGIS 10.1 for Server and ArcGIS 10.1 for Desktop and will return a runtime error.

ArcGIS 10.1 for Server has a new architecture which may require you to adjust how you work with the server. See the following help topic for more information: What to expect when migrating to ArcGIS Server.

You can delete Map Services using the ArcGIS Server Administrator API which is available through the ArcGIS Site Directory. The default URL of the ArcGIS Server Site Directory is as follows:

http://<server name>:6080/arcgis/admin

注意:

The URL of the Site Directory may vary if you have configured ArcGIS Server Web Adaptor to work with your site. For example, the inclusion of the port number, 6080, may not be required. Check your web adaptor configuration to obtain the correct URL.

An example of using Python and the ArcGIS Server Administrator API to delete Map Services is below:

import json
import urllib
import urllib2

def gentoken(url, username, password, expiration=60):
    query_dict = {'username':   username,
                  'password':   password,
                  'expiration': str(expiration),
                  'client':     'requestip'}
    query_string = urllib.urlencode(query_dict)
    return json.loads(urllib.urlopen(url + "?f=json", query_string).read())['token']

def deleteservice(server, servicename, username, password, token=None, port=6080):
    if token is None:
        token_url = "http://{}:{}/arcgis/admin/generateToken".format(server, port)
        token = gentoken(token_url, username, password)
    delete_service_url = "http://{}:{}/arcgis/admin/services/{}/delete?token={}".format(server, port, servicename, token)
    urllib2.urlopen(delete_service_url, ' ').read() # The ' ' forces POST
    
# if you need a token, execute this line:
deleteservice("<server>", "<service>.MapServer", "<admin username>", "<admin password>")

# if you already have a token, execute this line:
deleteservice("<server>", "<service>.MapServer", None, None, token='<token string>')

構文

DeleteMapService (connection_url_or_name, server, service_name, {folder_name}, {connection_username}, {connection_password}, {connection_domain})
パラメーター説明データ タイプ
connection_url_or_name

A string that represents the URL of the ArcGIS Server for which you want to delete a service.

String
server

A string that represents the ArcGIS Server host name.

String
service_name

A string that represents the name of the service. This is the name people will see and use to identify the service. The name can only contain alphanumeric characters and underscores. No spaces or special characters are allowed. The name cannot be more than 120 characters in length.

String
folder_name

A string that represents a folder name.

String
connection_username

A string that represents a user name used to connect to ArcGIS Server. This variable is only necessary when connecting to a UNIX/Linux ArcGIS Server.

(デフォルト値は次のとおりです None)

String
connection_password

A string that represents a password used to connect to the ArcGIS Server. This variable is only necessary when connecting to a UNIX/Linux ArcGIS Server.

(デフォルト値は次のとおりです None)

String
connection_domain

A string that represents a domain name used to connect to the ArcGIS Server. This variable is only necessary when connecting to a UNIX/Linux ArcGIS Server.

(デフォルト値は次のとおりです None)

String

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS プラットフォーム

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • スタッフ ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2018 Esri. | プライバシー | リーガル