{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "Forward Networks: Aliases API",
    "description" : "Define groups of network infrastructure elements or packet header values",
    "contact" : {
      "email" : "support@forwardnetworks.com"
    },
    "license" : {
      "name" : "MIT",
      "url" : "https://spdx.org/licenses/MIT"
    },
    "version" : "${apiVersion}"
  },
  "servers" : [
    {
      "url" : "/"
    }
  ],
  "tags" : [
    {
      "name" : "Aliases",
      "description" : "Alias Controller"
    }
  ],
  "paths" : {
    "/api/snapshots/{snapshotId}/aliases" : {
      "get" : {
        "tags" : [
          "Aliases"
        ],
        "summary" : "Gets all Aliases",
        "operationId" : "getAllAliasesUsingGET",
        "parameters" : [
          {
            "name" : "snapshotId",
            "in" : "path",
            "description" : "snapshotId",
            "required" : true,
            "style" : "simple",
            "explode" : false,
            "schema" : {
              "type" : "string"
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Aliases"
                }
              }
            }
          },
          "409" : {
            "description" : "The system is currently processing this Snapshot.\n\nNote: GET /networks/{networkId}/snapshots/latestProcessed can be used to determine when processing of the latest Snapshot is done or to identify an alternate Snapshot that has already been processed.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorInfo"
                }
              }
            }
          }
        },
        "deprecated" : false,
        "security" : [
          {
            "api_token" : [ ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Aliases"
        ],
        "summary" : "Deletes Aliases",
        "description" : "Use the optional `name` parameter to delete only specific Aliases. It can be repeated as in `?name=foo&name=bar`. Omit the `name` parameter to delete all Aliases active in the Snapshot.",
        "operationId" : "deactivateAliasesUsingDELETE",
        "parameters" : [
          {
            "name" : "snapshotId",
            "in" : "path",
            "description" : "snapshotId",
            "required" : true,
            "style" : "simple",
            "explode" : false,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "name",
            "in" : "query",
            "description" : "name",
            "required" : false,
            "allowEmptyValue" : false,
            "style" : "form",
            "explode" : true,
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "OK. The response contains the deleted Aliases.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Aliases"
                }
              }
            }
          },
          "409" : {
            "description" : "The system is currently processing this Snapshot.\n\nNote: GET /networks/{networkId}/snapshots/latestProcessed can be used to determine when processing of the latest Snapshot is done or to identify an alternate Snapshot that has already been processed.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorInfo"
                }
              }
            }
          }
        },
        "deprecated" : false,
        "security" : [
          {
            "api_token" : [ ]
          }
        ]
      }
    },
    "/api/snapshots/{snapshotId}/aliases/{name}" : {
      "get" : {
        "tags" : [
          "Aliases"
        ],
        "summary" : "Gets an Alias",
        "operationId" : "getSingleAliasUsingGET",
        "parameters" : [
          {
            "name" : "snapshotId",
            "in" : "path",
            "description" : "snapshotId",
            "required" : true,
            "style" : "simple",
            "explode" : false,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "name",
            "in" : "path",
            "description" : "name",
            "required" : true,
            "style" : "simple",
            "explode" : false,
            "schema" : {
              "type" : "string"
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AliasAndValue"
                }
              }
            }
          },
          "409" : {
            "description" : "The system is currently processing this Snapshot.\n\nNote: GET /networks/{networkId}/snapshots/latestProcessed can be used to determine when processing of the latest Snapshot is done or to identify an alternate Snapshot that has already been processed.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorInfo"
                }
              }
            }
          }
        },
        "deprecated" : false,
        "security" : [
          {
            "api_token" : [ ]
          }
        ]
      },
      "put" : {
        "tags" : [
          "Aliases"
        ],
        "summary" : "Creates an Alias",
        "operationId" : "createSnapshotAliasUsingPUT",
        "parameters" : [
          {
            "name" : "snapshotId",
            "in" : "path",
            "description" : "snapshotId",
            "required" : true,
            "style" : "simple",
            "explode" : false,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "name",
            "in" : "path",
            "description" : "name",
            "required" : true,
            "style" : "simple",
            "explode" : false,
            "schema" : {
              "type" : "string"
            }
          }
        ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AliasBuilder"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Alias"
                }
              }
            }
          },
          "409" : {
            "description" : "The system is currently processing this Snapshot.\n\nNote: GET /networks/{networkId}/snapshots/latestProcessed can be used to determine when processing of the latest Snapshot is done or to identify an alternate Snapshot that has already been processed.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorInfo"
                }
              }
            }
          }
        },
        "deprecated" : false,
        "security" : [
          {
            "api_token" : [ ]
          }
        ]
      },
      "delete" : {
        "tags" : [
          "Aliases"
        ],
        "summary" : "Deletes an Alias",
        "operationId" : "deactivateAliasUsingDELETE",
        "parameters" : [
          {
            "name" : "snapshotId",
            "in" : "path",
            "description" : "snapshotId",
            "required" : true,
            "style" : "simple",
            "explode" : false,
            "schema" : {
              "type" : "string"
            }
          },
          {
            "name" : "name",
            "in" : "path",
            "description" : "name",
            "required" : true,
            "style" : "simple",
            "explode" : false,
            "schema" : {
              "type" : "string"
            }
          }
        ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Alias"
                }
              }
            }
          }
        },
        "deprecated" : false,
        "security" : [
          {
            "api_token" : [ ]
          }
        ]
      }
    }
  },
  "components" : {
    "schemas" : {
      "Alias" : {
        "required" : [
          "creationTime",
          "creatorId",
          "name",
          "type"
        ],
        "type" : "object",
        "properties" : {
          "creationTime" : {
            "type" : "integer",
            "format" : "int64",
            "examples" : [
              1649277285118
            ]
          },
          "creatorId" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string",
            "enum" : [
              "HOSTS",
              "DEVICES",
              "INTERFACES",
              "HEADERS",
              "LOGICAL_NETWORK"
            ]
          }
        }
      },
      "AliasAndValue" : {
        "required" : [
          "creationTime",
          "creatorId",
          "name",
          "type"
        ],
        "type" : "object",
        "properties" : {
          "creationTime" : {
            "type" : "integer",
            "format" : "int64",
            "examples" : [
              1649277285118
            ]
          },
          "creatorId" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string",
            "enum" : [
              "HOSTS",
              "DEVICES",
              "INTERFACES",
              "HEADERS",
              "LOGICAL_NETWORK"
            ]
          }
        }
      },
      "AliasBuilder" : {
        "required" : [
          "type"
        ],
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : [
              "HOSTS",
              "DEVICES",
              "INTERFACES",
              "HEADERS",
              "LOGICAL_NETWORK"
            ]
          }
        },
        "discriminator" : {
          "propertyName" : "type",
          "mapping" : {
            "HOSTS" : "#/components/schemas/HostsAliasBuilder",
            "HostFilter" : "#/components/schemas/HostsAliasBuilder",
            "DEVICES" : "#/components/schemas/DevicesAliasBuilder",
            "DeviceFilter" : "#/components/schemas/DevicesAliasBuilder",
            "INTERFACES" : "#/components/schemas/InterfacesAliasBuilder",
            "InterfaceFilter" : "#/components/schemas/InterfacesAliasBuilder",
            "HEADERS" : "#/components/schemas/TrafficAliasBuilder",
            "PacketFilter" : "#/components/schemas/TrafficAliasBuilder",
            "LOGICAL_NETWORK" : "#/components/schemas/LogicalNetworkAliasBuilder"
          }
        }
      },
      "Aliases" : {
        "required" : [
          "aliases"
        ],
        "type" : "object",
        "properties" : {
          "aliases" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Alias"
            }
          }
        }
      },
      "DevicesAliasBuilder" : {
        "required" : [
          "name",
          "type"
        ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string",
            "enum" : [
              "HOSTS",
              "DEVICES",
              "INTERFACES",
              "HEADERS",
              "LOGICAL_NETWORK"
            ]
          },
          "values" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "ErrorInfo" : {
        "required" : [
          "apiUrl",
          "httpMethod",
          "message"
        ],
        "type" : "object",
        "properties" : {
          "httpMethod" : {
            "type" : "string",
            "examples" : [
              "GET"
            ],
            "enum" : [
              "GET",
              "HEAD",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ]
          },
          "apiUrl" : {
            "type" : "string",
            "examples" : [
              "/api/version"
            ]
          },
          "message" : {
            "type" : "string",
            "description" : "A description of the error"
          },
          "reason" : {
            "type" : "string"
          }
        }
      },
      "HostsAliasBuilder" : {
        "required" : [
          "name",
          "type"
        ],
        "type" : "object",
        "properties" : {
          "locations" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string",
            "enum" : [
              "HOSTS",
              "DEVICES",
              "INTERFACES",
              "HEADERS",
              "LOGICAL_NETWORK"
            ]
          },
          "values" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "InterfacesAliasBuilder" : {
        "required" : [
          "name",
          "type"
        ],
        "type" : "object",
        "properties" : {
          "isExposurePoint" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string",
            "enum" : [
              "HOSTS",
              "DEVICES",
              "INTERFACES",
              "HEADERS",
              "LOGICAL_NETWORK"
            ]
          },
          "values" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "vlanIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "vlanIntfTypes" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "enum" : [
                "ACCESS",
                "TRUNK"
              ]
            }
          }
        }
      },
      "LogicalNetworkAliasBuilder" : {
        "required" : [
          "name",
          "type"
        ],
        "type" : "object",
        "properties" : {
          "devices" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "edgeNodes" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string",
            "enum" : [
              "HOSTS",
              "DEVICES",
              "INTERFACES",
              "HEADERS",
              "LOGICAL_NETWORK"
            ]
          }
        }
      },
      "TrafficAliasBuilder" : {
        "required" : [
          "name",
          "type"
        ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string",
            "enum" : [
              "HOSTS",
              "DEVICES",
              "INTERFACES",
              "HEADERS",
              "LOGICAL_NETWORK"
            ]
          },
          "values" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          }
        }
      }
    },
    "securitySchemes" : {
      "api_token" : {
        "type" : "http",
        "scheme" : "basic"
      }
    }
  }
}