{"type":"api","title":"Get Tunnel States for Peers","meta":{"id":"/apps/pubhub/media/secure-access-for-china/f761bc0f96579628e9acf9bd5ce02d7863efbd30/1e446709-27f0-31f4-ae77-d70d0617ea3e","info":{"title":"Cisco Secure Access China Network Tunnel Groups and Regions API","description":"Manage the Secure Access China Network Tunnel Groups.","version":"1.0.0","contact":{"name":"Cloud Security Developer Community"}},"security":[{"oauthFlow":[]}],"tags":[{"name":"Network Tunnel Groups","description":"Network Tunnel Groups API endpoints"},{"name":"Network Tunnel Groups Regions","description":"Network Tunnel Groups Regions API endpoints"},{"name":"Network Tunnel Groups State","description":"Network Tunnel Groups State API endpoints"},{"name":"Network Tunnel Groups Peer State","description":"Network Tunnel Groups Peer State API endpoints"},{"name":"Secure Access"}],"x-parser-conf":{"overview":{"markdownPath":"reference/deployments/network-tunnel-groups-overview.md"}},"openapi":"3.0.3","servers":[{"url":"https://cisco.secureaccesschina.cn/{basePath}","variables":{"basePath":{"default":"deployments/v2"}}}],"securitySchemes":{"oauthFlow":{"type":"oauth2","description":"client credential flow","flows":{"clientCredentials":{"tokenUrl":"https://api.ciscosecureaccess.cn/auth/v2/token","scopes":{"deployments.networktunnelgroups:read":"Read network tunnel groups deployments","deployments.networktunnelgroups:write":"Write network tunnel groups deployments","deployments.regions:read":"Read regions for network tunnel groups deployments"}}}}}},"spec":{"summary":"Get Tunnel States for Peers","operationId":"getPeersState","tags":["Network Tunnel Groups Peer State","Secure Access"],"description":"Get the state of all peers (tunnels) within an organization's Network Tunnel Group and Hub.","security":[{"oauthFlow":["deployments.networktunnelgroups:read"]}],"parameters":[{"in":"query","name":"limit","required":false,"description":"An integer that represents the number of records to return in the response.\nThe default value is 10.","schema":{"type":"integer","default":10},"example":25,"$$ref":"#/components/parameters/limit"},{"in":"query","name":"offset","required":false,"description":"An integer that represents the place to start reading in the collection.\nWhen the offset is set to `0`, the system returns the first page from the collection.\nIf the `limit` is 10, the `offset` for the next page is 10.\nThe default value is 0.","schema":{"type":"integer","default":0},"example":10,"$$ref":"#/components/parameters/offset"},{"name":"sortBy","in":"query","description":"Specify the field that will be used to sort the items from the collection in the response.","schema":{"type":"string","enum":["hubId","peerId","modifiedAt"],"default":"modifiedAt"},"$$ref":"#/components/parameters/peerSortBy"},{"in":"query","name":"sortOrder","description":"Specify the sort order (ascending or descending) for the items in the response.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"example":"asc","$$ref":"#/components/parameters/sortOrder"},{"in":"path","name":"id","description":"The ID of the Network Tunnel Group.","required":true,"schema":{"type":"integer"},"example":123455,"$$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"OK","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","description":"The status information of the established Network Tunnel.","properties":{"time":{"type":"string","readOnly":true,"format":"date-time","description":"The date and time (UTC time with milliseconds) when the state event record was generated.","example":"2023-06-30T16:07:07.222Z"},"status":{"type":"string","readOnly":true,"description":"The high-level status of the tunnel:\n* UP - The tunnel is active.\n* DOWN - The tunnel is inactive.\n* FAILED - The tunnel is in a failed state.\n* UNKNOWN - The current status is unknown and pending updated information.","enum":["UP","DOWN","FAILED","UNKNOWN"],"example":"UP"},"dc":{"type":"string","readOnly":true,"description":"The domain name of the data center.","example":"chi1.edc"},"dcName":{"type":"string","readOnly":true,"description":"The name of the data center.","example":"Equinix Chicago"},"dcDesc":{"type":"string","readOnly":true,"description":"The city and country, or regional location of the data center.","example":"Chicago, Illinois - US"},"ikeState":{"type":"string","readOnly":true,"description":"IKE SA State:\n* CREATED\n* CONNECTING\n* ESTABLISHED\n* PASSIVE\n* REKEYING\n* REKEYED\n* DELETING\n* DESTROYING","enum":["CREATED","CONNECTING","ESTABLISHED","PASSIVE","REKEYING","REKEYED","DELETING","DESTROYING"],"example":"ESTABLISHED"},"ipsecState":{"type":"string","readOnly":true,"description":"IPsec state:\n* CREATED\n* ROUTED\n* INSTALLING\n* INSTALLED\n* UPDATING\n* REKEYING\n* REKEYED\n* RETRYING\n* DELETING\n* DELETED\n* DESTROYING","enum":["CREATED","ROUTED","INSTALLING","INSTALLED","UPDATING","REKEYING","REKEYED","RETRYING","DELETING","DELETED","DESTROYING"],"example":"INSTALLED"},"peerId":{"type":"string","readOnly":true,"description":"The IKE ID of the remote peer.","example":"unique-value@1234567-234567812-sse.cisco.com"},"peerIp":{"type":"string","readOnly":true,"description":"The IP address of the remote peer.","example":"198.18.195.1"},"peerPort":{"type":"string","readOnly":true,"description":"The port of the remote peer.","example":"4500"},"localIp":{"type":"string","readOnly":true,"description":"The public IP address assigned to an endpoint device (for example: ISR, Viptela).","example":"198.25.43.19"},"localPort":{"type":"string","readOnly":true,"description":"The port on the device.","example":"2456"},"ike":{"type":"object","description":"The IKE session state of the Network Tunnel.","properties":{"age":{"type":"string","readOnly":true,"description":"Established state age in seconds.","example":"6194"},"dhGroup":{"type":"string","readOnly":true,"description":"IKE Diffie-Hellman group.","example":"MODP_2048"},"prfAlgo":{"type":"string","readOnly":true,"description":"IKE pseudo random function.","example":"PRF_HMAC_SHA1"},"encAlgo":{"type":"string","readOnly":true,"description":"IKE encryption algorithm.","example":"AES_CBC"},"initiatorSpi":{"type":"string","readOnly":true,"description":"Hex encoded initiator SPI / cookie.","example":"cf065c564a511834"},"responderSpi":{"type":"string","readOnly":true,"description":"Hex encoded responder SPI / cookie.","example":"a3cd5c8533c80069"}},"$$ref":"#/components/schemas/tunnelIKEState"},"ipsec":{"type":"object","description":"The IPsec session state and configuration information for the network tunnel.","properties":{"age":{"type":"string","readOnly":true,"description":"The installed state age in seconds.","example":"6194"},"integrityAlgo":{"type":"string","readOnly":true,"description":"The ESP or AH integrity algorithm name.","example":"HMAC_SHA1_96"},"encAlgo":{"type":"string","readOnly":true,"description":"The ESP encryption algorithm name.","example":"NULL"},"encKeySize":{"type":"string","readOnly":true,"description":"The ESP encryption key size (optional field, not available with NULL encryption).","example":"128"},"spiIn":{"type":"string","readOnly":true,"description":"The Hex encoded inbound SPI.","example":"c6ef7503"},"spiOut":{"type":"string","readOnly":true,"description":"The Hex encoded outbound SPI.","example":"00010102"},"peerSelectors":{"type":"array","readOnly":true,"description":"The peer traffic selectors.","items":{"type":"string","description":"The selector expression.","example":"0.0.0.0/0"}}},"$$ref":"#/components/schemas/tunnelIPSecState"},"data":{"type":"object","description":"The properties of the state of the tunnel.","properties":{"packetsIn":{"type":"string","description":"The number of processed input packets (tunnel ingress).","readOnly":true,"example":"10"},"bytesIn":{"type":"string","readOnly":true,"description":"The number of processed input bytes (tunnel ingress).","example":"1000"},"idleTimeIn":{"type":"string","readOnly":true,"description":"The seconds since the last inbound packet (the time that the tunnel is idle).","example":"100"},"packetsOut":{"type":"string","readOnly":true,"description":"The number of processed output packets (tunnel egress).","example":"10"},"bytesOut":{"type":"string","readOnly":true,"description":"The number of processed output bytes (tunnel egress).","example":"1000"},"idleTimeOut":{"type":"string","readOnly":true,"description":"The seconds since the last outbound packet (the time that the tunnel is idle).","example":"100"},"initialized":{"type":"string","readOnly":true,"description":"The time when the packet and byte counters were initialized to 0.","example":"2023-10-19T22:15:12.765623734Z"}},"$$ref":"#/components/schemas/tunnelDataState"},"routingStats":{"type":"object","description":"The routing statistics for a peer (tunnel).","properties":{"clientRouteStats":{"type":"object","description":"The properties of the client routing statistics.","properties":{"isClipped":{"type":"boolean","description":"Indicates whether the routing statistics for the client route are truncated.","example":false},"stats":{"type":"array","description":"The list of the client routing statistics.","items":{"type":"object","description":"The properties of the client routing statistics.","properties":{"cidr":{"type":"string","description":"The client routing CIDR address.","example":"8.0.0.0/16"},"origin":{"type":"string","description":"The origin of the client routing.","example":"bgp"},"priority":{"type":"integer","description":"The priority of the client routing.","example":1}}}}}},"cloudRouteStats":{"type":"object","description":"The properites of the cloud routing statistics.","properties":{"isClipped":{"type":"boolean","description":"Indicates whether cloud route stats array has been truncated","example":false},"stats":{"type":"array","description":"The list of the cloud routing statistics.","items":{"type":"object","description":"The properties of the cloud routing statistics.","properties":{"cidr":{"type":"string","description":"The cloud routing CIDR address.","example":"21.10.11.0/24"},"origin":{"type":"string","description":"The origin of the cloud routing.","example":"bgp"},"priority":{"type":"integer","description":"The priority of the cloud routing.","example":1}}}}}}},"$$ref":"#/components/schemas/tunnelRoutingStats"}},"example":{"time":"2023-06-30T16:07:07.222Z","status":"UP","dc":"chi1.edc","dcName":"Equinix Chicago","dcDesc":"Chicago, Illinois - US","ikeState":"ESTABLISHED","ipsecState":"INSTALLED","peerId":"123456789009876543211234","peerIp":"198.18.195.1","peerPort":"4500","localIp":"198.25.43.19","localPort":"2456","ike":{"age":"6194","dhGroup":"MODP_2048","prfAlgo":"PRF_HMAC_SHA1","encAlgo":"AES_CBC","initiatorSpi":"cf065c564a511834","responderSpi":"a3cd5c8533c80069"},"ipsec":{"age":"6194","integrityAlgo":"HMAC_SHA1_96","encAlgo":"NULL","encKeySize":"128","spiIn":"c6ef7503","spiOut":"00010102","peerSelectors":["0.0.0.0/0"]},"data":{"packetsIn":"10","bytesIn":"1000","idleTimeIn":"100","packetsOut":"10","bytesOut":"1000","idleTimeOut":"100","initialized":"2023-06-30T16:07:01.245623734Z"},"routingStats":{"clientRouteStats":{"isClipped":false,"stats":[{"cidr":"25.10.10.24/32","origin":"bgp","priority":1}]},"cloudRouteStats":{"isClipped":false,"stats":[{"cidr":"ff22::/120","origin":"bgp","priority":1},{"cidr":"11.0.0.0/16","origin":"bgp","priority":2}]}}},"$$ref":"#/components/schemas/tunnelState"}}}}},"400":{"description":"Bad Request","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Network tunnel group ID is invalid."},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}},"$$ref":"#/components/schemas/400NTGIDError"}}},"$$ref":"#/components/responses/400NTGIDError"},"401":{"description":"Unauthorized","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Authorization token is invalid."},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}},"$$ref":"#/components/schemas/401Error"}}},"$$ref":"#/components/responses/401Error"},"403":{"description":"Forbidden","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Access Forbidden"},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}},"$$ref":"#/components/schemas/403Error"}}},"$$ref":"#/components/responses/403Error"},"404":{"description":"Not Found","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Not Found"},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}},"$$ref":"#/components/schemas/404Error"}}},"$$ref":"#/components/responses/404Error"},"500":{"description":"Internal Server Error","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Internal Server Error"},"requestId":{"type":"string","description":"The ID of the request.","example":"7d318524-d5a4-4fd8-8b29-ad295b2f035b"}},"$$ref":"#/components/schemas/500Error"}}},"$$ref":"#/components/responses/500Error"}},"__originalOperationId":"getPeersState","method":"get","path":"/networktunnelgroups/{id}/peers"}}