components: {}
info:
  contact:
    email: support@mythic-beasts.com
  description: "\nThis API allows you to manage the configuration of [IPv4 to IPv6\
    \ proxy](https://www.mythic-beasts.com/support/topics/proxy)\nservers.  These\
    \ proxies allow you to host a website on an IPv6-only server,\nand make it accessible\
    \ to both IPv4 and IPv6 users.\n\n## Authentication and authorisation\n\nThis\
    \ API uses our [auth service](auth).  Credentials for using this API can\nbe obtained\
    \ from the [API Keys](https://www.mythic-beasts.com/customer/api-users) \nsection\
    \ of the control panel.  Credentials can be unrestricted, allowing\nthem to manage\
    \ all proxies for all domains domains on your account, or\nrestricted to individual\
    \ domains or hostnames.\n\nAuthentication for the Proxy API is done using a \"\
    Bearer token\".  Under this method\nyou provide your credentials to the [auth\
    \ service](auth) which will return\na token which can be used in subsequent requests.\
    \  See the [documentation for the auth service](auth) for more details.\n\n##\
    \ API overview\n\nThe API allows you to manipulate **endpoints**.  An endpoint\
    \ is identified by\nthe combination of the following properties:\n\n* `domain`\
    \ \u2013 the domain part of the hostname to be proxied (e.g. \"example.com\").\n\
    * `hostname` \u2013 the host part of the hostname to be proxied (e.g. \"www\"\
    ).\n* `address` \u2013 the IPv6 address of the server to which requests are proxied.\n\
    * `site` \u2013 the site in which the proxy server is located, or `all` if this\
    \ endpoint exists on all proxy servers.\n\nAn endpoint has the following flag:\n\
    \n* `proxy` \u2013 if `true`, requests will be proxied using [PROXY protocol](/support/topics/proxy#sec-proxy-protocol)\
    \ rather than plain HTTP/HTTPS requests.\n\n`domain` must correspond to a domain\
    \ on your customer account.  This can be either a registered domain, or a \"3rd\
    \ party domain\".\n\n`hostname` can be the special value `@` to indicate that\
    \ it is the domain name itself that is to be proxied.\n\n`address` must be an\
    \ IPv6 address within the Mythic Beasts network.\n\n`site` should normally use\
    \ the default value of `all` indicating that the endpoint is to be configured\
    \ on all proxy servers.\n\n### Fetching endpoints\n\nThe API uses hierarchical\
    \ URLs of the form:\n\n```\n/endpoints\n/endpoints/<domain>\n/endpoints/<domain>/<hostname>\n\
    /endpoints/<domain>/<hostname>/<address>\n/endpoints/<domain>/<hostname>/<address>/<site>\n\
    ```\n\nAll of the above URLs support `GET` requests, and will return information\n\
    about all endpoints on the account that match the provided parts of the\nURL.\
    \  For example, a `GET` to:\n\n```\n/endpoints\n```\n\nwill return all endpoints\
    \ to which the API token has access, whereas a `GET` to:\n\n```\n/endpoints/example.com/www\n\
    ```\n\nwill return endpoints configured for **www.example.com**.\n\n### Updating\
    \ endpoints\n\nEndpoints can be created or modified using a `PUT` request, or\
    \ deleted\nusing a `DELETE` request to the following URLs:\n\n```\n/endpoints/<domain>/<hostname>\n\
    /endpoints/<domain>/<hostname>/<address>\n/endpoints/<domain>/<hostname>/<address>/<site>\n\
    ```\n\nA `PUT` request will replace all endpoints that match the provided parts\
    \ of\nthe URL.  Similarly, a `DELETE` request will delete all endpoints that\n\
    match the URL.\n\nIn addition, the first URL supports `POST` requests, which can\
    \ be used to\nadd additional endpoints without replacing existing ones.\n\n###\
    \ Base URL {: #sec-base-url }\n\nThe base URL for this service is:\n\n*  **https://api.mythic-beasts.com/proxy**\n\
    \nThe endpoints listed below should be appended to the above URL.  \n\n### Getting\
    \ started\n\nTo get started using this API:\n\n1. Create an API key with access\
    \ to the Proxy API using the [customer control panel](/customer/api-users).\n\n\
    2. Use your API key credentials to obtain an auth token, as shown in this [Auth\
    \ API example](/support/api/auth#sec-command-line-example).\n\n3. Make a request:\n\
    \n```\ncurl -D- -H \"Authorization: Bearer $TOKEN\" https://api.mythic-beasts.com/proxy/endpoints\n\
    ```\n\nThe above assumes that you have an auth token in the `TOKEN` environment\n\
    variable from step (2), and should produce a list endpoints configured on\nyour\
    \ accoun that the API key has access to.\n\n\n"
  termsOfService: https://www.mythic-beasts.com/article/terms
  title: IPv4 to IPv6 Proxy API
  version: 2.0.0
