GeoServer REST服务&ArcGIS Server REST服务

https://docs.geoserver.org/stable/en/user/rest/

Geoserver的rest接口使用(后台或者前端调实现自动发布服务):https://blog.csdn.net/weixin_40184249/article/details/87877740

ArcGIS_REST_API常用参数简要说明:https://wenku.baidu.com/view/2846c53e580216fc700afdc9.html#

Introduction

The ArcGIS REST API allows you to administer ArcGIS Server programmatically. This means that you can completely manage your server using any framework that can make HTTP requests.

ArcGIS REST API允许您以编程的方式管理ArcGIS服务器。这意味着您可以使用任何可以发出HTTP请求的框架来完全管理服务器。

The API is organized into resources and operations. Resources are entities within ArcGIS Server that hold some information and have a well-defined state. Operations act on these resources and update their information or state. Resources and operations are hierarchical and have unique universal resource locators (URLs).

API分为资源和操作两部分。资源是ArcGIS服务器中保存一些信息并且具有定义良好的状态的实体。操作可以对这些资源进行操作并更新其信息或状态。资源和操作是分层的,并且具有唯一的通用资源定位器(url)。

This topic is designed to help you navigate through the APIs as well as be more productive in administering ArcGIS Server.

本主题旨在帮助您在api中导航,并提高管理ArcGIS Server的效率。

Getting started开始

The hierarchical root of the Administrator API begins with a well-defined URL called as the site URL. Typically, this is accessible at:

管理者API的层次根以一个定义好的URL开始,它叫站URL。通常,可以在以下位置访问:

https://myserver.mydomain:6443/arcgis/admin

Organized hierarchically from the site URL are the various resources and operations that are exposed by the Administrator API. To access a resource or invoke an operation, you must create a request by doing the following:

在站点URL中按层次结构组织的是由Administrator api公开的各种资源和操作。要访问一个资源或调用一个操作,必须通过执行以下操作来创建请求:

  1. Constructing a URL to the selected resource or operation as defined in the API Reference

    构造一个URL,指向选中的资源或操作,这些资源或操作是在API Reference中定义好的。

  2. Providing the relevant parameters in their specified format

    提供相关参数,要按照指定的格式提供。

  3. Accessing the URL over the prescribed HTTP method (typically GET or POST)

    通过指定的HTTP方法访问URL(通常是GET或POST)

The API is stateless, which means that the server does not keep track of transactions from one request to the next. Each request must contain all the information necessary for successful processing. The server will process each request and return a well-defined response.

API是无状态的,这意味着服务器不会跟踪事务从一个请求到下一个请求。每个请求必须包含所有必须的信息才能成功完成处理。服务器将会处理每一个请求并返回一个定义好的响应。

For more information, see the API Reference section of this document.

有关更多信息,请参阅本文档的API Reference部分。

Administrator Directory管理员目录

The Administrator Directory, which is installed with each instance of ArcGIS Server, is a simple HTML interface that allows you to interact with the resources and operations exposed by the Administrator API. This can be helpful when building scripts for administrative tasks and applications. To access the Administrator Directory, browse to the site URL in a web browser.

管理员目录,是一个简单的HTML接口,允许您与Administrator API公开的资源和操作进行交互,它是随ArcGIS Server的每个实例一起安装的。这在为管理任务和应用程序创建脚本时非常有用。要访问管理员目录,请在web浏览器中浏览到站点URL。

资源:machines clusters services security system data uploads logs kml info publicKey

支持的操作:generateToken exportSite importSite deleteSite

支持的接口:REST

Resource hierarchy资源目录

This resource hierarchy demonstrates how resources and operations are related to one another in the server administration portion of the ArcGIS REST API.

参考:https://developers.arcgis.com/rest/enterprise-administration/server/resource-hierarchy.htm 企业管理员REST服务

https://developers.arcgis.com/rest/services-reference/gp-service.htm ArcGIS REST服务

https://developers.arcgis.com/rest/

https://developers.arcgis.com/labs/rest/search-for-an-address/

 REST Update Features

ArcGIS REST API

Get started开始

To successfully use the ArcGIS REST API, you must understand how to construct a URL and interpret the response. All resources and operations exposed by the ArcGIS Services portion of the REST API are accessible through a hierarchy of endpoints for each GIS service published with ArcGIS Server.

要成功地使用ArcGIS REST API,你必须了解如何构造一个URL并且解析对应的响应。REST API的ArcGIS Services部分公开的所有的资源和操作都可以通过ArcGIS服务器发布的每个GIS服务的断点层次结构进行访问。

