Add api ref for create of attributes
Change-Id: I6fe61a13a3fb0b99f5400b9cf50c10b9cf10a66e
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
Attributes
|
Attributes
|
||||||
++++++++++
|
++++++++++
|
||||||
|
|
||||||
Lists, shows details for attributes.
|
Lists, shows details, creates for attributes.
|
||||||
|
|
||||||
A `attribute` represents the trait of a physical card like FPGA or GPU.
|
A `attribute` represents the trait of a physical card like FPGA or GPU.
|
||||||
|
|
||||||
@@ -79,3 +79,26 @@ Response
|
|||||||
|
|
||||||
.. literalinclude:: ../../doc/api_samples/attributes/attributes-getone-resp.json
|
.. literalinclude:: ../../doc/api_samples/attributes/attributes-getone-resp.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
Create Attributes
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. rest_method:: POST /v2/attributes
|
||||||
|
|
||||||
|
Creates an attribute. The payload should have the following field:
|
||||||
|
|
||||||
|
Request
|
||||||
|
=======
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- deployable_id: attribute_deployable_id_req
|
||||||
|
- key: attribute_key_req
|
||||||
|
- value: attribute_value_req
|
||||||
|
|
||||||
|
**Example post curl**
|
||||||
|
|
||||||
|
.. literalinclude:: ../../doc/api_samples/attributes/attributes-post-curl.json
|
||||||
|
|
||||||
|
**Example response: create an attribute**
|
||||||
|
|
||||||
|
.. literalinclude:: ../../doc/api_samples/attributes/attributes-create-resp.json
|
||||||
|
@@ -79,6 +79,12 @@ hostname:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
# variables in body
|
# variables in body
|
||||||
|
attribute_deployable_id_req:
|
||||||
|
description: |
|
||||||
|
ID of deployable associated with the attribute.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
attribute_deployable_id_resp:
|
attribute_deployable_id_resp:
|
||||||
description: |
|
description: |
|
||||||
ID of deployable associated with the attribute.
|
ID of deployable associated with the attribute.
|
||||||
@@ -91,6 +97,12 @@ attribute_id_resp:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
|
attribute_key_req:
|
||||||
|
description: |
|
||||||
|
The key of the attribute.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
attribute_key_resp:
|
attribute_key_resp:
|
||||||
description: |
|
description: |
|
||||||
The key of the attribute.
|
The key of the attribute.
|
||||||
@@ -103,6 +115,12 @@ attribute_uuid_resp:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
attribute_value_req:
|
||||||
|
description: |
|
||||||
|
The value of the attribute.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
attribute_value_resp:
|
attribute_value_resp:
|
||||||
description: |
|
description: |
|
||||||
The value of the attribute.
|
The value of the attribute.
|
||||||
|
Reference in New Issue
Block a user