Datacenter build and management service
https://github.com/joyent/conch-api/blob/master/lib/Conch/Route/HardwareProduct.pm
Sets up the routes for /hardware_product.
All routes require authentication.
GET /hardware_productPOST /hardware_product201 Created, plus Location headerGET /hardware_product/:hardware_product_id_or_otherIdentifiers accepted: id, sku, name and alias.
POST /hardware_product/:hardware_product_id_or_otherUpdates the indicated hardware product.
Identifiers accepted: id, sku, name and alias.
204 No Content, plus Location headerDELETE /hardware_product/:hardware_product_id_or_otherDeactivates the indicated hardware product, preventing it from being used. All devices using this hardware must be switched to other hardware first.
Identifiers accepted: id, sku, name and alias.
204 No ContentPUT /hardware_product/:hardware_product_id_or_other/specification?path=:path_to_dataSets a specific part of the json blob data in the specification field, treating the URI query
parameter path as the JSON pointer to the data to be added or modified. Existing data at the path
is overwritten without regard to type, so long as the JSON Schema is respected. For example, this
existing specification field and this request:
{
"foo": { "bar": 123 },
"x": { "y": [ 1, 2, 3 ] }
}
PUT /hardware_product/:hardware_product_id_or_other/specification?path=/foo/bar/baz { "hello":1 }
Results in this data in specification, changing the data type at node /foo/bar:
{
"foo": { "bar": { "baz": { "hello": 1 } } },
"x": { "y": [ 1, 2, 3 ] }
}
specification property must validate against
the schema available from GET /json_schema/hardware_product/specification/latest.204 No ContentDELETE /hardware_product/:hardware_product_id_or_other/specification?path=:path_to_dataDeletes a specific part of the json blob data in the specification field, treating the URI query
parameter path as the JSON pointer to the data to be removed. All other properties in the json
blob are left untouched.
After the delete operation, the specification property must validate against
the schema available from GET /json_schema/hardware_product/specification/latest.
204 No ContentGET /hardware/:hardware_product_id_or_other/json_schemaRetrieves a summary of the JSON Schemas configured to be used as validations for the indicated hardware. Note the timestamp and user information are for when the JSON Schema was added for the hardware, not when the schema itself was created.
POST /hardware/:hardware_product_id_or_other/json_schema/:json_schema_idPOST /hardware/:hardware_product_id_or_other/json_schema/:json_schema_type/:json_schema_name/:json_schema_versionAdds the indicated JSON Schema to the list of validations for the indicated hardware.
201 CreatedDELETE /hardware/:hardware_product_id_or_other/json_schema/:json_schema_idDELETE /hardware/:hardware_product_id_or_other/json_schema/:json_schema_type/:json_schema_name/:json_schema_versionRemoves the indicated JSON Schema from the list of validations for the indicated hardware.
204 No ContentDELETE /hardware/:hardware_product_id_or_other/json_schemaRemoves all the JSON Schemas from the list of validations for the indicated hardware.
204 No ContentCopyright 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/.