v1
Double column
API
CLI
JS Client

Services /

Get service ports

Lists the ports for the given service.

Required permission

Project > Services > General > Read

Path parameters

    • projectId

      string required

      ID of the project

    • serviceId

      string required

      ID of the service

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • ports

        [array] required
        • {object}
          • id

            string required

            The id used to identify the port across requests.

            pattern
            ^[a-z]-?[a-z0-9]+(-[a-z0-9]+)*$
          • name

            string required

            The name of the port used in the public url and UI.

            pattern
            ^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$
          • internalPort

            integer required

            The port number.

          • protocol

            string required

            The protocol used by the port.

            one of
            HTTP, TCP, UDP
          • public

            boolean required

            If true, the port is exposed publicly.

          • domains

            [array] required

            An array of domains that redirect to this port.

            • string
          • security

            {object}
    API
    CLI
    JS Client

    GET /v1/projects/{projectId}/services/{serviceId}/ports

    Example response

    200 OK

    Details about the ports for the service.

    JSON

    {
      "data": {
        "ports": [
          {
            "id": "eonyui",
            "name": "port-1",
            "internalPort": 8080,
            "protocol": "HTTP",
            "public": true,
            "domains": [
              null
            ]
          }
        ]
      }
    }

    © 2022 Northflank Ltd. All rights reserved.