aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/bruno/configuration/typology/01-create.bru
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bruno/configuration/typology/01-create.bru')
-rw-r--r--contrib/bruno/configuration/typology/01-create.bru69
1 files changed, 69 insertions, 0 deletions
diff --git a/contrib/bruno/configuration/typology/01-create.bru b/contrib/bruno/configuration/typology/01-create.bru
new file mode 100644
index 0000000..e57a370
--- /dev/null
+++ b/contrib/bruno/configuration/typology/01-create.bru
@@ -0,0 +1,69 @@
+meta {
+ name: 01-create
+ type: http
+ seq: 1
+}
+
+post {
+ url: {{WARDEN_CFG_HOST}}/api/{{WARDEN_CFG_VERSION}}/typology
+ body: json
+ auth: inherit
+}
+
+body:json {
+ {
+ "description": "Test description",
+ "typology_name": "Rule-901-Typology-999",
+ "id": "999",
+ "version": "1.0.0",
+ "workflow": {
+ "alert_threshold": 200,
+ "interdiction_threshold": 400
+ },
+ "rules": [
+ {
+ "id": "901",
+ "version": "1.0.0",
+ "wghts": [
+ {
+ "ref": ".err",
+ "wght": 0
+ },
+ {
+ "ref": ".x00",
+ "wght": 100
+ },
+ {
+ "ref": ".01",
+ "wght": 100
+ },
+ {
+ "ref": ".02",
+ "wght": 200
+ },
+ {
+ "ref": ".03",
+ "wght": 400
+ }
+ ]
+ }
+ ],
+ "expression": {
+ "operator": "ADD",
+ "terms": [
+ {
+ "id": "901",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ }
+}
+
+assert {
+ res.status: eq 201
+}
+
+settings {
+ encodeUrl: true
+}