Conch API

Logo

Datacenter build and management service

View the Project on GitHub joyent/conch-api

Conch::Route::JSONSchema

SOURCE

https://github.com/joyent/conch-api/blob/master/lib/Conch/Route/JSONSchema.pm

METHODS

unsecured_routes

Sets up the routes for /json_schema that do not require authentication.

secured_routes

Sets up the routes for /json_schema that require authentication.

ROUTE ENDPOINTS

GET /json_schema/query_params/:json_schema_name

GET /json_schema/request/:json_schema_name

GET /json_schema/response/:json_schema_name

GET /json_schema/common/:json_schema_name

GET /json_schema/device_report/:json_schema_name

Returns the JSON Schema document specified by type and name, used for validating endpoint requests and responses.

POST /json_schema/:json_schema_type/:json_schema_name

Stores a new JSON Schema in the database. Unresolvable $refs are not permitted.

GET /json_schema/:json_schema_id

GET /json_schema/:json_schema_type/:json_schema_name/:json_schema_version

GET /json_schema/:json_schema_type/:json_schema_name/latest

Fetches the referenced JSON Schema document.

DELETE /json_schema/:json_schema_id

DELETE /json_schema/:json_schema_type/:json_schema_name/:json_schema_version

Deactivates the database entry for a single JSON Schema, rendering it unusable. This operation is not permitted until all references from other documents have been removed, exception of references using .../latest which will now resolve to a different document (and internal references will be re-verified).

If this JSON Schema was the latest of its series (/json_schema/foo/bar/latest), then that .../latest link will now resolve to an earlier version in the series.

GET /json_schema/:json_schema_type

GET /json_schema/:json_schema_type/:json_schema_name

Gets meta information about all JSON Schemas in a particular type series, or a type and name series.

Optionally accepts the following query parameter:

LICENSING

Copyright Joyent, Inc.

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://www.mozilla.org/en-US/MPL/2.0/.