Determine the well-known endpoint确定已知端点

When using the REST API, you must know the well-known endpoint, which represents a server catalog.

使用restapi时,必须知道已知的端点,它表示服务器目录。

For ArcGIS Server, the default endpoint is as follows:

对ArcGIS Server来说,默认的端点如下所示:

https://<host>/<site>/rest/services/<folder>/<serviceName>/<serviceType>

Where:

  • https://<host> is the ArcGIS Server host name.
  • /<site> is the site name. The default value is "/arcgis/". ArcGIS Server accepts a site name specified in a URL as lowercase (arcgis) or camel case (ArcGIS). Using an all lowercase site name is recommended./site是站点名字。默认值为/arcgis/。ArcGIS Server接受URL中的站点名称为小写字母或驼峰格式的形式。推荐使用全小写形式的站点名字。
  • rest/services indicates the REST services endpoint. You'll see a list of all services in the root directory along with any folders. This part of the URL is case sensitive and should be specified in all lowercase. rest/services表示端点服务。您将看到根目录中所有服务的列表以及所有文件夹。URL的这一部分区分大小写,应全部以小写形式指定。
  • /<serviceName>/<serviceType> represents the name of the service and its type (for example, PopulationDensity/MapServer). The service name is case sensitive and should be specified in the case in which it was created. The service type should always be specified in a mixed case format as defined for each service in the REST API reference (for example, MapServer, GeocodeServer, and GPServer)./<serviceName>/<serviceType>表示服务的名字和类型(例如,PopulationDensity/MapServer)。服务名称区分大小写,应在创建服务名称的情况下指定。服务类型应始终以混合大小写格式指定,如restapi引用中为每个服务定义的(例如,MapServer、GeocodeServer和GPServer)。

For example, to get to the root directory of Sample Server 1 on ArcGIS Online services, the URL is as follows:

例如,要进入ArcGIS Online的Sample Server 1的根目录,URL如下所示:

https://sampleserver1.arcgisonline.com/arcgis/rest/services

Browse using the Services Directory使用服务目录浏览

When you type a URL endpoint in your browser, you'll see the Services Directory. Each ArcGIS Server site comes with a Services Directory, which provides a way for you to browse the list of services, folders, and operations on a server. 在浏览器中键入URL端点时,将看到Services目录。每个ArcGIS服务器站点都附带一个服务目录,它为您提供了一种浏览服务器上的服务、文件夹和操作列表的方法。

  • If you're unfamiliar with the Services Directory, see the Using the Services Directory.如果您不熟悉服务目录,请参阅使用服务目录。
  • Browse through the folders and services on Sample Server 1 to see how the URL changes as you browse to different pages. Note that the folder and service names in the URLs are case sensitive. •浏览示例服务器1上的文件夹和服务,以查看在浏览不同页面时URL的变化情况。请注意,URL中的文件夹和服务名称区分大小写。

Understand the documentation理解文档

The REST API documentation has topics on all resources and operations as well as some introductory and reference topics. The hierarchy of resources and operations listed in the table of contents matches the hierarchy of the API. Each topic contains a description, URL parameters and examples, and JSON object response examples and explanations. restapi文档有关于所有资源和操作的主题,以及一些介绍性和参考性的主题。目录中列出的资源和操作的层次结构与API的层次结构相匹配。每个主题都包含一个描述、URL参数和示例,以及JSON对象响应示例和解释。

  • The top node is Catalog.顶部节点是Catalog。
  • Under Catalog, are the service types, such as Map Service and Geocode Service.Catalog下面,是服务类型,例如Map Service和Geocode Service。
  • Under the service types, are the operations and child resources associated with a service type. For example, a map service has Export Map and Identify operations, among others. There is also a Map Tilechild resource.在服务类型下面,是与服务类型相关联的操作和子资源。例如,地图服务具有导出地图(Export Map)和标识(Identify)操作,和其他的操作等。还有一个地图切片(Map Tile)子资源。

Create a URL and see the response创建一个URL并查看响应

When using the REST API, you need to construct URLs. The Services Directory can help you generate URLs that include the reference to a resource as well as any parameters. A URL with parameters will have the following syntax:当使用REST API时,你需要构造URL。服务目录能帮助你生成URL,URL包含对资源的引用,除了参数。一个带参数的URL将具有以下语法:

原文地址:https://www.cnblogs.com/2008nmj/p/13836330.html