{"type":"api","title":"Preview SR policy route","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":"getSrPolicyRoutePreview","tags":["cisco-crosswork-optimization-engine-operations"],"summary":"Preview SR policy route","description":"Provides a preview of the route for a specified Segment Routing (SR) policy.","parameters":[{"in":"body","name":"operations.srpolicyroutepreview.Input.body-param","required":false,"description":"Request body containing the SR policy details for route preview.","schema":{"type":"object","properties":{"input":{"type":"object","properties":{"head-end":{"type":"string","description":"The IP address of the SR policy source."},"sr-policy-path":{"description":"The explicit path hops for the SR policy","type":"object","properties":{"hops":{"type":"array","items":{"type":"object","properties":{"hop":{"type":"object","properties":{"adjacency-ipv6-address":{"type":"string","description":"The IPv6 adjacency address","x-choice":"hop:adjacency-ipv6-hop"},"adjacency-ipv4-sid":{"type":"integer","format":"int64","description":"The IPv4 adjacency segment identifier","x-choice":"hop:adjacency-ipv4-hop"},"node-ipv6-address":{"type":"string","description":"The IPv6 node address","x-choice":"hop:node-ipv6-hop"},"node-ipv4-address":{"type":"string","description":"The IPv4 node address","x-choice":"hop:node-ipv4-hop"},"adjacency-ipv6-sid":{"type":"integer","format":"int64","description":"The IPv6 adjacency segment identifier","x-choice":"hop:adjacency-ipv6-hop"},"adjacency-ipv4-address":{"type":"string","description":"The IPv4 adjacency address","x-choice":"hop:adjacency-ipv4-hop"},"node-ipv6-sid":{"type":"integer","format":"int64","description":"The IPv6 node segment identifier","x-choice":"hop:node-ipv6-hop"},"node-ipv4-sid":{"type":"integer","format":"int64","description":"The IPv4 node segment identifier","x-choice":"hop:node-ipv4-hop"}},"$$ref":"#/definitions/sr.policy.common.srpolicyexplicitpath.hops.Hop"},"step":{"type":"integer","format":"int64","description":"The representation of the hop order in the path"}},"$$ref":"#/definitions/sr.policy.common.srpolicyexplicitpath.Hops"}}},"$$ref":"#/definitions/sr.policy.common.SrPolicyExplicitPath"},"end-point":{"type":"string","description":"The IP address of the SR policy destination."}},"$$ref":"#/definitions/operations.srpolicyroutepreview.Input"}}}}],"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"},"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"}},"path-computation-status":{"description":"The IGP path computation status for an SR policy","type":"string","enum":["success","failure"],"$$ref":"#/definitions/common.PathComputationStatusEnumeration"}},"$$ref":"#/definitions/operations.srpolicyroutepreview.Output"}}}},"204":{"description":"No response"},"400":{"description":"Internal error"}},"__originalOperationId":"getSrPolicyRoutePreview","consumes":["application/yang-data+json"],"produces":["application/yang-data+json"],"method":"post","path":"/operations/cisco-crosswork-optimization-engine-operations:sr-policy-route-preview"}}