geoserver的rest接口(持续更新)

使用apipost生成

https://console-docs.apipost.cn/preview/b0833de008be650c/c09dc193f42c2eac?target_id=1ef36072-c1a5-4ab9-84cf-768fa65d21fb#8a312a2e-8455-4c45-8c88-6f71e546a2ef

/geoserver/新建网格集

暂无描述

接口状态

已完成

接口URL

http://localhost:8080/geoserver/gwc/rest/gridsets/123456.xml

请求方式

PUT

Content-Type

xml

请求Body参数

<?xml version="1.0" encoding="UTF-8"?>
<gridSet>
    <name>123456</name>
    <description></description>
    <srs>
        <number>4326</number>
    </srs>
    <extent>
        <coords>
            <double>-180.0</double>
            <double>-90.0</double>
            <double>180.0</double>
            <double>90.0</double>
        </coords>
    </extent>
    <alignTopLeft>false</alignTopLeft>
    <resolutions>
        <double>0.703125</double>
        <double>0.3515625</double>
        <double>0.17578125</double>
        <double>0.087890625</double>
        <double>0.0439453125</double>
        <double>0.02197265625</double>
        <double>0.010986328125</double>
        <double>0.0054931640625</double>
        <double>0.00274658203125</double>
        <double>0.001373291015625</double>
        <double>6.866455078125E-4</double>
        <double>3.4332275390625E-4</double>
        <double>1.71661376953125E-4</double>
        <double>8.58306884765625E-5</double>
        <double>4.291534423828125E-5</double>
        <double>2.1457672119140625E-5</double>
        <double>1.0728836059570312E-5</double>
        <double>5.364418029785156E-6</double>
        <double>2.682209014892578E-6</double>
        <double>1.341104507446289E-6</double>
        <double>6.705522537231445E-7</double>
        <double>3.3527612686157227E-7</double>
    </resolutions>
    <metersPerUnit>111319.49079327358</metersPerUnit>
    <pixelSize>2.8E-4</pixelSize>
    <scaleNames>
        <string>123456:0</string>
        <string>123456:1</string>
        <string>123456:2</string>
        <string>123456:3</string>
        <string>123456:4</string>
        <string>123456:5</string>
        <string>123456:6</string>
        <string>123456:7</string>
        <string>123456:8</string>
        <string>123456:9</string>
        <string>123456:10</string>
        <string>123456:11</string>
        <string>123456:12</string>
        <string>123456:13</string>
        <string>123456:14</string>
        <string>123456:15</string>
        <string>123456:16</string>
        <string>123456:17</string>
        <string>123456:18</string>
        <string>123456:19</string>
        <string>123456:20</string>
        <string>123456:21</string>
    </scaleNames>
    <tileHeight>256</tileHeight>
    <tileWidth>256</tileWidth>
    <yCoordinateFirst>true</yCoordinateFirst>
</gridSet>

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

错误响应示例

Duplicate field coords
---- Debugging information ----
message             : Duplicate field coords
field               : coords
class               : org.geowebcache.grid.BoundingBox
required-type       : org.geowebcache.grid.BoundingBox
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
class[1]            : org.geowebcache.config.XMLGridSet
required-type[1]    : org.geowebcache.config.XMLGridSet
version             : 1.20.x/7859501431095a04f5a5c57d0f1c28ef10005a17
-------------------------------

/geoserver/查询某个网格集详情

暂无描述

接口状态

开发中

接口URL

http://localhost:8080/geoserver/gwc/rest/gridsets/EPSG:4326.xml

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

成功响应示例

