blob: 8e8303756594499806502c2b20d7699333b7b0d6 [file] [log] [blame]
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
A simple web service used by Buffet to test interactions with a
device server. Implements basic functionality for registration, device commands
and state changes.
To start the test server yourself, run Otherwise, exposes
start_server/stop_server methods.
To test locally:
# Register a device.
curl -X POST -d "" http://localhost:8080/buffet/registrationTickets
curl -X PATCH -d '{"userEmail": "me"}' -H "Authorization: Bearer 1/TEST-ME" \
curl -X POST -d "" \
# List devices
curl -X GET -d "" http://localhost:8080/buffet/devices
# Send your device a command.
curl -X POST -d '{"base": { "Reboot": {}}' http://localhost:8080/buffet/devices\
# Update the status of your command
curl -X PATCH -d '{"state": "done"}' http://localhost:8080/buffet/devices/\