Create a attribute
METHOD: POST
ENDPOINT: /api/v2/attributes/
AUTHENTICATED: No
The request body is a JSON representation of the attribute being created.
The "form_group" is required when creating an attribute, since attribute creation without a group isn't very useful. However attributes can be in multiple forms/groups, and can be orphaned later when a group is removed.
POST https://ushv3.dev/api/v2/attributes
|
Listing all attributes
METHOD: GET
ENDPOINT: /api/v2/attributes/
AUTHENTICATED: No
Name | Type | Description |
---|---|---|
q | Optional | Only attributes containing this search string will be returned, matched against 'tag' property |
type | Optional | Only attributes of this type will be returned: report, revision, comment or alert |
order | Optional | Returned attributes will be sorted in this order: ASC or DESC. Default: DESC |
order_by | Optional | Returned attributes will be sorted by this field. Default: created |
limit | Optional | Limit number of results returned. Default: 50. Max: 500 |
offset | Optional | attributes returned will be offset by this number of results |
GET https://ushv3.dev/api/v2/attributes
|
Get a single attribute
METHOD: GET
ENDPOINT: /api/v2/attributes/:id
AUTHENTICATED: Yes
Name | Type | Description |
---|---|---|
id | Required | The numerical id of the attribute being updated. |
GET http://ushv3.dev/api/v2/attributes/1
|
Update a attribute
METHOD: PUT
ENDPOINT: /api/v2/attributes/:id
AUTHENTICATED: Yes
Note: form_group isn't required or used when updating an attribute. To add/remove attributes from groups use the Groups api resource.
Name | Type | Description |
---|---|---|
id | Required | The numerical id of the attribute being updated. |
PUT http://ushv3.dev/api/v2/attributes/1
|
Deleting a attribute
METHOD: DELETE
ENDPOINT: /api/v2/attributes/:id
AUTHENTICATED: YES
Name | Type | Description |
---|---|---|
id | Required | The numerical id of the attribute being deleted. |
DELETE api/v2/attributes/2
|