cyborg/api-ref/source/v2/devices.inc
Xinran Wang 3431a15a10 Finish v2 API doc
Add device, deployable implemented V2 api documentation.

Remove deployable-create-resp.json, deployable-patch-curl.json
deployable-post-curl.json, because
these APIs are removed in V2.

Remove deployable-update-resp.json because this API is still work
in progress, we will update this part of documentation after the
API implementation done.

Change-Id: I45549fc5276c091ca585652b11836b967cb239e3
2020-04-06 15:19:23 +00:00

48 lines
1.0 KiB
ReStructuredText

.. -*- rst -*-
.. needs:body_verification
Devices
+++++++
Lists, shows details for devices.
A `device` represent a physical card like FPGA card or GPU card.
List Devices
------------
.. rest_method:: GET /v2/devices
Lists UUIDs, names, type and more informations for all devices.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403)
**Example response: list all devices**
.. literalinclude:: ../../../doc/api_samples/devices/devices-list-resp.json
:language: javascript
Get One Device
--------------
.. rest_method:: GET /v2/devices/{device_uuid}
Gets the UUID, name, type and more informations for one device with the specified UUID.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403)
Request
=======
.. rest_parameters:: parameters.yaml
- device_uuid: device_uuid
**Example response: show details of a specific device**
.. literalinclude:: ../../../doc/api_samples/devices/devices-getone-resp.json
:language: javascript