{
	"gridSet": {
		"extent": {
			"coords": [
				-180,
				-90,
				180,
				90
			]
		},
		"metersPerUnit": 111319.49079327358,
		"scaleNames": [
			"EPSG:4326:0",
			"EPSG:4326:1",
			"EPSG:4326:2",
			"EPSG:4326:3",
			"EPSG:4326:4",
			"EPSG:4326:5",
			"EPSG:4326:6",
			"EPSG:4326:7",
			"EPSG:4326:8",
			"EPSG:4326:9",
			"EPSG:4326:10",
			"EPSG:4326:11",
			"EPSG:4326:12",
			"EPSG:4326:13",
			"EPSG:4326:14",
			"EPSG:4326:15",
			"EPSG:4326:16",
			"EPSG:4326:17",
			"EPSG:4326:18",
			"EPSG:4326:19",
			"EPSG:4326:20",
			"EPSG:4326:21"
		],
		"yCoordinateFirst": true,
		"srs": {
			"number": 4326
		},
		"name": "EPSG:4326",
		"description": "A default WGS84 tile matrix set where the first zoom level covers the world with two tiles on the horizontal axis and one tile over the vertical axis and each subsequent zoom level is calculated by half the resolution of its previous one. Tiles are 256px wide.",
		"resolutions": [
			0.703125,
			0.3515625,
			0.17578125,
			0.087890625,
			0.0439453125,
			0.02197265625,
			0.010986328125,
			0.0054931640625,
			0.00274658203125,
			0.001373291015625,
			0.0006866455078125,
			0.00034332275390625,
			0.000171661376953125,
			0.0000858306884765625,
			0.00004291534423828125,
			0.000021457672119140625,
			0.000010728836059570312,
			0.000005364418029785156,
			0.000002682209014892578,
			0.000001341104507446289,
			6.705522537231445e-7,
			3.3527612686157227e-7
		],
		"tileWidth": 256,
		"pixelSize": 0.00028,
		"alignTopLeft": false,
		"tileHeight": 256
	}
}

/geoserver/查询所有切片网格集

暂无描述

接口状态

已完成

接口URL

http://localhost:8080/geoserver/gwc/rest/gridsets.json

请求方式

GET

Content-Type

none

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

/geoserver/查询gwc切片进度

如果切片完成,则返回一个空数组
{
	"long-array-array": []
}

接口状态

开发中

接口URL

http://localhost:8080/geoserver/gwc/rest/seed/dpf:GF6_210621_rpcortho1.json

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

成功响应示例

{
	"long-array-array": []
}

错误响应示例

Thread 17 Unknown layer dpf:GF6_210621_rpcortho1. Check the logfiles, it may not have loaded properly.

/geoserver/查询图层要素

暂无描述

接口状态

开发中

接口URL

http://localhost:8080/geoserver/rest/workspaces/dpf/datastores/01/featuretypes/01.json

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

成功响应示例

{
	"featureType": {
		"name": "01",
		"nativeName": "01",
		"namespace": {
			"name": "dpf",
			"href": "http://localhost:8080/geoserver/rest/namespaces/dpf.json"
		},
		"title": "01",
		"keywords": {
			"string": [
				"features",
				"01"
			]
		},
		"nativeCRS": "GEOGCS[\"WGS 84\", \r\n  DATUM[\"World Geodetic System 1984\", \r\n    SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], \r\n    AUTHORITY[\"EPSG\",\"6326\"]], \r\n  PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], \r\n  UNIT[\"degree\", 0.017453292519943295], \r\n  AXIS[\"Geodetic longitude\", EAST], \r\n  AXIS[\"Geodetic latitude\", NORTH], \r\n  AUTHORITY[\"EPSG\",\"4326\"]]",
		"srs": "EPSG:4326",
		"nativeBoundingBox": {
			"minx": 115.63277156214156,
			"maxx": 116.30623939740656,
			"miny": 36.77424360898749,
			"maxy": 37.3206140926406,
			"crs": "EPSG:4326"
		},
		"latLonBoundingBox": {
			"minx": 115.63277156214156,
			"maxx": 116.30623939740656,
			"miny": 36.77424360898749,
			"maxy": 37.3206140926406,
			"crs": "EPSG:4326"
		},
		"projectionPolicy": "FORCE_DECLARED",
		"enabled": true,
		"store": {
			"@class": "dataStore",
			"name": "dpf:01",
			"href": "http://localhost:8080/geoserver/rest/workspaces/dpf/datastores/01.json"
		},
		"serviceConfiguration": false,
		"simpleConversionEnabled": false,
		"maxFeatures": 0,
		"numDecimals": 0,
		"padWithZeros": false,
		"forcedDecimal": false,
		"overridingServiceSRS": false,
		"skipNumberMatched": false,
		"circularArcPresent": false,
		"attributes": {
			"attribute": [
				{
					"name": "the_geom",
					"minOccurs": 0,
					"maxOccurs": 1,
					"nillable": true,
					"binding": "org.locationtech.jts.geom.MultiPolygon"
				},
				{
					"name": "Id",
					"minOccurs": 0,
					"maxOccurs": 1,
					"nillable": true,
					"binding": "java.lang.Integer",
					"length": 6
				}
			]
		}
	}
}

