Introduction

IBM Cloud™ Internet Services (CIS), powered by Cloudflare, provides a fast, highly performant, reliable, and secure internet service for customers running their business on IBM Cloud.

CIS gets you going quickly by establishing defaults for you, which you can change by using the API or UI. Here are some commonly changed parameters:

  • DNS settings: you can use CIS to host your DNS or you can create CNAME records.
  • Crypto settings (TLS): the default is flexible mode, which encrypts the connection between your host and the CIS edge server, but does not encrypt the communication between the CIS edge server and origin server.

For complete information about establishing and managing an IBM Cloud Internet Services instance, refer to our customer documentation.

The code examples on this tab use the CIS Python SDK.

Installation

pip install --upgrade "ibm-cloud-networking-services"

Endpoint URL

The CIS API uses the following global endpoint URL for all regions. When you call the API, add the path for each method to form the complete API endpoint for your requests.

https://api.cis.cloud.ibm.com

https://api.cis.cloud.ibm.com

Error handling

This API uses standard HTTP response codes to indicate whether a method completed successfully. A 200 response always indicates success. A 400 type response is some sort of failure, and a 500 type response usually indicates an internal system error.

HTTP error code Description Recovery
200 Success The request was successful.
400 Bad Request The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request.
401 Unauthorized You are not authorized to make this request. Log in to IBM Cloud and try again. If this error persists, contact the account owner to check your permissions.
403 Forbidden The supplied authentication is not authorized to access '{namespace}'.
404 Not Found The requested resource could not be found.
408 Request Timeout The connection to the server timed out. Wait a few minutes, then try again.
409 Conflict The entity is already in the requested state.
500 Internal Server Error IBM Cloud Internet Services is currently unavailable. Your request could not be processed. Wait a few minutes and try again.

Here are some model code examples for error handling in the IBM Cloud Internet Services API:

200 The API was completed successfully

{
  "success": true,
  "errors": [
    {}
  ],
  "messages": [
    {}
  ],
  "result": {
    "zones": [
      {
        "zone": {
          "status": null,
          "name": null,
          "security": null,
          "paused": false
        },
        "dns_record": {
          "count": 0
        },
        "load_balancer": {
          "monitor_count": 0,
          "pool_count": 0,
          "load_balancer_active_count": 0
        },
        "caching": {
          "edge_cache_ttl": 0,
          "cache_browser_ttl": 0,
          "development_mode": "off",
          "cache_level": "basic"
        },
        "pagerule": {
          "active_count": 0,
          "inactive_count": 0
        },
        "waf": {
          "status": null
        },
        "ssl": {
          "mode": null,
          "universal_ssl_certificate": "off",
          "dedicate_certificate_count": 0,
          "custom_upload_certificate_count": 0,
          "tls_1_2_only": "on"
        },
        "plan_details": {
          "plan_name": "Standard",
          "days_remaining": null
        },
        "firewall": {
          "security_level": "low"
        }
      }
    ],
    "service_maintenance": {
      "start_time": null,
      "end_time": null,
      "message": null
    }
  }
}
401 Action unauthorized

{
  "trace": "be45687c-57f2-46e8-8717-32b3153a5886",
  "errors": [
    {
      "code": 401,
      "message": "Action is not authorized."
    }
  ]
}
404 API not found
{
  "trace": "c3c9f6af-a20f-4b73-8e3d-800a9284a07f",
  "errors": [
    {
      "code": null,
      "message": "404 Not Found"
    }
  ]
}

Authentication

The CIS API uses Identity and Access Management (IAM) to authenticate requests. Pass a bearer token in an Authorization header or an apikey. Tokens support authenticated requests without embedding service credentials in every call. API keys use basic authentication. Learn more about IAM.

Methods

Get Routing feature smart routing setting

Get Routing feature smart routing setting for a zone.

Get Routing feature smart routing setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/routing/smart_routing
get_smart_routing(self, **kwargs) -> DetailedResponse

