diff --git a/README.md b/README.md index 5e71995c65bf57fe2dd8d1249d68d87f086c5616..ce5bae612ad114335184d67bb025824aea71cf29 100644 --- a/README.md +++ b/README.md @@ -374,7 +374,7 @@ Any non-empty responses are JSON formatted messages. The `address` parameter should be the ip address of a remote peer. If this address is found in the system then information about the interface is returned, otherwise - 404 is returned. + 404 is returned (or 422 if the address can't be parsed) The response will be formatted according to the following syntax: @@ -391,6 +391,13 @@ Any non-empty responses are JSON formatted messages. {"pattern": r'^([a-f\d]{4}:){7}[a-f\d]{4}$'} ] }, + "interface-address": { + "type": "string", + "oneOf": [ + {"pattern": r'^(\d+\.){3}\d+/\d+$'}, + {"pattern": r'^[a-f\d:]+/\d+$'} + ] + }, "vpn-rr-peer": { "type": "object", "properties": { @@ -425,7 +432,19 @@ Any non-empty responses are JSON formatted messages. "type": "array", "items": {"$ref": "#/definitions/ip-address"} }, - + "interface-info": { + "type": "object", + "properties": { + "name": {"$ref": "#/definitions/ip-address"}, + "interface address": { + "$ref": "#/definitions/interface-address"}, + "interface name": {"type": "string"}, + "router": {"type": "string"} + }, + "required": [ + "name", "interface address", "interface name", "router"], + "additionalProperties": False + } }, "type": "object", @@ -433,7 +452,11 @@ Any non-empty responses are JSON formatted messages. "ix-public-peer-info": {"$ref": "#/definitions/ix-public-peer"}, "ix-public-peer-group": { "$ref": "#/definitions/ix-public-peer-group"}, - "vpn-rr-peer-info": {"$ref": "#/definitions/vpn-rr-peer"} + "vpn-rr-peer-info": {"$ref": "#/definitions/vpn-rr-peer"}, + "interfaces": { + "type": "array", + "items": {"$ref": "#/definitions/interface-info"} + } }, "additionalProperties": False }