错误响应示例

No such data store: dpf,01

/geoserver/查询图层详情

暂无描述

接口状态

已完成

接口URL

http://localhost:8080/geoserver/rest/layers/tiger:giant_polygon.json

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

成功响应示例

{
	"layer": {
		"name": "giant_polygon",
		"path": "/",
		"type": "VECTOR",
		"defaultStyle": {
			"name": "giant_polygon",
			"href": "http://localhost:8080/geoserver/rest/styles/giant_polygon.json"
		},
		"resource": {
			"@class": "featureType",
			"name": "tiger:giant_polygon",
			"href": "http://localhost:8080/geoserver/rest/workspaces/tiger/datastores/nyc/featuretypes/giant_polygon.json"
		},
		"attribution": {
			"logoWidth": 0,
			"logoHeight": 0
		}
	}
}

/geoserver/查询所有的图层

暂无描述

接口状态

开发中

接口URL

http://localhost:8080/geoserver/rest/layers

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

成功响应示例

{
	"layers": {
		"layer": [
			{
				"name": "tiger:giant_polygon",
				"href": "http://localhost:8080/geoserver/rest/layers/tiger%3Agiant_polygon.json"
			},
			{
				"name": "tiger:poi",
				"href": "http://localhost:8080/geoserver/rest/layers/tiger%3Apoi.json"
			},
			{
				"name": "tiger:poly_landmarks",
				"href": "http://localhost:8080/geoserver/rest/layers/tiger%3Apoly_landmarks.json"
			},
			{
				"name": "tiger:tiger_roads",
				"href": "http://localhost:8080/geoserver/rest/layers/tiger%3Atiger_roads.json"
			},
			{
				"name": "nurc:Arc_Sample",
				"href": "http://localhost:8080/geoserver/rest/layers/nurc%3AArc_Sample.json"
			},
			{
				"name": "nurc:Img_Sample",
				"href": "http://localhost:8080/geoserver/rest/layers/nurc%3AImg_Sample.json"
			},
			{
				"name": "nurc:Pk50095",
				"href": "http://localhost:8080/geoserver/rest/layers/nurc%3APk50095.json"
			},
			{
				"name": "nurc:mosaic",
				"href": "http://localhost:8080/geoserver/rest/layers/nurc%3Amosaic.json"
			},
			{
				"name": "topp:states",
				"href": "http://localhost:8080/geoserver/rest/layers/topp%3Astates.json"
			},
			{
				"name": "topp:tasmania_cities",
				"href": "http://localhost:8080/geoserver/rest/layers/topp%3Atasmania_cities.json"
			},
			{
				"name": "topp:tasmania_roads",
				"href": "http://localhost:8080/geoserver/rest/layers/topp%3Atasmania_roads.json"
			},
			{
				"name": "topp:tasmania_state_boundaries",
				"href": "http://localhost:8080/geoserver/rest/layers/topp%3Atasmania_state_boundaries.json"
			},
			{
				"name": "topp:tasmania_water_bodies",
				"href": "http://localhost:8080/geoserver/rest/layers/topp%3Atasmania_water_bodies.json"
			},
			{
				"name": "sf:archsites",
				"href": "http://localhost:8080/geoserver/rest/layers/sf%3Aarchsites.json"
			},
			{
				"name": "sf:bugsites",
				"href": "http://localhost:8080/geoserver/rest/layers/sf%3Abugsites.json"
			},
			{
				"name": "sf:restricted",
				"href": "http://localhost:8080/geoserver/rest/layers/sf%3Arestricted.json"
			},
			{
				"name": "sf:roads",
				"href": "http://localhost:8080/geoserver/rest/layers/sf%3Aroads.json"
			},
			{
				"name": "sf:sfdem",
				"href": "http://localhost:8080/geoserver/rest/layers/sf%3Asfdem.json"
			},
			{
				"name": "sf:streams",
				"href": "http://localhost:8080/geoserver/rest/layers/sf%3Astreams.json"
			},
			{
				"name": "dpf:GF6_210621_rpcortho1",
				"href": "http://localhost:8080/geoserver/rest/layers/dpf%3AGF6_210621_rpcortho1.json"
			}
		]
	}
}

/geoserver/查询所有已缓存的图层

暂无描述

接口状态

开发中

接口URL

