Distributions

A CDN distribution resource.

This tag groups all operations for distributions.

Retrieve all Distributions

get

This endpoint enables retrieving all Distributions using pagination and optional filters.

Authorizations
Query parameters
offsetinteger · int32Optional

The first element (of the total list of elements) to include in the response. Use together with limit for pagination.

Default: 0Example: 0
limitinteger · int32 · min: 1 · max: 1000Optional

The maximum number of elements to return. Use together with offset for pagination.

Default: 100Example: 100
filter.domainstring · min: 2 · max: 253Optional

filters resources by domain.

Example: example.comPattern: ^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}\.?$
filter.statestring · enumOptional

filters resources by state.

Example: AVAILABLEPossible values:
Responses
200
Returned all requested Distributions successfully.
application/json
Responseall of
and
get
GET /distributions HTTP/1.1
Host: cdn.de-fra.ionos.com
Authorization: Bearer JWT
Accept: */*
{
  "id": "24c578a9-361f-54d4-a326-a3f3070d5a03",
  "type": "collection",
  "href": "/distributions",
  "items": [
    {
      "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",
        "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"
            }
          }
        ]
      }
    }
  ],
  "offset": 0,
  "limit": 42,
  "_links": {
    "prev": "http://PREVIOUS-PAGE-URI",
    "self": "http://THIS-PAGE-URI",
    "next": "http://NEXT-PAGE-URI"
  }
}

Create Distribution

post

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.

Authorizations
Body
metadataanyOptional

Metadata

Responses
201
Distribution successfully created.
application/json
post
POST /distributions HTTP/1.1
Host: cdn.de-fra.ionos.com
Authorization: Bearer JWT
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",
    "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"
        }
      }
    ]
  }
}

Retrieve Distribution

get

Returns the Distribution by ID.

Authorizations
Path parameters
distributionIdstring · uuidRequired

The ID (UUID) of the Distribution.

Example: 9ba15778-16c4-543c-8775-e52acf4853f5
Responses
200
Getting Distribution was successful.
application/json
get
GET /distributions/{distributionId} HTTP/1.1
Host: cdn.de-fra.ionos.com
Authorization: Bearer JWT
Accept: */*
{
  "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",
    "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"
        }
      }
    ]
  }
}

Ensure Distribution

put

Ensures that the Distribution with the provided ID is created or modified. The full Distribution needs to be provided to ensure (either update or create) the Distribution. Non present data will only be filled with defaults or left empty, but not take previous values into consideration.

Authorizations
Path parameters
distributionIdstring · uuidRequired

The ID (UUID) of the Distribution.

Example: 9ba15778-16c4-543c-8775-e52acf4853f5
Body
metadataanyOptional

Metadata

Responses
200
Distribution successfully updated.
application/json
put
PUT /distributions/{distributionId} HTTP/1.1
Host: cdn.de-fra.ionos.com
Authorization: Bearer JWT
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",
    "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"
        }
      }
    ]
  }
}

Delete Distribution

delete

Deletes the specified Distribution.

Authorizations
Path parameters
distributionIdstring · uuidRequired

The ID (UUID) of the Distribution.

Example: 9ba15778-16c4-543c-8775-e52acf4853f5
Responses
202
Deleting Distribution was successful.
delete
DELETE /distributions/{distributionId} HTTP/1.1
Host: cdn.de-fra.ionos.com
Authorization: Bearer JWT
Accept: */*

No content

Was this helpful?