For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Distribution

Creates a new Distribution.

The full Distribution needs to be provided to create the object. Optional data will be filled with defaults or left empty.

post
Authorizations
AuthorizationstringRequired

The token can be generated using the Authentication API.

Body
metadataanyOptional

Metadata

Responses
201

Distribution successfully created.

application/json
idstring · uuidRequired

The ID (UUID) of the Distribution.

Example: 9ba15778-16c4-543c-8775-e52acf4853f5
typestring · enumRequired

The type of the resource.

Possible values:
hrefstringRequired

The URL of the Distribution.

Example: /distributions/9ba15778-16c4-543c-8775-e52acf4853f5
post/distributions
POST /distributions HTTP/1.1
Host: cdn.de-fra.ionos.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 323

{
  "metadata": {},
  "properties": {
    "domain": "example.com",
    "certificateId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
    "routingRules": [
      {
        "scheme": "http/https",
        "prefix": "/api",
        "upstream": {
          "host": "server.example.com",
          "caching": true,
          "waf": true,
          "geoRestrictions": {
            "blockList": [
              "CN",
              "RU"
            ]
          },
          "rateLimitClass": "R1",
          "sniMode": "distribution"
        }
      }
    ]
  }
}
{
  "id": "9ba15778-16c4-543c-8775-e52acf4853f5",
  "type": "distribution",
  "href": "/distributions/9ba15778-16c4-543c-8775-e52acf4853f5",
  "metadata": {
    "createdDate": "2020-12-10T13:37:50+01:00",
    "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedDate": "2020-12-11T13:37:50+01:00",
    "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
    "publicEndpointIpv4": "1.2.3.4",
    "publicEndpointIpv6": "2001:db8::ff00:42:8329",
    "ownershipTxtFqdn": "_dep_ws_mutex.example.com",
    "ownershipTxtValue": "ddc2b9d6-3a8a-4f1a-8f8d-9a6c7e1a3b2c",
    "state": "AVAILABLE",
    "message": "In progress."
  },
  "properties": {
    "domain": "example.com",
    "certificateId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
    "routingRules": [
      {
        "scheme": "http/https",
        "prefix": "/api",
        "upstream": {
          "host": "server.example.com",
          "caching": true,
          "waf": true,
          "geoRestrictions": {
            "blockList": [
              "CN",
              "RU"
            ]
          },
          "rateLimitClass": "R1",
          "sniMode": "distribution"
        }
      }
    ]
  }
}

Last updated

Was this helpful?