openapi: 3.0.0
paths:
  /endpoints:
    get:
      description: "Get endpoint information.\n\nThis will return all endpoints that\
        \ match the specified URL path, and\nwhich the access token has permission\
        \ to read.\n\nIf the `{hostname}` URL parameter is not specified (first two\
        \ URL\nforms), and there are no matching endpoints, a `200` response with\
        \ an\nempty list will be returned.\n\nIf the `{hostname}` URL parameter is\
        \ specified (last three URL forms),\nand there are no matching endpoints,\
        \ the API will return a `404`\nresponse.  \n\n"
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
        '404':
          description: "Indicates that there are no endpoints matching the provided\
            \ URL\nparameters.  Note that this response code is only used if \nthe\
            \ URL includes the `{hostname}` part.  A query for all\nendpoints, or\
            \ all endpoints for a domain will return a `200`\nresponse and an empty\
            \ list if there are no matching endpoints.\n"
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Get endpoints
  /endpoints/{domain}:
    get:
      description: "Get endpoint information.\n\nThis will return all endpoints that\
        \ match the specified URL path, and\nwhich the access token has permission\
        \ to read.\n\nIf the `{hostname}` URL parameter is not specified (first two\
        \ URL\nforms), and there are no matching endpoints, a `200` response with\
        \ an\nempty list will be returned.\n\nIf the `{hostname}` URL parameter is\
        \ specified (last three URL forms),\nand there are no matching endpoints,\
        \ the API will return a `404`\nresponse.  \n\n"
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
        '404':
          description: "Indicates that there are no endpoints matching the provided\
            \ URL\nparameters.  Note that this response code is only used if \nthe\
            \ URL includes the `{hostname}` part.  A query for all\nendpoints, or\
            \ all endpoints for a domain will return a `200`\nresponse and an empty\
            \ list if there are no matching endpoints.\n"
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Get endpoints
  /endpoints/{domain}/{hostname}:
    delete:
      description: 'This will delete all endpoints matching the URL path.


        '
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Delete endpoints
    get:
      description: "Get endpoint information.\n\nThis will return all endpoints that\
        \ match the specified URL path, and\nwhich the access token has permission\
        \ to read.\n\nIf the `{hostname}` URL parameter is not specified (first two\
        \ URL\nforms), and there are no matching endpoints, a `200` response with\
        \ an\nempty list will be returned.\n\nIf the `{hostname}` URL parameter is\
        \ specified (last three URL forms),\nand there are no matching endpoints,\
        \ the API will return a `404`\nresponse.  \n\n"
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
        '404':
          description: "Indicates that there are no endpoints matching the provided\
            \ URL\nparameters.  Note that this response code is only used if \nthe\
            \ URL includes the `{hostname}` part.  A query for all\nendpoints, or\
            \ all endpoints for a domain will return a `200`\nresponse and an empty\
            \ list if there are no matching endpoints.\n"
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Get endpoints
    post:
      description: 'This creates additional endpoints for the specified domain and
        hostname.  Unlike an [equivalent `PUT` request](#ep-put-endpointsdomainhostname),
        existing endpoints will not be replaced.


        '
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              example:
                endpoints:
                - address: 2a00:1098:0:82:1000:3b:1:1
                  domain: example.com
                  hostname: www
                  proxy_protocol: true
                  site: all
              properties:
                endpoints:
                  description: List of endpoints to add.
                  items:
                    properties:
                      address:
                        description: IPv6 address of server to proxy requests to.
                        example: null
                        required: true
                        type: string
                      proxy_protocol:
                        description: 'Whether to use [PROXY Protocol](/support/topics/proxy#sec-proxy-protocol)
                          when proxying requests (default: `false`)'
                        example: true
                        type: boolean
                      site:
                        description: 'Name of the site to configure proxy servers
                          in, or `all` for all sites (default: `all`)'
                        example: all
                        type: string
                    required:
                    - domain
                    - hostname
                    - address
                    type: object
                  required: true
                  type: array
              required:
              - endpoints
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Create endpoints
    put:
      description: 'Update endpoints


        This will create or update endpoints.  Any endpoints that match the

        specified URL path will be replaced with the information provided in

        the body of the request.

        '
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              example:
                endpoints:
                - address: 2a00:1098:0:82:1000:3b:1:1
                  domain: example.com
                  hostname: www
                  proxy_protocol: true
                  site: all
              properties:
                endpoints:
                  description: List of endpoints to add.
                  items:
                    properties:
                      address:
                        description: IPv6 address of server to proxy requests to.
                        example: null
                        required: true
                        type: string
                      proxy_protocol:
                        description: 'Whether to use [PROXY Protocol](/support/topics/proxy#sec-proxy-protocol)
                          when proxying requests (default: `false`)'
                        example: true
                        type: boolean
                      site:
                        description: 'Name of the site to configure proxy servers
                          in, or `all` for all sites (default: `all`)'
                        example: all
                        type: string
                    required:
                    - domain
                    - hostname
                    - address
                    type: object
                  required: true
                  type: array
              required:
              - endpoints
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Create or update endpoints
  /endpoints/{domain}/{hostname}/{address}:
    delete:
      description: 'This will delete all endpoints matching the URL path.


        '
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Delete endpoints
    get:
      description: "Get endpoint information.\n\nThis will return all endpoints that\
        \ match the specified URL path, and\nwhich the access token has permission\
        \ to read.\n\nIf the `{hostname}` URL parameter is not specified (first two\
        \ URL\nforms), and there are no matching endpoints, a `200` response with\
        \ an\nempty list will be returned.\n\nIf the `{hostname}` URL parameter is\
        \ specified (last three URL forms),\nand there are no matching endpoints,\
        \ the API will return a `404`\nresponse.  \n\n"
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
        '404':
          description: "Indicates that there are no endpoints matching the provided\
            \ URL\nparameters.  Note that this response code is only used if \nthe\
            \ URL includes the `{hostname}` part.  A query for all\nendpoints, or\
            \ all endpoints for a domain will return a `200`\nresponse and an empty\
            \ list if there are no matching endpoints.\n"
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Get endpoints
    put:
      description: 'Update endpoints


        This will create or update endpoints.  Any endpoints that match the

        specified URL path will be replaced with the information provided in

        the body of the request.

        '
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              example:
                endpoints:
                - address: 2a00:1098:0:82:1000:3b:1:1
                  domain: example.com
                  hostname: www
                  proxy_protocol: true
                  site: all
              properties:
                endpoints:
                  description: List of endpoints to add.
                  items:
                    properties:
                      address:
                        description: IPv6 address of server to proxy requests to.
                        example: null
                        required: true
                        type: string
                      proxy_protocol:
                        description: 'Whether to use [PROXY Protocol](/support/topics/proxy#sec-proxy-protocol)
                          when proxying requests (default: `false`)'
                        example: true
                        type: boolean
                      site:
                        description: 'Name of the site to configure proxy servers
                          in, or `all` for all sites (default: `all`)'
                        example: all
                        type: string
                    required:
                    - domain
                    - hostname
                    - address
                    type: object
                  required: true
                  type: array
              required:
              - endpoints
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Create or update endpoints
  /endpoints/{domain}/{hostname}/{address}/{site}:
    delete:
      description: 'This will delete all endpoints matching the URL path.


        '
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Delete endpoints
    get:
      description: "Get endpoint information.\n\nThis will return all endpoints that\
        \ match the specified URL path, and\nwhich the access token has permission\
        \ to read.\n\nIf the `{hostname}` URL parameter is not specified (first two\
        \ URL\nforms), and there are no matching endpoints, a `200` response with\
        \ an\nempty list will be returned.\n\nIf the `{hostname}` URL parameter is\
        \ specified (last three URL forms),\nand there are no matching endpoints,\
        \ the API will return a `404`\nresponse.  \n\n"
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
        '404':
          description: "Indicates that there are no endpoints matching the provided\
            \ URL\nparameters.  Note that this response code is only used if \nthe\
            \ URL includes the `{hostname}` part.  A query for all\nendpoints, or\
            \ all endpoints for a domain will return a `200`\nresponse and an empty\
            \ list if there are no matching endpoints.\n"
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Get endpoints
    put:
      description: 'Update endpoints


        This will create or update endpoints.  Any endpoints that match the

        specified URL path will be replaced with the information provided in

        the body of the request.

        '
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              example:
                endpoints:
                - address: 2a00:1098:0:82:1000:3b:1:1
                  domain: example.com
                  hostname: www
                  proxy_protocol: true
                  site: all
              properties:
                endpoints:
                  description: List of endpoints to add.
                  items:
                    properties:
                      address:
                        description: IPv6 address of server to proxy requests to.
                        example: null
                        required: true
                        type: string
                      proxy_protocol:
                        description: 'Whether to use [PROXY Protocol](/support/topics/proxy#sec-proxy-protocol)
                          when proxying requests (default: `false`)'
                        example: true
                        type: boolean
                      site:
                        description: 'Name of the site to configure proxy servers
                          in, or `all` for all sites (default: `all`)'
                        example: all
                        type: string
                    required:
                    - domain
                    - hostname
                    - address
                    type: object
                  required: true
                  type: array
              required:
              - endpoints
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  endpoints:
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: www
                    proxy_protocol: true
                    site: all
                  - address: 2a00:1098:0:82:1000:3b:1:1
                    domain: example.com
                    hostname: '@'
                    proxy_protocol: true
                    site: all
                properties:
                  endpoints:
                    description: List of endpoints
                    items:
                      description: Endpoint details
                      properties:
                        address:
                          description: IP address
                          type: string
                        domain:
                          description: Domain name
                          type: string
                        hostname:
                          description: Host name
                          type: string
                        proxy_protocol:
                          description: Wheter PROXY protocol is enabled or not
                          type: boolean
                        site:
                          description: Site
                          type: string
                      type: object
                    type: array
                type: object
          description: 'List of endpoints

            '
        '400':
          content:
            application/json:
              schema:
                example:
                  error: 1.2.3.4 is not a valid IPv6 address
                  status: Error
                properties:
                  error:
                    description: Error message
                    type: string
                  status:
                    description: Status message
                    type: string
                type: object
          description: Request cannot be completed due to an error in input.
          x-mythic-error-summary: Bad input
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Malformed or missing auth data
                    type: string
                type: object
          description: User is not authenticated.
          x-mythic-error-summary: Not authenticated
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: Error message
                    example: Invalid permits
                    type: string
                type: object
          description: Not authorised to access this API.
          x-mythic-error-summary: Not authorised
      security:
      - BasicAuth: []
      - BearerAuth: []
      summary: Create or update endpoints
  /sites:
    get:
      description: 'Lists the available sites with proxy servers.

        '
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  sites:
                    description: List of available sites
                    example:
                    - sov
                    - ams
                    - hex
                    type: array
                type: object
          description: 'List of sites


            '
      security: []
      summary: List available proxy sites
servers:
- url: https://api.mythic-beasts.com/proxy
tags:
- description: IPv4 to IPv6 Proxy API
  name: Proxy
