> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/api-reference/network-services/cdn/distributions/retrieve-distribution.md).

# Retrieve Distribution

Returns the Distribution by ID.

```json
{"openapi":"3.0.3","info":{"title":"IONOS CLOUD - CDN Distribution API","version":"1.2.0"},"tags":[{"name":"Distributions","description":"A CDN distribution resource.\nThis tag groups all operations for distributions.\n"}],"servers":[{"url":"https://cdn.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The token can be generated using the \n[Authentication API](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate).\n"}},"schemas":{"DistributionRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","description":"The ID (UUID) of the Distribution.","format":"uuid"},"type":{"description":"The type of the resource.","type":"string","enum":["distribution"]},"href":{"description":"The URL of the Distribution.","type":"string"},"metadata":{"$ref":"#/components/schemas/DistributionMetadata"},"properties":{"$ref":"#/components/schemas/Distribution"}}},"DistributionMetadata":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Metadata"},{"$ref":"#/components/schemas/IpAddresses"},{"$ref":"#/components/schemas/DomainOwnershipVerification"},{"$ref":"#/components/schemas/ResourceState"}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","format":"date-time","description":"The ISO 8601 creation timestamp.","readOnly":true},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"Unique id of the identity that created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","format":"date-time","description":"The ISO 8601 modified timestamp.","readOnly":true},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"Unique id of the identity that last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"IpAddresses":{"type":"object","description":"The IP addresses of the distribution.\nNote that the IP addresses will be included in the response only when\nthe CDN distribution is in the 'AVAILABLE' state.\n","properties":{"publicEndpointIpv4":{"type":"string","format":"ipv4","description":"IP of the distribution. It has to be included on the domain DNS Zone as A record.","readOnly":true},"publicEndpointIpv6":{"type":"string","format":"ipv6","description":"IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.","readOnly":true}}},"DomainOwnershipVerification":{"type":"object","description":"Domain ownership verification data for the distribution.\nThese fields expose the TXT record the customer publishes in DNS to claim ownership of the\nconfigured domain. The customer is expected to publish this TXT record permanently in their\nDNS zone to secure ownership of the domain. If another tenant currently claims the same\ndomain, publishing this TXT record is required for the distribution to become available.\n","properties":{"ownershipTxtFqdn":{"type":"string","description":"FQDN where the TXT record must be published in DNS to claim ownership of the configured domain.\n","readOnly":true},"ownershipTxtValue":{"type":"string","description":"Opaque token value of the TXT record that must be published at ownershipTxtFqdn\nto claim ownership of the configured domain.\n","readOnly":true}}},"ResourceState":{"type":"object","description":"The current status of the resource.","required":["state"],"properties":{"state":{"type":"string","description":"Represents one of the possible states of the resource.","enum":["AVAILABLE","BUSY","FAILED","UNKNOWN"],"readOnly":true},"message":{"type":"string","description":"A human readable message describing the current state.\nIn case of an error, the message will contain a detailed error message.\n","readOnly":true}}},"Distribution":{"type":"object","description":"A CDN distribution resource.\n","required":["domain","routingRules"],"properties":{"domain":{"description":"The domain of the distribution.","type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","minLength":2,"maxLength":253},"certificateId":{"description":"The ID of the certificate to use for the distribution.","type":"string","format":"uuid"},"routingRules":{"type":"array","items":{"$ref":"#/components/schemas/RoutingRule"},"description":"The routing rules for the distribution.","minItems":1,"maxItems":25}}},"RoutingRule":{"type":"object","required":["prefix","upstream","scheme"],"properties":{"scheme":{"type":"string","description":"The scheme of the routing rule.","enum":["http","https","http/https"]},"prefix":{"type":"string","description":"The prefix of the routing rule.","pattern":"^(\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*[\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*]*)$","minLength":1,"maxLength":128},"upstream":{"$ref":"#/components/schemas/Upstream"}}},"Upstream":{"type":"object","required":["host","caching","waf","rateLimitClass","sniMode"],"properties":{"host":{"type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","description":"The upstream host that handles the requests if not already cached.\nThis host will be protected by the WAF if the option is enabled.\n"},"caching":{"type":"boolean","description":"Enable or disable caching.\nIf enabled, the CDN will cache the responses from the upstream host.\nSubsequent requests for the same resource will be served from the cache.\n"},"waf":{"type":"boolean","description":"Enable or disable WAF to protect the upstream host."},"geoRestrictions":{"description":"This field manages the list of countries that are allowed or blocked from accessing the resource\nfrom the upstream host based on their ISO 3166-1 alpha-2 codes.\n","oneOf":[{"type":"object","required":["blockList"],"properties":{"blockList":{"$ref":"#/components/schemas/CountryCodes"}}},{"type":"object","required":["allowList"],"properties":{"allowList":{"$ref":"#/components/schemas/CountryCodes"}}}]},"rateLimitClass":{"type":"string","enum":["R1","R5","R10","R25","R50","R100","R250","R500"],"description":"Rate limit class that will be applied to limit the number of incoming requests per IP."},"sniMode":{"type":"string","description":"The SNI (Server Name Indication) mode of the upstream host. It supports two modes:\n- distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate\nthat matches the configured domain of the CDN distribution.\n- origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that\nmatches the configured upstream/origin hostname.\n","enum":["distribution","origin"]}}},"CountryCodes":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]},"description":"Country codes, the format should be based on ISO 3166-1 alpha-2 codes standard.\nThese codes are used to either block or allow countries in geoIPBlock.\n"},"Error":{"description":"The Error object is used to represent an error response from the API.\n","type":"object","properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","description":"A list of error messages.\n","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe resource that was requested could not be found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"### Too Many Requests\nThe user has sent too many requests in a given amount of time.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"### Service Unavailable\nThe server is currently unable to handle the request due to a temporary overloading or maintenance of the server.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnexpectedError":{"description":"### Unexpected Internal Server Error\nAn unexpected internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/distributions/{distributionId}":{"get":{"operationId":"distributionsFindById","summary":"Retrieve Distribution","tags":["Distributions"],"description":"Returns the Distribution by ID.","parameters":[{"name":"distributionId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the Distribution."}],"responses":{"200":{"description":"Getting Distribution was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"default":{"$ref":"#/components/responses/UnexpectedError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/api-reference/network-services/cdn/distributions/retrieve-distribution.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
