openapi: 3.1.0
info:
  title: Drainage Services Department — Flooding Blackspots
  version: csdi-native-readonly-v1
  description: Deterministic derivative of retained native CSDI metadata. Read-only GET operations are selected only where native capabilities and protocol documentation support them. Publisher originals remain separate. Successful metadata retrieval does not prove current data-query success, complete response fields or all layer combinations.
paths:
  /server/rest/services/common/dsd_rcd_1728891975004_392/FeatureServer/{layerId}/query:
    get:
      operationId: ArcgisFeatureServerQueryFeatures
      tags:
        - ArcGIS REST
      summary: Query published features
      description: Read-only GET query follows the source-advertised Query capability. One parameterized operation covers all queryable layers. Metadata field types are declared without inventing universally required attributes. Omitted f may produce the native REST default representation, which is not asserted as a JSON payload.
      parameters:
        - name: layerId
          in: path
          required: true
          description: Published queryable layer or table. Values are publisher identifiers; examples are choices, not a closed enumeration. The full ID/title directory is in x-csdi-layer-choices.
          schema:
            type: integer
          examples:
            choice1:
              summary: FloodingBlackspots
              value: 0
          x-choice-count: 1
        - name: f
          in: query
          required: false
          description: Advertised query representation. Supply this selector for the represented JSON/GeoJSON/PBF responses.
          schema:
            type: string
            enum:
              - json
              - geojson
              - pbf
          example: json
        - name: where
          in: query
          required: false
          description: SQL WHERE expression over the published fields; source protocol supports this read-only query filter.
          schema:
            type: string
          example: 1=1
        - name: outFields
          in: query
          required: false
          description: Comma-separated source field names, or *. Field schemas are conditional on the selected layer and returned fields.
          schema:
            type: string
          example: "*"
        - name: returnGeometry
          in: query
          required: false
          description: Whether native feature geometry should be included.
          schema:
            type: boolean
          example: false
        - name: resultRecordCount
          in: query
          required: false
          description: Bound returned records where the selected layer advertises pagination; no global range is inferred.
          schema:
            type: integer
          example: 1
          x-supported-layer-ids:
            - 0
      responses:
        "200":
          description: Native publisher response; protocol or business errors may also be returned. Metadata connection and actual data-query success are separate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ArcgisFeatureServerArcgisJsonEnvelope"
            application/geo+json:
              schema:
                $ref: "#/components/schemas/ArcgisFeatureServerArcgisGeoJson"
            application/x-protobuf:
              schema:
                type: string
                format: binary
      externalDocs:
        url: https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/
      servers:
        - url: https://portal.csdi.gov.hk
      x-native-source-evidence:
        - url: https://portal.csdi.gov.hk/server/rest/services/common/dsd_rcd_1728891975004_392/FeatureServer?f=pjson
          sha256: 626a430a385c570ebb831d75d4104919ca3fce85b1689342d8a274576ad97562
          httpStatus: 200
          contentType: text/plain;charset=UTF-8
          role: arcgis-service
          parseStatus: pass
          kind: arcgis-service
        - url: https://portal.csdi.gov.hk/server/rest/services/common/dsd_rcd_1728891975004_392/FeatureServer/0?f=pjson
          sha256: 5e30b35180ba4ae6fa9fba761e2467c1b1126a6c396f72fda612218539684947
          httpStatus: 200
          contentType: text/plain;charset=UTF-8
          role: arcgis-layer
          parseStatus: pass
          kind: arcgis-layer
  /server/services/common/dsd_rcd_1728891975004_392/MapServer/WFSServer:
    get:
      operationId: WfsMapServerGetFeature
      tags:
        - WFS
      summary: Retrieve published features
      description: One read-only GET operation selects published feature types by name. Attribute types derive from retained DescribeFeatureType XSD when available; missing XSD, geometry, unread response data and unknown fields remain explicit limitations.
      parameters:
        - name: service
          in: query
          required: true
          description: OGC service identifier.
          schema:
            type: string
            enum:
              - WFS
          example: WFS
        - name: version
          in: query
          required: true
          description: Exact capabilities version.
          schema:
            type: string
            enum:
              - 2.0.0
          example: 2.0.0
        - name: request
          in: query
          required: true
          description: Read-only operation advertised by GetCapabilities.
          schema:
            type: string
            enum:
              - GetFeature
          example: GetFeature
        - name: typeNames
          in: query
          required: true
          description: Published feature type names; multiple selections follow the advertised protocol syntax. Values are publisher identifiers; examples are choices, not a closed enumeration. The full ID/title directory is in x-csdi-layer-choices.
          schema:
            type: string
          examples:
            choice1:
              summary: FloodingBlackspots
              value: csdi:FloodingBlackspots
          x-choice-count: 1
        - name: outputFormat
          in: query
          required: false
          description: Advertised native representation; JSON, GML, CSV and images are kept distinct.
          schema:
            type: string
            enum:
              - GML32
              - GML32+ZIP
              - GML32+GZIP
              - application/gml+xml; version=3.2
              - GML3
              - GML3+ZIP
              - GML3+GZIP
              - text/xml; subtype=gml/3.1.1
              - GML2
              - GML2+ZIP
              - GML2+GZIP
              - text/xml; subtype=gml/2.1.2
              - GEOJSON
              - GEOJSON+ZIP
              - GEOJSON+GZIP
              - ESRIGEOJSON
              - ESRIGEOJSON+ZIP
              - ESRIGEOJSON+GZIP
              - KML
              - application/vnd.google-earth.kml xml
              - application/vnd.google-earth.kml+xml
              - KMZ
              - application/vnd.google-earth.kmz
              - SHAPE+ZIP
              - CSV
              - CSV+ZIP
              - CSV+GZIP
              - Geopackage
              - Geopackage+ZIP
          example: GEOJSON
        - name: count
          in: query
          required: false
          description: OGC bounded feature limit; example requests one feature without claiming a server-wide bound.
          schema:
            type: integer
          example: 1
        - name: srsName
          in: query
          required: false
          description: Output CRS choices advertised by at least one feature type; support may vary by selected type.
          schema:
            type: string
          example: urn:ogc:def:crs:EPSG::4326
      responses:
        "200":
          description: Native publisher response; protocol or business errors may also be returned. Metadata connection and actual data-query success are separate.
          content:
            application/gml+xml:
              schema:
                type: string
            text/xml:
              schema:
                type: string
            application/json:
              schema:
                $ref: "#/components/schemas/WfsMapServerWfsFeatureCollection"
            application/geo+json:
              schema:
                $ref: "#/components/schemas/WfsMapServerWfsFeatureCollection"
            application/vnd.google-earth.kml+xml:
              schema:
                type: string
            "*/*":
              schema:
                description: Native Geopackage+ZIP output; wire media type/fields are not constrained.
            text/csv:
              schema:
                type: string
                description: Native CSV; row/column wire conformance is not inferred from JSON schemas.
      externalDocs:
        url: https://docs.ogc.org/is/09-025r2/09-025r2.html
      x-advertised-crss:
        - urn:ogc:def:crs:EPSG::4326
      servers:
        - url: https://portal.csdi.gov.hk
      x-native-source-evidence:
        - url: https://portal.csdi.gov.hk/server/services/common/dsd_rcd_1728891975004_392/MapServer/WFSServer?service=wfs&request=GetCapabilities
          sha256: 585031c498c552bac063ee2151f123ad1cffeaecbada318e86ba6f09f02516f8
          httpStatus: 200
          contentType: text/xml;charset=UTF-8
          role: wfs-capabilities
          parseStatus: pass
          kind: wfs-capabilities
