Zum Hauptinhalt springen

List Ingresses belonging to a project

GET/v2/projects/{projectId}/ingresses
API-Version
v2
Request-Methode
GET
Operation-ID
deprecated-ingress-list-ingresses

Request​

  • projectIdstringrequired

    ID of the Project to list Ingresses for

Responses​

Format
application/json
Beschreibung

OK

  • Array[
    • *object
      • dnsValidationErrorsArray von string (einer von: ERROR_UNSPECIFIED, ERROR_QUAD_A, ERROR_NO_A_RECORD, ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED)required

        A list of errors that occurred while validating the ingress's dns before requesting a certificate. ERROR_QUAD_A and ERROR_NO_A_RECORD are deprecated and no longer reported.

        • Array[
          • *string (einer von: ERROR_UNSPECIFIED, ERROR_QUAD_A, ERROR_NO_A_RECORD, ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED)
          ]
      • hostnamestring (idn-hostname)required
      • idstring (uuid)required
      • ipsobjectrequired
        • v4Array von string (ipv4)required
          • Array[
            • *string (ipv4)
            ]
      • isDefaultbooleanrequired

        Whether this ingress is the default ingress or not. A default ingress is automatically created, it cannot be deleted. There can be only one default ingress per project.

      • isDomainboolean
      • isEnabledbooleanrequired
      • ownershipobjectrequired
        • txtRecordstring
        • verifiedbooleanrequired

          Whether the domain ownership is verified or not.

      • pathsArray von objectrequired

        A list of paths. The default path / is always present and cannot be removed.

        • Array[
          • *object
            • pathstringrequired
            • targeteine von 4 Alternativenrequired
              • Alternativeobject

                Redirect requests to this path to another URL

                • urlstring (uri)required

                  The URL to which requests should be forwarded.

              • Alternativeobject

                Serve a specific app installation

                • installationIdstring (uuid)required

                  The ID of an app installation within the same project to which requests should be forwarded.

              • Alternativeobject

                Serve a generic default page

                • useDefaultPagebooleanrequired

                  Set this to true to serve a generic default site at this path.

              • Alternativeobject

                Forward requests to this path to a specific container.

                • containerobjectrequired
                  • idstring (uuid)required
                  • portProtocolstring (docker-network-port)required

                    docker-compose port specification in format port/protocol (e.g. 8080/TCP)

          ]
      • projectIdstring (uuid)required
      • tlseine von 2 Alternativenrequired
        • Alternativeobject
          • acmebooleanrequired
        • Alternativeobject
          • certificateIdstring (uuid)required
    ]
Content-Type: application/json

[
{
"dnsValidationErrors": [
"ERROR_UNSPECIFIED"
],
"hostname": "some-hostname.example",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"ips": {
"v4": [
"string"
]
},
"isDefault": true,
"isDomain": true,
"isEnabled": true,
"ownership": {
"txtRecord": "string",
"verified": true
},
"paths": [
{
"path": "string",
"target": {
"url": "https://redirect-target.example"
}
}
],
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"tls": {
"acme": true
}
}
]
{
"items": {
"properties": {
"dnsValidationErrors": {
"description": "A list of errors that occurred while validating the ingress's dns before requesting a certificate. `ERROR_QUAD_A` and `ERROR_NO_A_RECORD` are deprecated and no longer reported.",
"items": {
"enum": [
"ERROR_UNSPECIFIED",
"ERROR_QUAD_A",
"ERROR_NO_A_RECORD",
"ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED"
],
"type": "string"
},
"type": "array"
},
"hostname": {
"format": "idn-hostname",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"ips": {
"properties": {
"v4": {
"items": {
"format": "ipv4",
"type": "string"
},
"type": "array"
}
},
"required": [
"v4"
],
"type": "object"
},
"isDefault": {
"description": "Whether this ingress is the default ingress or not. A default ingress is automatically created, it cannot be deleted. There can be only one default ingress per project.",
"type": "boolean"
},
"isDomain": {
"type": "boolean"
},
"isEnabled": {
"type": "boolean"
},
"ownership": {
"properties": {
"txtRecord": {
"type": "string"
},
"verified": {
"description": "Whether the domain ownership is verified or not.",
"type": "boolean"
}
},
"required": [
"verified"
],
"type": "object"
},
"paths": {
"description": "A list of paths. The default path `/` is always present and cannot be removed.",
"items": {
"properties": {
"path": {
"type": "string"
},
"target": {
"oneOf": [
{
"properties": {
"url": {
"format": "uri",
"type": "string",
"description": "The URL to which requests should be forwarded.",
"example": "https://redirect-target.example"
}
},
"required": [
"url"
],
"type": "object",
"description": "Redirect requests to this path to another URL"
},
{
"properties": {
"installationId": {
"format": "uuid",
"type": "string",
"description": "The ID of an app installation within the same project to which requests should be forwarded."
}
},
"required": [
"installationId"
],
"type": "object",
"description": "Serve a specific app installation"
},
{
"properties": {
"useDefaultPage": {
"type": "boolean",
"description": "Set this to `true` to serve a generic default site at this path."
}
},
"required": [
"useDefaultPage"
],
"type": "object",
"description": "Serve a generic default page"
},
{
"properties": {
"container": {
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"portProtocol": {
"description": "docker-compose port specification in format port/protocol (e.g. 8080/TCP)",
"format": "docker-network-port",
"type": "string",
"example": "80/tcp"
}
},
"required": [
"id",
"portProtocol"
],
"type": "object",
"descriptions": "References a specific port/container combination within the same project."
}
},
"required": [
"container"
],
"type": "object",
"description": "Forward requests to this path to a specific container."
}
]
}
},
"required": [
"path",
"target"
],
"type": "object"
},
"type": "array"
},
"projectId": {
"format": "uuid",
"type": "string"
},
"tls": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"acme": {
"type": "boolean"
}
},
"required": [
"acme"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"certificateId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"certificateId"
],
"type": "object"
}
]
}
},
"required": [
"id",
"hostname",
"projectId",
"isDefault",
"tls",
"paths",
"isEnabled",
"ips",
"dnsValidationErrors",
"ownership"
],
"type": "object"
},
"type": "array"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/string/ingresses
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.domain.deprecatedIngressListIngresses({
"projectId": "string"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Domain\DeprecatedIngressListIngresses\DeprecatedIngressListIngressesRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new DeprecatedIngressListIngressesRequest(
projectId: "string"
));
$response = $client->domain()->deprecatedIngressListIngresses($request);

var_dump($response->getBody();

Auf dieser Seite