The RCS JSON SchemaΒΆ
RCS uses a JSON schema to validate registration requests (see RCS v2 Service Contract). The schema is written against draft 04 of JSON Schema and is reproduced below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "RCS Schema",
"description": "An RCS registration request",
"version": "2.0.0",
"defs": {
"metadata": {
"type": "object",
"oneOf": [
{ "properties": { "uuid": { "type": "string" } }, "additionalProperties": false },
{ "properties": { "metadata_url": { "type": "string" }, "catalogue_url": { "type": "string" } }, "additionalProperties": false }
]
},
"service": {
"type": "object",
"properties": {
"service_url": { "type": "string" },
"service_name": { "type": "string" },
"metadata": { "$ref": "#/defs/metadata" }
},
"required": [ "service_url" ]
},
"service_node": {
"oneOf": [
{ "$ref": "#/defs/basic_node" },
{ "$ref": "#/defs/feature_node" },
{ "$ref": "#/defs/imagery_node" },
{ "$ref": "#/defs/ogc_node" },
{ "$ref": "#/defs/esri_map_node" }
]
},
"basic_node": {
"type": "object",
"properties": {
"service_url": { "type": "string" },
"service_name": { "type": "string" },
"metadata": { "$ref": "#/defs/metadata" }
},
"required": [ "service_url" ],
"additionalProperties": false
},
"feature_node": {
"type": "object",
"properties": {
"service_url": { "type": "string", "description": "The service endpoint URL" },
"service_name": { "type": "string", "description": "Name of the service endpoint, used for display" },
"metadata": { "$ref": "#/defs/metadata" },
"service_type": { "type": "string", "enum": ["esriFeature"], "description": "Service type of the endpoint" },
"display_field": { "type": "string", "description": "Default attribute for identifying features" },
"loading_mode": { "type": "string", "enum": ["ondemand","snapshot"], "description": "Specifies the layer loading mode: either snapshot (load all data upfront) or ondemand (load data as needed); when not specified RCS will probe the service and make an intelligent guesss" },
"max_allowable_offset": { "type": "integer", "minimum": 0, "description": "Simplification factor for the layer geometry; may be omitted in which case no value will be provided in the output leaving the viewer to apply its own logic." },
"tolerance": { "type": "integer", "minimum": 0, "default": 5, "description": "Tolerance (in pixels) of feature queries" }
},
"required": [ "service_url", "service_type" ],
"additionalProperties": false
},
"imagery_node": {
"type": "object",
"properties": {
"service_url": { "type": "string", "description": "The service endpoint URL" },
"service_name": { "type": "string", "description": "Name of the service endpoint, used for display" },
"metadata": { "$ref": "#/defs/metadata" },
"service_type": { "type": "string", "enum": ["esriTile", "esriImage"], "description": "Service type of the endpoint" }
},
"required": [ "service_url", "service_type" ],
"additionalProperties": false
},
"ogc_node": {
"type": "object",
"properties": {
"service_url": { "type": "string", "description": "The service endpoint URL" },
"service_name": { "type": "string", "description": "Name of the service endpoint, used for display" },
"metadata": { "$ref": "#/defs/metadata" },
"service_type": { "type": "string", "enum": ["ogcWms", "ogcWmts"], "description": "Service type of the endpoint" },
"scrape_only": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "description": "If specified it indicates which Layer entries should be scraped by the RCS; all Layers should be identfied by their Name element. When it is omitted RCS will attempt to scrape all Layer elements containing a Name entry." },
"recursive": { "type": "boolean", "default": false, "description": "Indicates if children should be scraped by the RCS and may be made available as individual layers to the viewer (the endpoints necessary will not be available with the release of the new RCS)."},
"legend_format": { "type": "string" },
"feature_info_format": { "type": "string", "enum": [ "text/html;fgpv=summary", "text/html", "text/plain", "application/json" ], "description": "If specified indicates that GetFeatureInfo should be enabled for this WMS and indicates the format that should be requested." }
},
"required": [ "service_url", "service_type" ],
"additionalProperties": false
},
"esri_map_node": {
"type": "object",
"properties": {
"service_url": { "type": "string", "description": "The service endpoint URL" },
"service_name": { "type": "string", "description": "Name of the service endpoint, used for display" },
"metadata": { "$ref": "#/defs/metadata" },
"service_type": { "type": "string", "enum": ["esriMapServer", "esriFeatureServer"], "description": "Service type of the endpoint" },
"scrape_only": { "type": "array", "items": { "type": "integer", "minimum": 0 }, "minItems": 1, "description": "If specified it indicates which indexes should be scraped by the RCS. When it is omitted RCS will attempt to scrape all indexes within the endpoint." },
"recursive": { "type": "boolean", "default": false, "description": "Indicates if children should be scraped by the RCS and may be made available as individual layers to the viewer (the endpoints necessary will not be available with the release of the new RCS)."}
},
"required": [ "service_url", "service_type" ],
"additionalProperties": false
}
},
"properties": {
"version": { "type": "string", "enum": [ "2.0" ] },
"en": {"$ref": "#/defs/service_node"},
"fr": {"$ref": "#/defs/service_node"}
},
"required": ["version", "en", "fr"],
"additionalProperties": false
}
|
A sample request:
{
"version": "2.0",
"fr": {
"service_url": "http://section917.cloudapp.net/arcgis/rest/services/TestData/ClassBreaks/MapServer/0",
"service_type": "esriFeature",
"service_name": "Sea Parks",
"metadata": {
"catalogue_url": "https://gcgeo.gc.ca/geonetwork/metadata/fra/ce7873ff-fbc0-4864-946e-6a1b4d739154",
"metadata_url": "https://gcgeo.gc.ca/geonetwork/srv/fra/xml.metadata.download?uuid=ce7873ff-fbc0-4864-946e-6a1b4d739154&fromWorkspace="
}
},
"en": {
"service_url": "http://section917.cloudapp.net/arcgis/rest/services/TestData/ClassBreaks/MapServer/0",
"service_type": "esriFeature",
"service_name": "Sea Parks",
"metadata": {
"catalogue_url": "https://gcgeo.gc.ca/geonetwork/metadata/eng/ce7873ff-fbc0-4864-946e-6a1b4d739154",
"metadata_url": "https://gcgeo.gc.ca/geonetwork/srv/eng/xml.metadata.download?uuid=ce7873ff-fbc0-4864-946e-6a1b4d739154&fromWorkspace="
}
}
}