# Rules

Rule management and versioning

## POST /api/v1/rules/create

>

```json
{"openapi":"3.1.0","info":{"title":"Rules Service API","version":"1.0.0"},"tags":[{"name":"Rules","description":"Rule management and versioning"}],"servers":[{"url":"https://rules.app.gomboc.ai/"}],"paths":{"/api/v1/rules/create":{"post":{"operationId":"PostApiV1RulesCreate","tags":["Rules"],"requestBody":{"description":"POST /api/v1/rules/create Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostApiV1RulesCreateRequestBody"}}},"required":true},"responses":{"200":{"description":"POST /api/v1/rules/create Positive response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostApiV1RulesCreatePositiveResponse"}}}},"400":{"description":"POST /api/v1/rules/create Negative response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostApiV1RulesCreateNegativeResponse"}}}}}}}},"components":{"schemas":{"PostApiV1RulesCreateRequestBody":{"type":"object","properties":{"type":{"type":"string"},"version":{"type":"string"},"iacLanguage":{"type":"string"},"name":{"type":"string"},"classificationNames":{"type":"array","items":{"type":"string"}},"classifications":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["name"]}},"shortName":{"type":"string"},"annotations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"revisionData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"active":{"default":false,"type":"boolean"}},"required":["type","version","iacLanguage","name"]},"PostApiV1RulesCreatePositiveResponse":{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"type":{"type":"string"},"version":{"type":"string"},"iacLanguage":{"type":"string"},"name":{"type":"string"},"shortName":{"type":["string","null"]},"revision":{"type":"number"},"revisions":{"type":"array","items":{"type":"number"}},"classificationPaths":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"shortName":{"type":["string","null"]}},"required":["accountId","name","shortName"],"additionalProperties":false}}},"annotations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"createdAt":{},"updatedAt":{}},"required":["accountId","type","version","iacLanguage","name","shortName","revision","revisions","id","createdAt","updatedAt"],"additionalProperties":false}},"required":["status","data"],"additionalProperties":false},"PostApiV1RulesCreateNegativeResponse":{"type":"object","properties":{"status":{"type":"string","const":"error"},"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["status","error"],"additionalProperties":false}}}}
```

## GET /api/v1/rules/get

>

```json
{"openapi":"3.1.0","info":{"title":"Rules Service API","version":"1.0.0"},"tags":[{"name":"Rules","description":"Rule management and versioning"}],"servers":[{"url":"https://rules.app.gomboc.ai/"}],"paths":{"/api/v1/rules/get":{"get":{"operationId":"GetApiV1RulesGet","tags":["Rules"],"parameters":[{"name":"name","in":"query","required":true,"description":"GET /api/v1/rules/get Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesGetParameterName"}},{"name":"includeClassifications","in":"query","required":false,"description":"GET /api/v1/rules/get Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesGetParameterIncludeClassifications"}}],"responses":{"200":{"description":"GET /api/v1/rules/get Positive response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetApiV1RulesGetPositiveResponse"}}}},"400":{"description":"GET /api/v1/rules/get Negative response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetApiV1RulesGetNegativeResponse"}}}}}}}},"components":{"schemas":{"GetApiV1RulesGetParameterName":{"type":"string"},"GetApiV1RulesGetParameterIncludeClassifications":{"default":1,"type":"number"},"GetApiV1RulesGetPositiveResponse":{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"type":{"type":"string"},"version":{"type":"string"},"iacLanguage":{"type":"string"},"name":{"type":"string"},"shortName":{"type":["string","null"]},"revision":{"type":"number"},"revisions":{"type":"array","items":{"type":"number"}},"classificationPaths":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"shortName":{"type":["string","null"]}},"required":["accountId","name","shortName"],"additionalProperties":false}}},"annotations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"createdAt":{},"updatedAt":{}},"required":["accountId","type","version","iacLanguage","name","shortName","revision","revisions","id","createdAt","updatedAt"],"additionalProperties":false}},"required":["status","data"],"additionalProperties":false},"GetApiV1RulesGetNegativeResponse":{"type":"object","properties":{"status":{"type":"string","const":"error"},"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["status","error"],"additionalProperties":false}}}}
```

## PUT /api/v1/rules/update

>

