- Created by Ramya Raman on Feb 09, 2022
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Current »
GET penalty_box/config
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Returns a list of all penalty box config in the system, with its main configuration data.
Resource URL
https://{{ip_address}}:{{port}}/api/{{version}}/penalty_box/config
Example Request
GET
{ "data": [ { "uuid": "d263f9ea-1fc1-49e4-93f2-59a5594262f1", "label": "Example", "created": "2022-01-06T14:16:35.217Z", "modified": "2022-02-08T12:23:29.309Z", "sources": [], "destinations": [], "attributes": { "min_display_time": 20, "decay_after_clear": 20, "severities": [] } }, { "uuid": "f5affdbd-4a94-47a1-863d-9bec3a179413", "label": "test", "created": "2021-11-25T14:07:35.021Z", "modified": "2022-02-08T12:23:29.309Z", "sources": [ { "channel": "f71bf69e-8a34-421e-a0a5-b2366c4cad8a" }, { "channel": "c2a4fbdb-4dcb-49e7-8ecf-04fad2d9f414" }, { "channel": "0b3b3b4d-f950-4093-acda-3149db3943fa" }, { "channel": "a674fd3d-f8e5-4bb1-88ad-85771a6eb440" } ], "destinations": [], "attributes": { "min_display_time": 20, "decay_after_clear": 20, "severities": [] } } ], "metadata": { "item_count": 2, "total_items": 2, "current_page": 1, "sort_by": [ { "field": "label", "direction": "ASC" } ], "links": { "current": "http://192.168.10.53/api/5.0/penalty_box/config" } } }
GET penalty_box/config/{uuid}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | GET |
Returns an extended single penalty box configuration view, specified by the required {uuid} parameter.
Resource URL
https://{{ip_address}}:{{port}}/api/{{version}}/penalty_box/config/{{uuid}}
Parameters
Parameter | Data Type | Description |
---|---|---|
uuid | string | The UUID of the desired penalty box. |
Example Request
GET
{ "data": { "uuid": "d263f9ea-1fc1-49e4-93f2-59a5594262f1", "label": "Example", "created": "2022-01-06T14:16:35.217Z", "modified": "2022-02-08T12:23:29.309Z", "sources": [], "destinations": [], "attributes": { "min_display_time": 20, "decay_after_clear": 20, "severities": [] } }, "metadata": {} }
DELETE penalty_box/config/{uuid}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | DELETE |
Delete a specific penalty box configuration.
Resource URL
https://{{ip_address}}:{{port}}/api/{{version}}/penalty_box/config/{{uuid}}
Parameters
Parameter | Data Type | Description |
---|---|---|
uuid | string | The UUID of the penalty box to be deleted. |
Example Request
DELETE
{ "data": { "success": true }, "metadata": {} }
PUT penalty_box/config/{uuid}
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | PUT |
Edit a penalty box configuration.
Resource URL
https://{{ip_address}}:{{port}}/api/{{version}}/penalty_box/config/{{uuid}}
Parameters
Parameter | Data Type | Description |
---|---|---|
uuid | byte | The UUID of the penalty box to be edited. |
Example Request
PUT
Body
{ "label": "test_pen_box_edited", "sources": [ { "channel": "f71bf69e-8a34-421e-a0a5-b2366c4cad8a" } ], "destinations": [ { "layout": "dad49ce7-91e2-4846-9373-80150faa5816", "index": 2 } ], "attributes": { "min_display_time": 20, "decay_after_clear": 20, "severities": [] } }
Response
{ "data": { "uuid": "021a905b-ffef-43b1-b458-c73e350214d5", "label": "test_pen_box_edited", "created": "2022-02-08T18:37:51.542Z", "modified": "2022-02-08T18:39:26.076Z", "sources": [ { "channel": "f71bf69e-8a34-421e-a0a5-b2366c4cad8a" } ], "destinations": [ { "layout": "dad49ce7-91e2-4846-9373-80150faa5816", "index": 2 } ], "attributes": { "min_display_time": 20, "decay_after_clear": 20, "severities": [] } }, "metadata": {} }
POST penalty_box/config
Resource Information
Requires Authentication? | |
Response Formats | json |
HTTP Methods | POST |
Add a new penalty box, configured according to the attached data request.
Resource URL
https://{{ip_address}}:{{port}}/api/{{version}}/penalty_box/config
Example Request
POST
Body
{ "label": "test_pen_box", "sources": [ { "channel": "f71bf69e-8a34-421e-a0a5-b2366c4cad8a" } ], "destinations": [ { "layout": "dad49ce7-91e2-4846-9373-80150faa5816", "index": 2 } ], "attributes": { "min_display_time": 20, "decay_after_clear": 20, "severities": [] } }
Response
{ "data": { "uuid": "021a905b-ffef-43b1-b458-c73e350214d5", "label": "test_pen_box", "created": "2022-02-08T18:37:51.542Z", "modified": "2022-02-08T18:37:51.542Z", "sources": [ { "channel": "f71bf69e-8a34-421e-a0a5-b2366c4cad8a" } ], "destinations": [ { "layout": "dad49ce7-91e2-4846-9373-80150faa5816", "index": 2 } ], "attributes": { "min_display_time": 20, "decay_after_clear": 20, "severities": [] } }, "metadata": {} }
- No labels