{"type":"api","title":"Retrieve SR policy routes","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/91f20e79-1f37-3a3b-be2f-e9eea61d870f","info":{"description":"This API provides operations for managing Segment Routing (SR) policies, retrieving optimization plans, and configuring notifications for SR policy paths.","version":"7.1.0","title":"Cisco Crosswork Optimization Engine Operations API","contact":{"name":"API Support","url":"https://www.cisco.com/support","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"}},"swagger":"2.0","host":"localhost:30603","basePath":"/crosswork/nbi/optimization/v3/restconf","securityDefinitions":{"api_key":{"description":"Authentication: Bearer $JWT","type":"apiKey","name":"api_key","in":"header"}}},"spec":{"operationId":"getSrPolicyRoutes","tags":["cisco-crosswork-optimization-engine-operations"],"summary":"Retrieve SR policy routes","description":"Fetches routes for specified Segment Routing (SR) policies.","parameters":[{"in":"body","name":"sr.policy.common.SrPolicyKeyList.body-param","required":false,"description":"Request body containing the list of SR policies to fetch routes for.","schema":{"type":"object","properties":{"input":{"type":"object","properties":{"sr-policies":{"type":"array","items":{"type":"object","properties":{"head-end":{"type":"string","description":"The IP address of the SR policy source"},"end-point":{"type":"string","description":"The IP address of the SR policy destination"},"color":{"type":"integer","format":"int64","description":"The color for the SR policy"}},"$$ref":"#/definitions/sr.policy.common.SrPolicyKeyFields"}}},"$$ref":"#/definitions/sr.policy.common.SrPolicyKeyList"}}}}],"responses":{"200":{"description":"Correct response","schema":{"type":"object","properties":{"output":{"type":"object","properties":{"message":{"type":"string","description":"The details of status above"},"status":{"description":"Enumeration of the request state","type":"string","enum":["error","accepted","rejected"],"$$ref":"#/definitions/common.RequestStatus"},"results":{"type":"array","items":{"type":"object","properties":{"path-computation-status":{"description":"The IGP path computation status for an SR policy","type":"string","enum":["success","failure"],"$$ref":"#/definitions/common.PathComputationStatusEnumeration"},"igp-route":{"type":"array","items":{"type":"object","properties":{"interface":{"type":"string","description":"The name of the interface"},"node":{"type":"string","description":"The hostname of the source-node for the interface"},"interface-use":{"type":"integer","format":"int32","description":"Route portion using that interface, ranges from 0 to 1"}},"$$ref":"#/definitions/common.InterfaceUseDetail"}},"color":{"type":"integer","format":"int64","description":"The color for the SR policy"},"head-end":{"type":"string","description":"The IP address of the SR policy source"},"end-point":{"type":"string","description":"The IP address of the SR policy destination"}},"$$ref":"#/definitions/operations.srpolicyroutes.output.Results"}}},"$$ref":"#/definitions/operations.srpolicyroutes.Output"}}}},"204":{"description":"No response"},"400":{"description":"Internal error"}},"__originalOperationId":"getSrPolicyRoutes","consumes":["application/yang-data+json"],"produces":["application/yang-data+json"],"method":"post","path":"/operations/cisco-crosswork-optimization-engine-operations:sr-policy-routes"}}