```json
{"openapi":"3.1.0","info":{"title":"Rules Service API","version":"1.0.0"},"tags":[{"name":"Rules","description":"Rule management and versioning"}],"servers":[{"url":"https://rules.app.gomboc.ai/"}],"paths":{"/api/v1/rules/update":{"put":{"operationId":"PutApiV1RulesUpdate","tags":["Rules"],"requestBody":{"description":"PUT /api/v1/rules/update Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutApiV1RulesUpdateRequestBody"}}},"required":true},"responses":{"200":{"description":"PUT /api/v1/rules/update Positive response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutApiV1RulesUpdatePositiveResponse"}}}},"400":{"description":"PUT /api/v1/rules/update Negative response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutApiV1RulesUpdateNegativeResponse"}}}}}}}},"components":{"schemas":{"PutApiV1RulesUpdateRequestBody":{"type":"object","properties":{"type":{"type":"string"},"version":{"type":"string"},"iacLanguage":{"type":"string"},"classificationNames":{"type":"array","items":{"type":"string"}},"classifications":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["name"]}},"shortName":{"type":"string"},"annotations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"revisionData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"active":{"default":false,"type":"boolean"},"name":{"type":"string"}},"required":["name"]},"PutApiV1RulesUpdatePositiveResponse":{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"type":{"type":"string"},"version":{"type":"string"},"iacLanguage":{"type":"string"},"name":{"type":"string"},"shortName":{"type":["string","null"]},"revision":{"type":"number"},"revisions":{"type":"array","items":{"type":"number"}},"classificationPaths":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"shortName":{"type":["string","null"]}},"required":["accountId","name","shortName"],"additionalProperties":false}}},"annotations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"createdAt":{},"updatedAt":{}},"required":["accountId","type","version","iacLanguage","name","shortName","revision","revisions","id","createdAt","updatedAt"],"additionalProperties":false}},"required":["status","data"],"additionalProperties":false},"PutApiV1RulesUpdateNegativeResponse":{"type":"object","properties":{"status":{"type":"string","const":"error"},"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["status","error"],"additionalProperties":false}}}}
```

## DELETE /api/v1/rules/delete

>

```json
{"openapi":"3.1.0","info":{"title":"Rules Service API","version":"1.0.0"},"tags":[{"name":"Rules","description":"Rule management and versioning"}],"servers":[{"url":"https://rules.app.gomboc.ai/"}],"paths":{"/api/v1/rules/delete":{"delete":{"operationId":"DeleteApiV1RulesDelete","tags":["Rules"],"parameters":[{"name":"name","in":"query","required":true,"description":"DELETE /api/v1/rules/delete Parameter","schema":{"$ref":"#/components/schemas/DeleteApiV1RulesDeleteParameterName"}},{"name":"revision","in":"query","required":false,"description":"DELETE /api/v1/rules/delete Parameter","schema":{"$ref":"#/components/schemas/DeleteApiV1RulesDeleteParameterRevision"}},{"name":"all","in":"query","required":false,"description":"DELETE /api/v1/rules/delete Parameter","schema":{"$ref":"#/components/schemas/DeleteApiV1RulesDeleteParameterAll"}}],"responses":{"200":{"description":"DELETE /api/v1/rules/delete Positive response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteApiV1RulesDeletePositiveResponse"}}}},"400":{"description":"DELETE /api/v1/rules/delete Negative response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteApiV1RulesDeleteNegativeResponse"}}}}}}}},"components":{"schemas":{"DeleteApiV1RulesDeleteParameterName":{"type":"string"},"DeleteApiV1RulesDeleteParameterRevision":{"type":"number"},"DeleteApiV1RulesDeleteParameterAll":{"type":"boolean"},"DeleteApiV1RulesDeletePositiveResponse":{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}},"required":["status","data"],"additionalProperties":false},"DeleteApiV1RulesDeleteNegativeResponse":{"type":"object","properties":{"status":{"type":"string","const":"error"},"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["status","error"],"additionalProperties":false}}}}
```

## GET /api/v1/rules/search

>

