{"type":"api","title":"Get rule","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/7c48c18b-6630-3205-a601-ed557f355784","info":{"title":"APIs exposed by Grouping service","description":"Crosswork Grouping APIs allow the user to perform CRUD operations on grouping service.","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"},"version":"7.1.0"},"x-parser-conf":{"overview":{"markdownPath":"reference/INFRA/GROUPING/grouping-service-overview.md"}},"openapi":"3.0.1","servers":[{"url":"http://localhost:8080/v1/grouping","description":"Generated server url"}]},"spec":{"tags":["Rules"],"summary":"Get rule","description":"Retrieve a rule by its UUID.","operationId":"get","parameters":[{"name":"uuid","in":"path","description":"UUID of the rule to retrieve.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body, which is a generic structure containing only the relevant API return data.","content":{"application/json":{"schema":{"required":["classifier"],"type":"object","properties":{"uuid":{"maxLength":255,"minLength":0,"type":"string","description":"Unique identifier for the rule, if available."},"classifier":{"maxLength":255,"minLength":0,"type":"string","description":"Classifier type for the rule.","enum":["LocationDevices","UserDefinedDevices","UserDefinedPorts"]},"conditions":{"type":"string","description":"Refer rule/conditions API for supported conditions properties and operators","format":"Stringify json of Java class"},"targetGroupUuid":{"maxLength":255,"minLength":0,"type":"string","description":"UUID of the target group associated with the rule, if applicable."}},"description":"Data Transfer Object representing a rule, including its attributes and conditions.","$$ref":"#/components/schemas/RuleDTO"},"examples":{"Sample rule":{"summary":"Example of a rule response","description":"Sample rule","value":{"uuid":"48687067-609d-4dac-91b7-a1396c90be5c","ordering":0,"name":"TestGroup","classifier":"UserDefinedPorts","active":true,"conditions":"{\n \"conditions\": [{\n \"attributeName\": \"admin_status\",\n \"value\": \"UP\",\n \"order\": 1,\n \"stringCondition\": {\n \"operator\": \"SO_Equals\"\n }\n }]\n}","targetGroupUuid":"97b10ae7-62a7-4218-ac55-d7cc63c1f1e5"}}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"__originalOperationId":"get","method":"get","path":"/rule/{uuid}"}}