localhost:8080/geoserver/gwc/rest/layers.json

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

成功响应示例

[
	"nurc:Pk50095",
	"spearfish",
	"sf:restricted",
	"nurc:Img_Sample",
	"tasmania",
	"sf:archsites",
	"tiger-ny",
	"topp:states",
	"topp:tasmania_state_boundaries",
	"nurc:Arc_Sample",
	"dpf:GF6_210621_rpcortho1",
	"sf:bugsites",
	"tiger:giant_polygon",
	"topp:tasmania_water_bodies",
	"topp:tasmania_cities",
	"tiger:poly_landmarks",
	"sf:sfdem",
	"nurc:mosaic",
	"tiger:tiger_roads",
	"tiger:poi",
	"topp:tasmania_roads",
	"sf:streams",
	"sf:roads"
]

/geoserver/查询wmts图层详情

暂无描述

接口状态

已完成

接口URL

localhost:8080/geoserver/gwc/rest/layers/dpf:nanjing.json

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

/geoserver/gwc图层切片

暂无描述

接口状态

已完成

接口URL

http://localhost:8080/geoserver/gwc/rest/seed/dpf:GF6_210621_rpcortho1.json

请求方式

POST

Content-Type

json

请求Body参数

{
	"seedRequest": {
		"name": "dpf:GF6_210621_rpcortho1",
		"bounds": {
			"coords": {
				"double": ["-124.0", "22.0", "66.0", "72.0"]
			}
		},
		"srs": {
			"number": 4326
		},
		"zoomStart": 1,
		"zoomStop": 12,
		"format": "image/png",
		"type": "truncate",
		"threadCount": 4
	}
}

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

/geoserver/删除workspace

暂无描述

接口状态

已完成

接口URL

localhost:8080/geoserver/rest/workspaces/lxf

请求方式

DELETE

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

/geoserver/创建workspace

暂无描述

接口状态

已完成

接口URL

http://localhost:8080/geoserver/rest/workspaces?default=false

请求方式

POST

Content-Type

xml

请求Query参数

参数名 示例值 参数类型 是否必填 参数描述
default false Text -

请求Body参数

<?xml version="1.0" encoding="UTF-8"?>
<workspace>
	<name>lxf</name>
</workspace>

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

/geoserver/查询wmts图层详情

暂无描述

接口状态

已完成

接口URL

localhost:8080/geoserver/gwc/rest/layers/tiger:giant_polygon.json

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

成功响应示例

{
	"GeoServerLayer": {
		"expireClients": 0,
		"gutter": 0,
		"expireCache": 0,
		"parameterFilters": [
			{
				"defaultValue": "",
				"key": "STYLES"
			}
		],
		"metaWidthHeight": [
			4,
			4
		],
		"cacheWarningSkips": [],
		"name": "tiger:giant_polygon",
		"inMemoryCached": true,
		"mimeFormats": [
			"image/png",
			"image/jpeg"
		],
		"id": "LayerInfoImpl--570ae188:124761b8d78:-7fd2",
		"gridSubsets": [
			{
				"gridSetName": "EPSG:4326"
			},
			{
				"gridSetName": "EPSG:900913"
			}
		],
		"enabled": true
	}
}

错误响应示例

Unknown layer: dpf:nanjing

/geoserver/查询已经发布的wmts图层

暂无描述

接口状态

已完成

接口URL

localhost:8080/geoserver/gwc/rest/layers.json

请求方式

GET

Content-Type

form-data

预执行脚本

暂无预执行脚本

后执行脚本

暂无后执行脚本

成功响应示例

[
	"nurc:Pk50095",
	"spearfish",
	"sf:restricted",
	"nurc:Img_Sample",
	"tasmania",
	"sf:archsites",
	"tiger-ny",
	"topp:states",
	"topp:tasmania_state_boundaries",
	"nurc:Arc_Sample",
	"dpf:GF6_210621_rpcortho1",
	"sf:bugsites",
	"tiger:giant_polygon",
	"topp:tasmania_water_bodies",
	"topp:tasmania_cities",
	"tiger:poly_landmarks",
	"sf:sfdem",
	"nurc:mosaic",
	"tiger:tiger_roads",
	"tiger:poi",
	"topp:tasmania_roads",
	"sf:streams",
	"sf:roads"
]
posted @ 2022-05-13 10:28  iminifly  阅读(451)  评论(0编辑  收藏  举报