```json
{"openapi":"3.1.0","info":{"title":"Rules Service API","version":"1.0.0"},"tags":[{"name":"Rules","description":"Rule management and versioning"}],"servers":[{"url":"https://rules.app.gomboc.ai/"}],"paths":{"/api/v1/rules/search":{"get":{"operationId":"GetApiV1RulesSearch","tags":["Rules"],"parameters":[{"name":"page","in":"query","required":false,"description":"GET /api/v1/rules/search Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchParameterPage"}},{"name":"perPage","in":"query","required":false,"description":"GET /api/v1/rules/search Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchParameterPerPage"}},{"name":"query","in":"query","required":false,"description":"GET /api/v1/rules/search Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchParameterQuery"}},{"name":"filters","in":"query","required":false,"description":"GET /api/v1/rules/search Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchParameterFilters"}},{"name":"filters[]","in":"query","required":false,"description":"GET /api/v1/rules/search Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchParameterFilters"}},{"name":"type","in":"query","required":false,"description":"GET /api/v1/rules/search Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchParameterType"}},{"name":"iacLanguage","in":"query","required":false,"description":"GET /api/v1/rules/search Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchParameterIacLanguage"}},{"name":"includeClassifications","in":"query","required":false,"description":"GET /api/v1/rules/search Parameter","schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchParameterIncludeClassifications"}}],"responses":{"200":{"description":"GET /api/v1/rules/search Positive response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchPositiveResponse"}}}},"400":{"description":"GET /api/v1/rules/search Negative response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetApiV1RulesSearchNegativeResponse"}}}}}}}},"components":{"schemas":{"GetApiV1RulesSearchParameterPage":{"default":1,"type":"number"},"GetApiV1RulesSearchParameterPerPage":{"default":20,"type":"number"},"GetApiV1RulesSearchParameterQuery":{"type":"string"},"GetApiV1RulesSearchParameterFilters":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"GetApiV1RulesSearchParameterType":{"type":"string"},"GetApiV1RulesSearchParameterIacLanguage":{"type":"string"},"GetApiV1RulesSearchParameterIncludeClassifications":{"default":1,"type":"number"},"GetApiV1RulesSearchPositiveResponse":{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"type":{"type":"string"},"version":{"type":"string"},"iacLanguage":{"type":"string"},"name":{"type":"string"},"shortName":{"type":["string","null"]},"revision":{"type":"number"},"revisions":{"type":"array","items":{"type":"number"}},"classificationPaths":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"type":"string"},"shortName":{"type":["string","null"]}},"required":["accountId","name","shortName"],"additionalProperties":false}}},"annotations":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"createdAt":{},"updatedAt":{}},"required":["accountId","type","version","iacLanguage","name","shortName","revision","revisions","id","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"number"},"page":{"type":"number"},"perPage":{"type":"number"}},"required":["rules","total","page","perPage"],"additionalProperties":false}},"required":["status","data"],"additionalProperties":false},"GetApiV1RulesSearchNegativeResponse":{"type":"object","properties":{"status":{"type":"string","const":"error"},"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["status","error"],"additionalProperties":false}}}}
```

## PUT /api/v1/rules/activate

>

```json
{"openapi":"3.1.0","info":{"title":"Rules Service API","version":"1.0.0"},"tags":[{"name":"Rules","description":"Rule management and versioning"}],"servers":[{"url":"https://rules.app.gomboc.ai/"}],"paths":{"/api/v1/rules/activate":{"put":{"operationId":"PutApiV1RulesActivate","tags":["Rules"],"requestBody":{"description":"PUT /api/v1/rules/activate Request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutApiV1RulesActivateRequestBody"}}},"required":true},"responses":{"200":{"description":"PUT /api/v1/rules/activate Positive response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutApiV1RulesActivatePositiveResponse"}}}},"400":{"description":"PUT /api/v1/rules/activate Negative response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutApiV1RulesActivateNegativeResponse"}}}}}}}},"components":{"schemas":{"PutApiV1RulesActivateRequestBody":{"type":"object","properties":{"name":{"type":"string"},"revision":{"type":"number"}},"required":["name","revision"]},"PutApiV1RulesActivatePositiveResponse":{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}},"required":["status","data"],"additionalProperties":false},"PutApiV1RulesActivateNegativeResponse":{"type":"object","properties":{"status":{"type":"string","const":"error"},"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["status","error"],"additionalProperties":false}}}}
```