components:
  schemas:
    ArcgisFeatureServerArcgisLayer0Attributes:
      type: object
      properties:
        RECORD_ID:
          description: "Publisher field type: esriFieldTypeString"
          title: RECORD_ID
          type:
            - string
            - "null"
          maxLength: 20
        LOCATION_EN:
          description: "Publisher field type: esriFieldTypeString"
          title: LOCATION_EN
          type:
            - string
            - "null"
          maxLength: 52
        LOCATION_TC:
          description: "Publisher field type: esriFieldTypeString"
          title: LOCATION_TC
          type:
            - string
            - "null"
          maxLength: 50
        LOCATION_SC:
          description: "Publisher field type: esriFieldTypeString"
          title: LOCATION_SC
          type:
            - string
            - "null"
          maxLength: 50
        DISTRICT_EN:
          description: "Publisher field type: esriFieldTypeString"
          title: DISTRICT_EN
          type:
            - string
            - "null"
          maxLength: 13
        DISTRICT_TC:
          description: "Publisher field type: esriFieldTypeString"
          title: DISTRICT_TC
          type:
            - string
            - "null"
          maxLength: 9
        DISTRICT_SC:
          description: "Publisher field type: esriFieldTypeString"
          title: DISTRICT_SC
          type:
            - string
            - "null"
          maxLength: 9
        SHAPE:
          description: "Publisher field type: esriFieldTypeString"
          title: SHAPE
          type:
            - string
            - "null"
          maxLength: 5
        LATITUDE:
          description: "Publisher field type: esriFieldTypeDouble"
          title: LATITUDE
          type:
            - number
            - "null"
        LONGITUDE:
          description: "Publisher field type: esriFieldTypeDouble"
          title: LONGITUDE
          type:
            - number
            - "null"
        FLOODING_BLACKSPOT_SCALE:
          description: "Publisher field type: esriFieldTypeString"
          title: FLOODING_BLACKSPOT_SCALE
          type:
            - string
            - "null"
          maxLength: 20
        CAUSE_OF_FLOODING_EN:
          description: "Publisher field type: esriFieldTypeString"
          title: CAUSE_OF_FLOODING_EN
          type:
            - string
            - "null"
          maxLength: 70
        CAUSE_OF_FLOODING_TC:
          description: "Publisher field type: esriFieldTypeString"
          title: CAUSE_OF_FLOODING_TC
          type:
            - string
            - "null"
          maxLength: 49
        CAUSE_OF_FLOODING_SC:
          description: "Publisher field type: esriFieldTypeString"
          title: CAUSE_OF_FLOODING_SC
          type:
            - string
            - "null"
          maxLength: 49
        RESPONSIBLE_DIVISION_EN:
          description: "Publisher field type: esriFieldTypeString"
          title: RESPONSIBLE_DIVISION_EN
          type:
            - string
            - "null"
          maxLength: 21
        RESPONSIBLE_DIVISION_TC:
          description: "Publisher field type: esriFieldTypeString"
          title: RESPONSIBLE_DIVISION_TC
          type:
            - string
            - "null"
          maxLength: 27
        RESPONSIBLE_DIVISION_SC:
          description: "Publisher field type: esriFieldTypeString"
          title: RESPONSIBLE_DIVISION_SC
          type:
            - string
            - "null"
          maxLength: 27
        YEAR_FIRST_APPEARED:
          description: "Publisher field type: esriFieldTypeString"
          title: YEAR_FIRST_APPEARED
          type:
            - string
            - "null"
          maxLength: 20
        COMMISSIONING_DATE_OF_DRAINAGE_IMPROVEMENT_WORKS_EN:
          description: "Publisher field type: esriFieldTypeString"
          title: COMMISSIONING_DATE_OF_DRAINAGE_IMPROVEMENT_WORKS_EN
          type:
            - string
            - "null"
          maxLength: 54
        COMMISSIONING_DATE_OF_DRAINAGE_IMPROVEMENT_WORKS_TC:
          description: "Publisher field type: esriFieldTypeString"
          title: COMMISSIONING_DATE_OF_DRAINAGE_IMPROVEMENT_WORKS_TC
          type:
            - string
            - "null"
          maxLength: 46
        COMMISSIONING_DATE_OF_DRAINAGE_IMPROVEMENT_WORKS_SC:
          description: "Publisher field type: esriFieldTypeString"
          title: COMMISSIONING_DATE_OF_DRAINAGE_IMPROVEMENT_WORKS_SC
          type:
            - string
            - "null"
          maxLength: 46
        SHORT_TERM_MITIGATION_MEASURES_EN:
          description: "Publisher field type: esriFieldTypeString"
          title: SHORT_TERM_MITIGATION_MEASURES_EN
          type:
            - string
            - "null"
          maxLength: 552
        SHORT_TERM_MITIGATION_MEASURES_TC:
          description: "Publisher field type: esriFieldTypeString"
          title: SHORT_TERM_MITIGATION_MEASURES_TC
          type:
            - string
            - "null"
          maxLength: 395
        SHORT_TERM_MITIGATION_MEASURES_SC:
          description: "Publisher field type: esriFieldTypeString"
          title: SHORT_TERM_MITIGATION_MEASURES_SC
          type:
            - string
            - "null"
          maxLength: 395
        LONG_TERM_MITIGATION_MEASURES_EN:
          description: "Publisher field type: esriFieldTypeString"
          title: LONG_TERM_MITIGATION_MEASURES_EN
          type:
            - string
            - "null"
          maxLength: 166
        LONG_TERM_MITIGATION_MEASURES_TC:
          description: "Publisher field type: esriFieldTypeString"
          title: LONG_TERM_MITIGATION_MEASURES_TC
          type:
            - string
            - "null"
          maxLength: 182
        LONG_TERM_MITIGATION_MEASURES_SC:
          description: "Publisher field type: esriFieldTypeString"
          title: LONG_TERM_MITIGATION_MEASURES_SC
          type:
            - string
            - "null"
          maxLength: 182
        REMARK_EN:
          description: "Publisher field type: esriFieldTypeString"
          title: REMARK_EN
          type:
            - string
            - "null"
          maxLength: 53
        REMARK_TC:
          description: "Publisher field type: esriFieldTypeString"
          title: REMARK_TC
          type:
            - string
            - "null"
          maxLength: 18
        REMARK_SC:
          description: "Publisher field type: esriFieldTypeString"
          title: REMARK_SC
          type:
            - string
            - "null"
          maxLength: 18
        OBJECTID:
          description: "Publisher field type: esriFieldTypeOID"
          title: OBJECTID
          type: integer
      additionalProperties: true
    ArcgisFeatureServerArcgisFeatureSet:
      type: object
      properties:
        features:
          type: array
          items:
            type: object
            properties:
              attributes:
                $ref: "#/components/schemas/ArcgisFeatureServerArcgisLayer0Attributes"
              geometry:
                description: Native geometry and spatial reference are not constrained by attribute metadata.
            additionalProperties: true
        exceededTransferLimit:
          type: boolean
      additionalProperties: true
    ArcgisFeatureServerArcgisGeoJson:
      type: object
      properties:
        type:
          type: string
        features:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              properties:
                $ref: "#/components/schemas/ArcgisFeatureServerArcgisLayer0Attributes"
              geometry:
                description: Geometry representation is not constrained by the retained attribute metadata.
            additionalProperties: true
      additionalProperties: true
    ArcgisFeatureServerArcgisJsonEnvelope:
      type: object
      properties:
        type:
          type: string
        features:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              attributes:
                $ref: "#/components/schemas/ArcgisFeatureServerArcgisLayer0Attributes"
              properties:
                $ref: "#/components/schemas/ArcgisFeatureServerArcgisLayer0Attributes"
              geometry:
                description: Geometry is not constrained by attribute metadata.
            additionalProperties: true
        exceededTransferLimit:
          type: boolean
      additionalProperties: true
    WfsMapServerWfsFeatureCollection:
      type: object
      properties:
        type:
          type: string
        features:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              properties:
                description: DescribeFeatureType attribute declarations unavailable; record fields remain unknown.
              geometry:
                description: Geometry representation is not constrained by the retained attribute metadata.
            additionalProperties: true
      additionalProperties: true