Request

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/routing/smart_routing   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • import os
    from dotenv import load_dotenv
    from ibm_cloud_networking_services import RoutingV1
    
    def main():
        load_dotenv()
        # read crn, zone id and end-point from environment
        crn = os.getenv("CRN")
        zone_id = os.getenv("ZONE_ID")
        endpoint = os.getenv("API_ENDPOINT")
        # create instance
        route = RoutingV1.new_instance(
            crn=crn, zone_identifier=zone_id, service_name="cis_services")
        route.set_service_url(endpoint)
        resp = route.get_smart_routing()
        print(resp)
    
    if __name__ == "__main__":
        main()
    

Response

Response type: SmartRoutingResp

smart routing response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses
  • {
      "result": {
        "id": "smart_routing",
        "value": true,
        "editable": true,
        "modified_on": "2018-01-01T05:20:00.123Z"
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "smart_routing",
        "value": true,
        "editable": true,
        "modified_on": "2018-01-01T05:20:00.123Z"
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update Routing feature smart route setting

Update Routing feature smart route setting for a zone.

Update Routing feature smart route setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/routing/smart_routing
update_smart_routing(self, *, value: str = None, **kwargs) -> DetailedResponse

Request

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update Routing feature smart routing setting.

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/routing/smart_routing   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • import os
    from dotenv import load_dotenv
    from ibm_cloud_networking_services import RoutingV1
    
    def main():
        load_dotenv()
        # read crn, zone id and end-point from environment
        crn = os.getenv("CRN")
        zone_id = os.getenv("ZONE_ID")
        endpoint = os.getenv("API_ENDPOINT")
        # create instance
        route = RoutingV1.new_instance(
            crn=crn, zone_identifier=zone_id, service_name="cis_services")
        route.set_service_url(endpoint)
        resp = route.update_smart_routing(value="on")
        print(resp)
    
    if __name__ == "__main__":
        main()
    

Response

Response type: SmartRoutingResp

smart routing response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses
  • {
      "result": {
        "id": "smart_routing",
        "value": true,
        "editable": true,
        "modified_on": "2018-01-01T05:20:00.123Z"
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "smart_routing",
        "value": true,
        "editable": true,
        "modified_on": "2018-01-01T05:20:00.123Z"
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get zone DNSSEC.

Get DNSSEC setting for a given zone.

Get DNSSEC setting for a given zone.

GET /v1/{crn}/zones/{zone_identifier}/dnssec
get_zone_dnssec(self, **kwargs) -> DetailedResponse

Request

Path Parameters

  • Full url-encoded CRN of the service instance

  • Zone identifier to identifiy the zone.

parameters

  • Full url-encoded CRN of the service instance.

  • Zone identifier to identifiy the zone.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/dnssec   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • Map<String, String> headers = new HashMap<>();
    headers.put("content-type", "application/json");
    headers.put("accept", "application/json");
    headers.put("x-auth-user-token", "Bearer xxxxxx");
    HttpResponse<String> response = Unirest.get("https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/dnssec")
      .headers(headers).asString();
  • var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "api.cis.cloud.ibm.com",
      "port": null,
      "path": "/v1/:crn/zones/:zone_id/dnssec",
      "headers": {
         "accept": "application/json",
         "content-type": "application/json",
         "x-auth-user-token": "Bearer xxxxxx"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
  • import os
    from dotenv import load_dotenv
    from ibm_cloud_networking_services import ZonesSettingsV1
    
    def main():
        load_dotenv()
        # read crn and end-point from environment
        crn = os.getenv("CRN")
        zone_id = os.getenv("ZONE_ID")
        endpoint = os.getenv("API_ENDPOINT")
        # create instance
        zonesSettings = ZonesSettingsV1.new_instance(
            crn=crn, zone_identifier=zone_id, service_name="cis_services")
        zonesSettings.set_service_url(endpoint)
        resp = zonesSettings.get_zone_dnssec()
        print(resp)
    
    if __name__ == "__main__":
        main()
    

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses
  • {
      "result": {
        "status": "pending",
        "flags": 257,
        "algorithm": "13",
        "key_type": "ECDSAP256SHA256",
        "digest_type": "2",
        "digest_algorithm": "SHA256",
        "digest": "97C2244DC33CBC0B0E83A8B63209A7F160A5B7F779E23B1104744FB2821A798A",
        "ds": "example.com. 3600 IN DS 2371 13 2 97C2244DC33CBC0B0E83A8B63209A7F160A5B7F779E23B1104744FB2821A798A",
        "key_tag": 2371,
        "public_key": "mdsswUyr3DPW132mOi8V9xESWE8jTo0dxCjjnopKl+GqJxpVXckHAeF+KkxLbxILfDLUT0rAK9iUzy1L53eKGQ==",
        "modified_on": "2018-09-20T06:08:39.739Z"
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "status": "pending",
        "flags": 257,
        "algorithm": "13",
        "key_type": "ECDSAP256SHA256",
        "digest_type": "2",
        "digest_algorithm": "SHA256",
        "digest": "97C2244DC33CBC0B0E83A8B63209A7F160A5B7F779E23B1104744FB2821A798A",
        "ds": "example.com. 3600 IN DS 2371 13 2 97C2244DC33CBC0B0E83A8B63209A7F160A5B7F779E23B1104744FB2821A798A",
        "key_tag": 2371,
        "public_key": "mdsswUyr3DPW132mOi8V9xESWE8jTo0dxCjjnopKl+GqJxpVXckHAeF+KkxLbxILfDLUT0rAK9iUzy1L53eKGQ==",
        "modified_on": "2018-09-20T06:08:39.739Z"
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update zone DNSSEC.

Update DNSSEC setting for given zone.

Update DNSSEC setting for given zone.

PATCH /v1/{crn}/zones/{zone_identifier}/dnssec
update_zone_dnssec(self, *, accept: str = None, status: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded CRN of the service instance

  • Identifier of zone.

Update zone DNSSEC setting.

parameters

  • Full url-encoded CRN of the service instance.

  • Identifier of zone.

  • The type of the response: / or application/json.

  • Status.

    Allowable values: [active,disabled]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/dnssec   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"status": "enabled"}'
    
  • ...
    status = 'disabled'
    resp = zonesSettings.update_zone_dnssec(status=status)
    ...
    

Response

Response type: ZonesDnssecResp

Zones DNS Sec Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses
  • {
      "result": {
        "status": "pending",
        "flags": 257,
        "algorithm": "13",
        "key_type": "ECDSAP256SHA256",
        "digest_type": "2",
        "digest_algorithm": "SHA256",
        "digest": "97C2244DC33CBC0B0E83A8B63209A7F160A5B7F779E23B1104744FB2821A798A",
        "ds": "example.com. 3600 IN DS 2371 13 2 97C2244DC33CBC0B0E83A8B63209A7F160A5B7F779E23B1104744FB2821A798A",
        "key_tag": 2371,
        "public_key": "mdsswUyr3DPW132mOi8V9xESWE8jTo0dxCjjnopKl+GqJxpVXckHAeF+KkxLbxILfDLUT0rAK9iUzy1L53eKGQ==",
        "modified_on": "2018-09-20T06:08:39.739Z"
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "status": "pending",
        "flags": 257,
        "algorithm": "13",
        "key_type": "ECDSAP256SHA256",
        "digest_type": "2",
        "digest_algorithm": "SHA256",
        "digest": "97C2244DC33CBC0B0E83A8B63209A7F160A5B7F779E23B1104744FB2821A798A",
        "ds": "example.com. 3600 IN DS 2371 13 2 97C2244DC33CBC0B0E83A8B63209A7F160A5B7F779E23B1104744FB2821A798A",
        "key_tag": 2371,
        "public_key": "mdsswUyr3DPW132mOi8V9xESWE8jTo0dxCjjnopKl+GqJxpVXckHAeF+KkxLbxILfDLUT0rAK9iUzy1L53eKGQ==",
        "modified_on": "2018-09-20T06:08:39.739Z"
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get zone CNAME flattening.

Get CNAME flattening setting for a given zone.

Get CNAME flattening setting for a given zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/cname_flattening
get_zone_cname_flattening(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full CRN of the service instance

  • Identifier of zone

parameters

  • Full CRN of the service instance.

  • Identifier of zone.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/cname_flattening   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    resp = zonesSettings.get_zone_cname_flattening()
    ...
    

Response

Response type: ZonesCnameFlatteningResp

Zones CNAME flattening response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses
  • {
      "result": {
        "id": "cname_flattening",
        "value": "flatten_at_root",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "cname_flattening",
        "value": "flatten_at_root",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update zone CNAME flattening.

Update CNAME flattening setting for given zone.

Update CNAME flattening setting for given zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/cname_flattening
update_zone_cname_flattening(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded CRN of the service instance

  • Identifier of zone.

Update zone CNAME flattening setting.

parameters

  • Full url-encoded CRN of the service instance.

  • Identifier of zone.

  • The type of the response: / or application/json.

  • Valid values are "flatten_at_root", "flatten_all". "flatten_at_root" - Flatten CNAME at root domain. This is the default value. "flatten_all" - Flatten all CNAME records under your domain.

    Allowable values: [flatten_at_root,flatten_all]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/cname_flattening   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "flatten_at_root"}'
    
  • ...
    resp = zonesSettings.update_zone_cname_flattening(
        value="fatten_all")
    ...
    

Response

Response type: ZonesCnameFlatteningResp

Zones CNAME flattening response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses
  • {
      "result": {
        "id": "cname_flattening",
        "value": "flatten_at_root",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "cname_flattening",
        "value": "flatten_at_root",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get opportunistic encryption setting

Get opportunistic encryption setting for a zone.

Get opportunistic encryption setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/opportunistic_encryption
get_opportunistic_encryption(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/opportunistic_encryption   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_opportunistic_encryption()
    ...
    

Response

Response type: OpportunisticEncryptionResp

Oppertunistic encryption response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "opportunistic_encryption",
        "value": false,
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "opportunistic_encryption",
        "value": false,
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update opportunistic encryption setting

Update opportunistic encryption setting for a zone.

Update opportunistic encryption setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/opportunistic_encryption
update_opportunistic_encryption(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update opportunistic encryption setting.

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/opportunistic_encryption   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_opportunistic_encryption(
                value="on")
    ...
    

Response

Response type: OpportunisticEncryptionResp

Oppertunistic encryption response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "opportunistic_encryption",
        "value": true,
        "modified_on": "2018-10-08T09:32:10.916Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "opportunistic_encryption",
        "value": true,
        "modified_on": "2018-10-08T09:32:10.916Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get challenge TTL setting

Get challenge TTL setting for a zone.

Get challenge TTL setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/challenge_ttl
get_challenge_ttl(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/challenge_ttl   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • response = self.zonesSettings.get_challenge_ttl().get_result()
    

Response

Response type: ChallengeTtlResp

challenge TTL response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses
  • {
      "result": {
        "id": "challenge_ttl",
        "value": 1800,
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "challenge_ttl",
        "value": 1800,
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update challenge TTL setting

Update challenge TTL setting for a zone.

Update challenge TTL setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/challenge_ttl
update_challenge_ttl(self, *, accept: str = None, value: int = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update challenge TTL setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [300,900,1800,2700,3600,7200,10800,14400,28800,57600,86400,604800,2592000,31536000]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/challenge_ttl   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": 1800}'
    
  • ...
    response = zonesSettings.update_challenge_ttl(
                value=1800)
    ...
    

Response

Response type: ChallengeTtlResp

challenge TTL response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses
  • {
      "result": {
        "id": "challenge_ttl",
        "value": 1800,
        "modified_on": "2018-10-08T09:40:03.277Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "challenge_ttl",
        "value": 1800,
        "modified_on": "2018-10-08T09:40:03.277Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get automatic https rewrites setting

Get automatic https rewrites setting for a zone.

Get automatic https rewrites setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/automatic_https_rewrites
get_automatic_https_rewrites(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/automatic_https_rewrites   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_automatic_https_rewrites()
    ...
    

Response

Response type: AutomaticHttpsRewritesResp

automatic https rewrite response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "automatic_https_rewrites",
        "value": false,
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "automatic_https_rewrites",
        "value": false,
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update automatic https rewrites setting

Update automatic https rewrites setting for a zone.

Update automatic https rewrites setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/automatic_https_rewrites
update_automatic_https_rewrites(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update automatic https rewrites setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/automatic_https_rewrites   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_automatic_https_rewrites(
                value="on")
    ...
    

Response

Response type: AutomaticHttpsRewritesResp

automatic https rewrite response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "automatic_https_rewrites",
        "value": true,
        "modified_on": "2018-10-08T09:37:29.953Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "automatic_https_rewrites",
        "value": true,
        "modified_on": "2018-10-08T09:37:29.953Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get true client IP setting

Get true client IP setting for a zone.

Get true client IP setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/true_client_ip_header
get_ture_client_ip(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/true_client_ip_header   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_ture_client_ip()
    ...
    

Response

Response type: TrueClientIpResp

true client IP response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "true_client_ip_header",
        "value": false,
        "modified_on": "2018-12-08T13:51:57.862Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "true_client_ip_header",
        "value": false,
        "modified_on": "2018-12-08T13:51:57.862Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update true client IP setting

Update true client IP setting for a zone.

Update true client IP setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/true_client_ip_header
update_true_client_ip(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

zone property on/off setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/true_client_ip_header   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_true_client_ip(
                value="on")
    ...
    

Response

Response type: TrueClientIpResp

true client IP response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "true_client_ip_header",
        "value": true,
        "modified_on": "2018-12-08T18:58:10.519Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "true_client_ip_header",
        "value": true,
        "modified_on": "2018-12-08T18:58:10.519Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get always use https setting

Get always use https setting for a zone.

Get always use https setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/always_use_https
get_always_use_https(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/always_use_https   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_always_use_https()
    ...
    

Response

Response type: AlwaysUseHttpsResp

Always use http response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "always_use_https",
        "value": false,
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "always_use_https",
        "value": false,
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update always use https setting

Update always use https setting for a zone.

Update always use https setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/always_use_https
update_always_use_https(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

zone property on/off setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/always_use_https   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_always_use_https(
                value="on")
    ...
    

Response

Response type: AlwaysUseHttpsResp

Always use http response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "always_use_https",
        "value": true,
        "modified_on": "2018-12-08T18:57:07.794Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "always_use_https",
        "value": true,
        "modified_on": "2018-12-08T18:57:07.794Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get image size optimization setting

Get image size optimization setting for a zone.

Get image size optimization setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/image_size_optimization
get_image_size_optimization(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/image_size_optimization   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_image_size_optimization()
    ...
    

Response

Response type: ImageSizeOptimizationResp

Image size optimization response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "modified_on": "2018-12-08T13:53:17.136Z",
        "editable": true,
        "id": "image_size_optimization",
        "value": false
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "modified_on": "2018-12-08T13:53:17.136Z",
        "editable": true,
        "id": "image_size_optimization",
        "value": false
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update image size optimization setting

Update image size optimization setting for a zone.

Update image size optimization setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/image_size_optimization
update_image_size_optimization(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update image size optimization setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Valid values are "lossy", "off", "lossless". "lossy" - The file size of JPEG images is reduced using lossy compression, which may reduce visual quality. "off" - Disable Image Size Optimization. "lossless" - Reduce the size of image files without impacting visual quality.

    Allowable values: [false,lossless,lossy]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/image_size_optimization   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "lossless"}'
    
  • ...
    response = zonesSettings.update_image_size_optimization(
                value="lossless")
    ...
    

Response

Response type: ImageSizeOptimizationResp

Image size optimization response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "modified_on": "2018-12-08T18:59:35.557Z",
        "editable": true,
        "id": "image_size_optimization",
        "value": "lossless"
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "modified_on": "2018-12-08T18:59:35.557Z",
        "editable": true,
        "id": "image_size_optimization",
        "value": "lossless"
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get script load optimization setting

Get script load optimization setting for a zone.

Get script load optimization setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/script_load_optimization
get_script_load_optimization(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/script_load_optimization   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_script_load_optimization()
    ...
    

Response

Response type: ScriptLoadOptimizationResp

Script load optimization response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "modified_on": "2018-12-08T13:51:51.231Z",
        "editable": true,
        "id": "script_load_optimization",
        "value": false
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "modified_on": "2018-12-08T13:51:51.231Z",
        "editable": true,
        "id": "script_load_optimization",
        "value": false
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update script load optimization setting

Update script load optimization setting for a zone.

Update script load optimization setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/script_load_optimization
update_script_load_optimization(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update script load optimization setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/script_load_optimization   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_script_load_optimization(
                value="on")
    ...
    

Response

Response type: ScriptLoadOptimizationResp

Script load optimization response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "modified_on": "2018-12-08T18:58:03.362Z",
        "editable": true,
        "id": "script_load_optimization",
        "value": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "modified_on": "2018-12-08T18:58:03.362Z",
        "editable": true,
        "id": "script_load_optimization",
        "value": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get image load optimizationn setting

Get image load optimizationn setting for a zone.

Get image load optimizationn setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/image_load_optimization
get_image_load_optimization(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/image_load_optimization   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_image_load_optimization()
    ...
    

Response

Response type: ImageLoadOptimizationResp

Image Load Optimization response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "image_load_optimization",
        "value": false,
        "modified_on": "2018-12-08T13:51:38.150Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "image_load_optimization",
        "value": false,
        "modified_on": "2018-12-08T13:51:38.150Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update image load optimizationn setting

Update image load optimizationn setting for a zone.

Update image load optimizationn setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/image_load_optimization
update_image_load_optimization(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update image load optimizationn setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/image_load_optimization   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_image_load_optimization(
                value="on")
    ...
    

Response

Response type: ImageLoadOptimizationResp

Image Load Optimization response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "image_load_optimization",
        "value": true,
        "modified_on": "2018-12-08T18:57:49.315Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "image_load_optimization",
        "value": true,
        "modified_on": "2018-12-08T18:57:49.315Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get minify setting

Get minify setting for a zone.

Get minify setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/minify
get_minify(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/minify   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_minify().get_result()
    ...
    

Response

Response type: MinifyResp

Minify response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "minify",
        "value": {
          "html": false,
          "css": false,
          "js": false
        },
        "modified_on": "2018-12-08T13:53:20.633Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "minify",
        "value": {
          "html": false,
          "css": false,
          "js": false
        },
        "modified_on": "2018-12-08T13:53:20.633Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update minify setting

Update minify setting for a zone.

Update minify setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/minify
update_minify(self, *, accept: str = None, value: 'MinifySettingValue' = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update minify setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/minify   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"html": "on", "css": "on", "js": "on"}'
    
  • ...
    minfy = {
        'css': self.value,
        'html': self.value,
        'js': self.value
        }
    response = zonesSettings.update_minify(value=minify)
    ...
    

Response

Response type: MinifyResp

Minify response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "minify",
        "value": {
          "html": true,
          "css": true,
          "js": true
        },
        "modified_on": "2018-12-08T18:59:40.961Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "minify",
        "value": {
          "html": true,
          "css": true,
          "js": true
        },
        "modified_on": "2018-12-08T18:59:40.961Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get minimum TLS version setting

Get minimum TLS version setting for a zone.

Get minimum TLS version setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/min_tls_version
get_min_tls_version(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/min_tls_version   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_min_tls_version()
    ...
    

Response

Response type: MinTlsVersionResp

Minimum TLS Version response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "min_tls_version",
        "value": "1.3",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "min_tls_version",
        "value": "1.3",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update minimum TLS version setting

Update minimum TLS version setting for a zone.

Update minimum TLS version setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/min_tls_version
update_min_tls_version(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update minimum TLS version setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [1.0,1.1,1.2,1.3]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/min_tls_version   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "1.0"}'
    
  • ...
    response = zonesSettings.update_min_tls_version(
                value="1.2")
    ...
    

Response

Response type: MinTlsVersionResp

Minimum TLS Version response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "min_tls_version",
        "value": "1.0",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "min_tls_version",
        "value": "1.0",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get IP geolocation setting

Get IP geolocation setting for a zone.

Get IP geolocation setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/ip_geolocation
get_ip_geolocation(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/ip_geolocation   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_ip_geolocation()
    ...
    

Response

Response type: IpGeolocationResp

IP Geolocation response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "ip_geolocation",
        "value": false,
        "modified_on": "2018-12-08T13:51:13.916Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "ip_geolocation",
        "value": false,
        "modified_on": "2018-12-08T13:51:13.916Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update IP geolocation setting

Update IP geolocation setting for a zone.

Update IP geolocation setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/ip_geolocation
update_ip_geolocation(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update IP geolocation setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/ip_geolocation   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_ip_geolocation(
                value="on")
    ...
    

Response

Response type: IpGeolocationResp

IP Geolocation response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "ip_geolocation",
        "value": true,
        "modified_on": "2018-12-08T18:57:25.025Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "ip_geolocation",
        "value": true,
        "modified_on": "2018-12-08T18:57:25.025Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get server side exclude setting

Get server side exclude setting for a zone.

Get server side exclude setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/server_side_exclude
get_server_side_exclude(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/server_side_exclude   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_server_side_exclude()
    ...
    

Response

Response type: ServerSideExcludeResp

Response of server side exclude

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "server_side_exclude",
        "value": false,
        "modified_on": "2018-12-08T13:51:24.448Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "server_side_exclude",
        "value": false,
        "modified_on": "2018-12-08T13:51:24.448Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update server side exclude setting

Update server side exclude setting for a zone.

Update server side exclude setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/server_side_exclude
update_server_side_exclude(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update server side exclude setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/server_side_exclude   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_server_side_exclude(
                value="on")
    ...
    

Response

Response type: ServerSideExcludeResp

Response of server side exclude

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "server_side_exclude",
        "value": true,
        "modified_on": "2018-12-08T18:57:34.969Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "server_side_exclude",
        "value": true,
        "modified_on": "2018-12-08T18:57:34.969Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get HTTP strict transport security setting

Get HTTP strict transport security setting for a zone.

Get HTTP strict transport security setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/security_header
get_security_header(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/security_header   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_security_header()
    ...
    

Response

Response type: SecurityHeaderResp

Response of Security Header

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "security_header",
        "value": {
          "strict_transport_security": {
            "preload": false,
            "max_age": 0,
            "enabled": false,
            "include_subdomains": false,
            "nosniff": false
          }
        },
        "modified_on": "2018-12-08T13:53:24.178Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "security_header",
        "value": {
          "strict_transport_security": {
            "preload": false,
            "max_age": 0,
            "enabled": false,
            "include_subdomains": false,
            "nosniff": false
          }
        },
        "modified_on": "2018-12-08T13:53:24.178Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update HTTP strict transport security setting

Update HTTP strict transport security setting for a zone.

Update HTTP strict transport security setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/security_header
update_security_header(self, *, accept: str = None, value: 'SecurityHeaderSettingValue' = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update HTTP strict transport security setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/security_header   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": {"strict_transport_security": {"preload": true, "max_age": 100, "enabled": true, "include_subdomains": true, "nosniff": true}}}'
    
  • ...
    strict_transport_security = {
                "strict_transport_security": {
                    "enabled": True,
                    "max_age": 86400,
                    "include_subdomains": True,
                    "nosniff": True
                }}
    response = zonesSettings.update_security_header(
            value=strict_transport_security)
    ...
    

Response

Response type: SecurityHeaderResp

Response of Security Header

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "security_header",
        "value": {
          "strict_transport_security": {
            "preload": true,
            "max_age": 100,
            "enabled": true,
            "include_subdomains": true,
            "nosniff": true
          }
        },
        "modified_on": "2018-12-08T18:59:44.507Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "security_header",
        "value": {
          "strict_transport_security": {
            "preload": true,
            "max_age": 100,
            "enabled": true,
            "include_subdomains": true,
            "nosniff": true
          }
        },
        "modified_on": "2018-12-08T18:59:44.507Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get mobile redirect setting

Get mobile redirect setting for a zone.

Get mobile redirect setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/mobile_redirect
get_mobile_redirect(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/mobile_redirect   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_mobile_redirect()
    ...
    

Response

Response type: MobileRedirectResp

Mobile Redirect Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "mobile_redirect",
        "value": {
          "status": false,
          "strip_uri": false,
          "mobile_subdomain": null
        },
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "mobile_redirect",
        "value": {
          "status": false,
          "strip_uri": false,
          "mobile_subdomain": null
        },
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update mobile redirect setting

Update mobile redirect setting for a zone.

Update mobile redirect setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/mobile_redirect
update_mobile_redirect(self, *, accept: str = None, value: 'MobileRedirecSettingValue' = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update mobile redirect setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/mobile_redirect   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": {"status":"off","mobile_subdomain":"m","strip_uri":false}}'
    
  • ...
    value = {
            "status": "on",
            "mobile_subdomain": domain,
            "strip_uri": False
        }
    response = zonesSettings.update_mobile_redirect(
                value=value)
    ...
    

Response

Response type: MobileRedirectResp

Mobile Redirect Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "mobile_redirect",
        "value": {
          "status": false,
          "mobile_subdomain": "m",
          "strip_uri": false
        },
        "modified_on": "2018-12-08T18:57:07.794Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "mobile_redirect",
        "value": {
          "status": false,
          "mobile_subdomain": "m",
          "strip_uri": false
        },
        "modified_on": "2018-12-08T18:57:07.794Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get prefetch URLs from header setting

Get prefetch URLs from header setting for a zone.

Get prefetch URLs from header setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/prefetch_preload
get_prefetch_preload(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/prefetch_preload   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_prefetch_preload().get_result()
    ...
    

Response

Response type: PrefetchPreloadResp

Prefetch & Preload Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "prefetch_preload",
        "value": false,
        "modified_on": "2018-12-08T13:51:44.767Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "prefetch_preload",
        "value": false,
        "modified_on": "2018-12-08T13:51:44.767Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update prefetch URLs from header setting

Update prefetch URLs from header setting for a zone.

Update prefetch URLs from header setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/prefetch_preload
update_prefetch_preload(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update prefetch URLs from header setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/prefetch_preload   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_prefetch_preload(
                value="on")
    ...
    

Response

Response type: PrefetchPreloadResp

Prefetch & Preload Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "prefetch_preload",
        "value": true,
        "modified_on": "2018-12-08T18:57:56.421Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "prefetch_preload",
        "value": true,
        "modified_on": "2018-12-08T18:57:56.421Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get http/2 setting

Get http/2 setting for a zone.

Get http/2 setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/http2
get_http2(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/http2   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_http2()
    ...
    

Response

Response type: Http2Resp

HTTP2 Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "http2",
        "value": false,
        "modified_on": "2018-12-08T13:51:10.216Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "http2",
        "value": false,
        "modified_on": "2018-12-08T13:51:10.216Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update http/2 setting

Update http/2 setting for a zone.

Update http/2 setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/http2
update_http2(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update http/2 setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/http2   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_http2(
                value="on")
    ...
    

Response

Response type: Http2Resp

HTTP2 Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "http2",
        "value": true,
        "modified_on": "2018-12-08T18:57:21.423Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "http2",
        "value": true,
        "modified_on": "2018-12-08T18:57:21.423Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Get IPv6 compatibility setting

Get IPv6 compatibility setting for a zone.

Get IPv6 compatibility setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/ipv6
get_ipv6(self, *, accept: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • curl -X GET   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/ipv6   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_ipv6()
    ...
    

Response

Response type: Ipv6Resp

IPv6 Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

Example responses
  • {
      "result": {
        "id": "ipv6",
        "value": false,
        "modified_on": "2018-12-08T13:51:17.639Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "ipv6",
        "value": false,
        "modified_on": "2018-12-08T13:51:17.639Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }

Update IPv6 compatibility setting

Update IPv6 compatibility setting for a zone.

Update IPv6 compatibility setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/ipv6
update_ipv6(self, *, accept: str = None, value: str = None, **kwargs) -> DetailedResponse

Request

Custom Headers

  • Allowable values: [*/*,application/json]

Path Parameters

  • Full url-encoded cloud resource name (CRN) of resource instance

  • Zone identifier

Update IPv6 compatibility setting

parameters

  • Full url-encoded cloud resource name (CRN) of resource instance.

  • Zone identifier.

  • The type of the response: / or application/json.

  • Value.

    Allowable values: [true,false]

  • curl -X PATCH   https://api.cis.cloud.ibm.com/v1/:crn/zones/:zone_id/settings/ipv6   -H 'content-type: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'   -d '{"value": "on"}'
    
  • ...
    response = zonesSettings.update_ipv6(
                value="on")
    ...