Get domain
pages.projects.domains.get(strdomain_name, DomainGetParams**kwargs) -> DomainGetResponse
GET/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}
Fetch a single domain.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
Get domain
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
domain = client.pages.projects.domains.get(
domain_name="this-is-my-domain-01.com",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
project_name="this-is-my-project-01",
)
print(domain.id){
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "id",
"certificate_authority": "lets_encrypt",
"created_on": "created_on",
"domain_id": "domain_id",
"name": "this-is-my-domain-01.com",
"status": "initializing",
"validation_data": {
"method": "http",
"status": "initializing",
"error_message": "error_message",
"txt_name": "txt_name",
"txt_value": "txt_value"
},
"verification_data": {
"status": "pending",
"error_message": "error_message"
},
"zone_tag": "zone_tag"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "id",
"certificate_authority": "lets_encrypt",
"created_on": "created_on",
"domain_id": "domain_id",
"name": "this-is-my-domain-01.com",
"status": "initializing",
"validation_data": {
"method": "http",
"status": "initializing",
"error_message": "error_message",
"txt_name": "txt_name",
"txt_value": "txt_value"
},
"verification_data": {
"status": "pending",
"error_message": "error_message"
},
"zone_tag": "zone_tag"
},
"success": true
}