externalDocs:
  url: https://portal.csdi.gov.hk/csdi-webpage/doc/GeoSpatialServices
x-csdi-layer-choices:
  - id: 0
    title: FloodingBlackspots
    protocol: arcgis
  - id: csdi:FloodingBlackspots
    title: FloodingBlackspots
    protocol: wfs
x-csdi-source-evidence:
  - url: https://portal.csdi.gov.hk/geoportal/csw?service=CSW&version=2.0.2&request=GetRecordById&elementSetName=full&id=dsd_rcd_1728891975004_392
    sha256: dcc5f831b7941f87a44a4c5e07e8ac6f2230ee32b8c5ad65b0f59e115911d4fd
    httpStatus: 200
    contentType: application/xml;charset=UTF-8
    role: csw-record
    parseStatus: pass
    kind: csw-record
  - url: https://portal.csdi.gov.hk/server/rest/services/common/dsd_rcd_1728891975004_392/FeatureServer?f=pjson
    sha256: 626a430a385c570ebb831d75d4104919ca3fce85b1689342d8a274576ad97562
    httpStatus: 200
    contentType: text/plain;charset=UTF-8
    role: arcgis-service
    parseStatus: pass
    kind: arcgis-service
  - url: https://portal.csdi.gov.hk/server/rest/services/common/dsd_rcd_1728891975004_392/FeatureServer/0?f=pjson
    sha256: 5e30b35180ba4ae6fa9fba761e2467c1b1126a6c396f72fda612218539684947
    httpStatus: 200
    contentType: text/plain;charset=UTF-8
    role: arcgis-layer
    parseStatus: pass
    kind: arcgis-layer
  - url: https://portal.csdi.gov.hk/server/services/common/dsd_rcd_1728891975004_392/MapServer/WFSServer?service=wfs&request=GetCapabilities
    sha256: 585031c498c552bac063ee2151f123ad1cffeaecbada318e86ba6f09f02516f8
    httpStatus: 200
    contentType: text/xml;charset=UTF-8
    role: wfs-capabilities
    parseStatus: pass
    kind: wfs-capabilities
