Class: QgsServerOgcApi

class qgis.server.QgsServerOgcApi(serverIface: QgsServerInterface, rootPath: str, name: str, description: str = '', version: str = '')

Bases: qgis._server.QgsServerApi

QgsServerOgcApi constructor

Parameters
  • serverIface – pointer to the server interface

  • rootPath – root path for this API (usually starts with a “/”, e.g. “/wfs3”)

  • name – API name

  • description – API description

  • version – API version

QgsServerOgcApi(QgsServerOgcApi)

QGIS Server OGC API endpoint. QgsServerOgcApi provides the foundation for the new generation of REST-API based OGC services (e.g. WFS3).

This class can be used directly and configured by registering handlers as instances of QgsServerOgcApiHandler.


New in version 3.10: Enums

Methods

contenTypeFromExtension

Returns the Content-Type value corresponding to extension.

contentTypeToExtension

Returns the file extension for a ct (Content-Type).

contentTypeToStdString

Returns the string representation of a ct (Content-Type) attribute.

contentTypeToString

Returns the string representation of a ct (Content-Type) attribute.

description

executeRequest

Executes a request by passing the given context to the API handlers.

mimeType

Returns the mime-type for the contentType or an empty string if not found

name

registerHandler

Registers an OGC API handler, ownership of the handler is transferred to the API

relToString

Returns the string representation of rel attribute.

rootPath

sanitizeUrl

Returns a sanitized url with extra slashes removed

version

Signals

Attributes

GEOJSON

HTML

JSON

OPENAPI3

alternate

collection

conformance

data

describedBy

item

items

license

next

prev

self

service_desc

service_doc

staticMetaObject

class ContentType

Bases: int

baseClass

alias of QgsServerOgcApi

GEOJSON = 0
HTML = 3
JSON = 2
OPENAPI3 = 1
class Rel

Bases: int

baseClass

alias of QgsServerOgcApi

alternate = 0
collection = 2
conformance = 11
contenTypeFromExtension(extension: object) → QgsServerOgcApi.ContentType

Returns the Content-Type value corresponding to extension.

contentTypeToExtension(ct: QgsServerOgcApi.ContentType) → str

Returns the file extension for a ct (Content-Type).

contentTypeToStdString(ct: QgsServerOgcApi.ContentType) → object

Returns the string representation of a ct (Content-Type) attribute.

contentTypeToString(ct: QgsServerOgcApi.ContentType) → str

Returns the string representation of a ct (Content-Type) attribute.

data = 12
describedBy = 1
description(self) → str
executeRequest(self, context: QgsServerApiContext)

Executes a request by passing the given context to the API handlers.

item = 3
items = 10
license = 9
mimeType(contentType: QgsServerOgcApi.ContentType) → object

Returns the mime-type for the contentType or an empty string if not found

name(self) → str
next = 8
prev = 7
registerHandler(self, handler: QgsServerOgcApiHandler)

Registers an OGC API handler, ownership of the handler is transferred to the API

relToString(rel: QgsServerOgcApi.Rel) → object

Returns the string representation of rel attribute.

rootPath(self) → str
sanitizeUrl(url: QUrl) → QUrl

Returns a sanitized url with extra slashes removed

self = 4
service_desc = 5
service_doc = 6
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
version(self) → str