x-csdi-source-scope:
  partialProtocols:
    - serviceId: csdi-service-340dbaffe115b27b5d7619c2
      code: discovery_metadata_error
      reason: No retained response; cache-only mode performs no HTTP request
      url: https://portal.csdi.gov.hk/server/services/common/dsd_rcd_1728891975004_392/MapServer/WFSServer?service=wfs&version=2.0.0&request=DescribeFeatureType&typeNames=csdi%3AFloodingBlackspots
    - code: metadata_http_not_200
      url: https://portal.csdi.gov.hk/server/services/common/dsd_rcd_1728891975004_392/MapServer/WMSServer?service=WMS&request=GetCapabilities
      httpStatus: 403
    - serviceId: csdi-service-f813b776755607007ba7eaff
      code: discovery_metadata_error
      reason: Metadata request status http_error
      url: https://portal.csdi.gov.hk/server/services/common/dsd_rcd_1728891975004_392/MapServer/WMSServer?service=WMS&request=GetCapabilities
    - serviceId: csdi-service-f813b776755607007ba7eaff
      protocol: wms
      code: unsupported_or_incomplete_native_contract
      reason: No retained parseable WMS GetCapabilities
  nativeMetadataStatus:
    status: http_200_retained
    http200Sources: 4
  fullSourceCompleteness: not_established
  actualDataQueriesByConversion: 0
