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"

GitHub

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

Installation

go get -u github.com/IBM/networking-go-sdk

GitHub

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
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 Routing feature smart routing setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/routing/smart_routing
get_smart_routing(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetSmartRouting(getSmartRoutingOptions *GetSmartRoutingOptions) (result *SmartRoutingResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetSmartRoutingOptions struct and set the fields to provide parameter values for the GetSmartRouting method.

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()
    
  • package main
    
    import (
    	"fmt"
    	"os"
    
    	"github.com/IBM/go-sdk-core/core"
    	"github.com/IBM/networking-go-sdk/routingv1"
    )
    
    func main() {
    	authenticator := &core.IamAuthenticator{
    		ApiKey: os.Getenv("CIS_SERVICES_APIKEY"),
    		URL:    os.Getenv("CIS_SERVICES_AUTH_URL"),
    	}
    	serviceURL := os.Getenv("API_ENDPOINT")
    	crn := os.Getenv("CRN")
    	zoneID := os.Getenv("ZONE_ID")
    	globalOptions := &routingv1.RoutingV1Options{
    		ServiceName:    "cis_services",
    		URL:            serviceURL,
    		Authenticator:  authenticator,
    		Crn:            &crn,
    		ZoneIdentifier: &zoneID,
    	}
    	service, serviceErr := routingv1.NewRoutingV1(globalOptions)
    	if serviceErr != nil {
    		return
    	}
    	options := service.NewGetSmartRoutingOptions()
    	result, response, err := service.GetSmartRouting(options)
    	if err != nil {
    		return
    	}
    	fmt.Println(*result.Result.ID, response.RawResult)
    }
    

Response

Response type: SmartRoutingResp

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.

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
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateSmartRouting(updateSmartRoutingOptions *UpdateSmartRoutingOptions) (result *SmartRoutingResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateSmartRoutingOptions struct and set the fields to provide parameter values for the UpdateSmartRouting method.

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: [on,off]

The UpdateSmartRouting options.

  • 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()
    
  • package main
    
    import (
    	"fmt"
    	"os"
    
    	"github.com/IBM/go-sdk-core/core"
    	"github.com/IBM/networking-go-sdk/routingv1"
    )
    
    func main() {
    	authenticator := &core.IamAuthenticator{
    		ApiKey: os.Getenv("CIS_SERVICES_APIKEY"),
    		URL:    os.Getenv("CIS_SERVICES_AUTH_URL"),
    	}
    	serviceURL := os.Getenv("API_ENDPOINT")
    	crn := os.Getenv("CRN")
    	zoneID := os.Getenv("ZONE_ID")
    	globalOptions := &routingv1.RoutingV1Options{
    		ServiceName:    "cis_services",
    		URL:            serviceURL,
    		Authenticator:  authenticator,
    		Crn:            &crn,
    		ZoneIdentifier: &zoneID,
    	}
    	service, serviceErr := routingv1.NewRoutingV1(globalOptions)
    	if serviceErr != nil {
    		return
    	}
    	options := service.NewUpdateSmartRoutingOptions()
    	options.SetValue(routingv1.UpdateSmartRoutingOptions_Value_On)
    	result, response, err := service.UpdateSmartRouting(options)
    	if err != nil {
    		return
    	}
    	fmt.Println(*result.Result.ID, response.RawResult)
    }
    

Response

Response type: SmartRoutingResp

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 DNSSEC setting for a given zone.

GET /v1/{crn}/zones/{zone_identifier}/dnssec
get_zone_dnssec(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetZoneDnssec(getZoneDnssecOptions *GetZoneDnssecOptions) (result *ZonesDnssecResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetZoneDnssecOptions struct and set the fields to provide parameter values for the GetZoneDnssec method.

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()
    
  • package main
    
    import (
    	"fmt"
    	"os"
    
    	"github.com/IBM/go-sdk-core/core"
    	"github.com/IBM/networking-go-sdk/zonessettingsv1"
    )
    
    func main() {
    	authenticator := &core.IamAuthenticator{
    		ApiKey: os.Getenv("CIS_SERVICES_APIKEY"),
    		URL:    os.Getenv("CIS_SERVICES_AUTH_URL"),
    	}
    	serviceURL := os.Getenv("API_ENDPOINT")
    	crn := os.Getenv("CRN")
    	zoneID := os.Getenv("ZONE_ID")
    	globalOptions := &zonessettingsv1.ZonesSettingsV1Options{
    		ServiceName:    "cis_services",
    		URL:            serviceURL,
    		Authenticator:  authenticator,
    		Crn:            &crn,
    		ZoneIdentifier: &zoneID,
    	}
    	service, serviceErr := zonessettingsv1.NewZonesSettingsV1(globalOptions)
    	if serviceErr != nil {
    		return
    	}
    	options := service.NewGetZoneDnssecOptions()
    	result, response, err := service.GetZoneDnssec(options)
    	if err != nil {
    		return
    	}
    	fmt.Println(*result.Result.Status, response.RawResult)
    }
    

Response

Response type: ZonesDnssecResp

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": []
    }

Update zone DNSSEC.

Update DNSSEC setting for given zone.

Update DNSSEC setting for given zone.

Update DNSSEC setting for given zone.

PATCH /v1/{crn}/zones/{zone_identifier}/dnssec
update_zone_dnssec(self,
        *,
        status: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateZoneDnssec(updateZoneDnssecOptions *UpdateZoneDnssecOptions) (result *ZonesDnssecResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateZoneDnssecOptions struct and set the fields to provide parameter values for the UpdateZoneDnssec method.

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.

  • Status.

    Allowable values: [active,disabled]

The UpdateZoneDnssec options.

  • 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)
    ...
    
  • ...
    options := service.NewUpdateZoneDnssecOptions()
    options.SetStatus(zonessettingsv1.UpdateZoneDnssecOptions_Status_Active)
    result, response, err := service.UpdateZoneDnssec(options)
    ...
    

Response

Response type: ZonesDnssecResp

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 CNAME flattening setting for a given zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/cname_flattening
get_zone_cname_flattening(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetZoneCnameFlattening(getZoneCnameFlatteningOptions *GetZoneCnameFlatteningOptions) (result *ZonesCnameFlatteningResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetZoneCnameFlatteningOptions struct and set the fields to provide parameter values for the GetZoneCnameFlattening method.

Path Parameters

  • Full CRN of the service instance

  • Identifier of zone

parameters

  • Full CRN of the service instance.

  • Identifier of zone.

  • 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()
    ...
    
  • ...
    options := service.NewGetZoneCnameFlatteningOptions()
    result, response, err := service.GetZoneCnameFlattening(options)
    ...
    

Response

Response type: ZonesCnameFlatteningResp

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.

Update CNAME flattening setting for given zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/cname_flattening
update_zone_cname_flattening(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateZoneCnameFlattening(updateZoneCnameFlatteningOptions *UpdateZoneCnameFlatteningOptions) (result *ZonesCnameFlatteningResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateZoneCnameFlatteningOptions struct and set the fields to provide parameter values for the UpdateZoneCnameFlattening method.

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.

  • 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]

The UpdateZoneCnameFlattening options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateZoneCnameFlatteningOptions()
    options.SetValue(zonessettingsv1.UpdateZoneCnameFlatteningOptions_Value_FlattenAll)
    result, response, err := service.UpdateZoneCnameFlattening(options)
    ...
    

Response

Response type: ZonesCnameFlatteningResp

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 opportunistic encryption setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/opportunistic_encryption
get_opportunistic_encryption(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetOpportunisticEncryption(getOpportunisticEncryptionOptions *GetOpportunisticEncryptionOptions) (result *OpportunisticEncryptionResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetOpportunisticEncryptionOptions struct and set the fields to provide parameter values for the GetOpportunisticEncryption method.

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/settings/opportunistic_encryption   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_opportunistic_encryption()
    ...
    
  • ...
    options := service.NewGetOpportunisticEncryptionOptions()
    result, response, err := service.GetOpportunisticEncryption(options)
    ...
    

Response

Response type: OpportunisticEncryptionResp

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": "off",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "opportunistic_encryption",
        "value": "off",
        "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.

Update opportunistic encryption setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/opportunistic_encryption
update_opportunistic_encryption(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateOpportunisticEncryption(updateOpportunisticEncryptionOptions *UpdateOpportunisticEncryptionOptions) (result *OpportunisticEncryptionResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateOpportunisticEncryptionOptions struct and set the fields to provide parameter values for the UpdateOpportunisticEncryption method.

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.

  • Value.

    Allowable values: [on,off]

The UpdateOpportunisticEncryption options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateOpportunisticEncryptionOptions()
    options.SetValue(zonessettingsv1.UpdateOpportunisticEncryptionOptions_Value_Off)
    result, response, err := service.UpdateOpportunisticEncryption(options)
    ...
    

Response

Response type: OpportunisticEncryptionResp

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 challenge TTL setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/challenge_ttl
get_challenge_ttl(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetChallengeTTL(getChallengeTtlOptions *GetChallengeTtlOptions) (result *ChallengeTtlResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetChallengeTtlOptions struct and set the fields to provide parameter values for the GetChallengeTTL method.

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/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()
    
  • ...
    options := service.NewGetChallengeTtlOptions()
    result, response, err := service.GetChallengeTTL(options)
    ...
    

Response

Response type: ChallengeTtlResp

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.

Update challenge TTL setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/challenge_ttl
update_challenge_ttl(self,
        *,
        value: int = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateChallengeTTL(updateChallengeTtlOptions *UpdateChallengeTtlOptions) (result *ChallengeTtlResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateChallengeTtlOptions struct and set the fields to provide parameter values for the UpdateChallengeTTL method.

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.

  • Value.

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

The UpdateChallengeTTL options.

  • 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)
    ...
    
  • ...
    options := service.NewUpdateChallengeTtlOptions()
    options.SetValue(14400)
    result, response, err := service.UpdateChallengeTTL(options)
    ...
    

Response

Response type: ChallengeTtlResp

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 automatic https rewrites setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/automatic_https_rewrites
get_automatic_https_rewrites(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetAutomaticHttpsRewrites(getAutomaticHttpsRewritesOptions *GetAutomaticHttpsRewritesOptions) (result *AutomaticHttpsRewritesResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetAutomaticHttpsRewritesOptions struct and set the fields to provide parameter values for the GetAutomaticHttpsRewrites method.

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/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()
    ...
    
  • ...
    options := service.NewGetAutomaticHttpsRewritesOptions()
    result, response, err := service.GetAutomaticHttpsRewrites(options)
    ...
    

Response

Response type: AutomaticHttpsRewritesResp

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": "off",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "automatic_https_rewrites",
        "value": "off",
        "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.

Update automatic https rewrites setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/automatic_https_rewrites
update_automatic_https_rewrites(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateAutomaticHttpsRewrites(updateAutomaticHttpsRewritesOptions *UpdateAutomaticHttpsRewritesOptions) (result *AutomaticHttpsRewritesResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateAutomaticHttpsRewritesOptions struct and set the fields to provide parameter values for the UpdateAutomaticHttpsRewrites method.

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.

  • Value.

    Allowable values: [on,off]

The UpdateAutomaticHttpsRewrites options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateAutomaticHttpsRewritesOptions()
    options.SetValue(zonessettingsv1.UpdateAutomaticHttpsRewritesOptions_Value_On)
    result, response, err := service.UpdateAutomaticHttpsRewrites(options)
    ...
    

Response

Response type: AutomaticHttpsRewritesResp

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 true client IP setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/true_client_ip_header
get_true_client_ip(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetTrueClientIp(getTrueClientIpOptions *GetTrueClientIpOptions) (result *TrueClientIpResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetTrueClientIpOptions struct and set the fields to provide parameter values for the GetTrueClientIp method.

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/settings/true_client_ip_header   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_true_client_ip()
    ...
    
  • ...
    options := service.NewGetTrueClientIpOptions()
    result, response, err := service.GetTrueClientIp(options)
    ...
    

Response

Response type: TrueClientIpResp

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": "off",
        "modified_on": "2018-12-08T13:51:57.862Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "true_client_ip_header",
        "value": "off",
        "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.

Update true client IP setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/true_client_ip_header
update_true_client_ip(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateTrueClientIp(updateTrueClientIpOptions *UpdateTrueClientIpOptions) (result *TrueClientIpResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateTrueClientIpOptions struct and set the fields to provide parameter values for the UpdateTrueClientIp method.

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.

  • Value.

    Allowable values: [on,off]

The UpdateTrueClientIp options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateTrueClientIpOptions()
    options.SetValue(zonessettingsv1.UpdateTrueClientIpOptions_Value_Off)
    result, response, err := service.UpdateTrueClientIp(options)
    ...
    

Response

Response type: TrueClientIpResp

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 always use https setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/always_use_https
get_always_use_https(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetAlwaysUseHttps(getAlwaysUseHttpsOptions *GetAlwaysUseHttpsOptions) (result *AlwaysUseHttpsResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetAlwaysUseHttpsOptions struct and set the fields to provide parameter values for the GetAlwaysUseHttps method.

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/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()
    ...
    
  • ...
    options := service.NewGetAlwaysUseHttpsOptions()
    result, response, err := service.GetAlwaysUseHttps(options)
    ...
    

Response

Response type: AlwaysUseHttpsResp

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": "off",
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "always_use_https",
        "value": "off",
        "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.

Update always use https setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/always_use_https
update_always_use_https(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateAlwaysUseHttps(updateAlwaysUseHttpsOptions *UpdateAlwaysUseHttpsOptions) (result *AlwaysUseHttpsResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateAlwaysUseHttpsOptions struct and set the fields to provide parameter values for the UpdateAlwaysUseHttps method.

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.

  • Value.

    Allowable values: [on,off]

The UpdateAlwaysUseHttps options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateAlwaysUseHttpsOptions()
    options.SetValue(zonessettingsv1.UpdateAlwaysUseHttpsOptions_Value_On)
    result, response, err := service.UpdateAlwaysUseHttps(options)
    ...
    

Response

Response type: AlwaysUseHttpsResp

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 image size optimization setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/image_size_optimization
get_image_size_optimization(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetImageSizeOptimization(getImageSizeOptimizationOptions *GetImageSizeOptimizationOptions) (result *ImageSizeOptimizationResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetImageSizeOptimizationOptions struct and set the fields to provide parameter values for the GetImageSizeOptimization method.

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/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()
    ...
    
  • ...
    options := service.NewGetImageSizeOptimizationOptions()
    result, response, err := service.GetImageSizeOptimization(options)
    ...
    

Response

Response type: ImageSizeOptimizationResp

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": "off"
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "modified_on": "2018-12-08T13:53:17.136Z",
        "editable": true,
        "id": "image_size_optimization",
        "value": "off"
      },
      "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.

Update image size optimization setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/image_size_optimization
update_image_size_optimization(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateImageSizeOptimization(updateImageSizeOptimizationOptions *UpdateImageSizeOptimizationOptions) (result *ImageSizeOptimizationResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateImageSizeOptimizationOptions struct and set the fields to provide parameter values for the UpdateImageSizeOptimization method.

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.

  • 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: [off,lossless,lossy]

The UpdateImageSizeOptimization options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateImageSizeOptimizationOptions()
    options.SetValue(zonessettingsv1.UpdateImageLoadOptimizationOptions_Value_On)
    result, response, err := service.UpdateImageSizeOptimization(options)
    ...
    

Response

Response type: ImageSizeOptimizationResp

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 script load optimization setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/script_load_optimization
get_script_load_optimization(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetScriptLoadOptimization(getScriptLoadOptimizationOptions *GetScriptLoadOptimizationOptions) (result *ScriptLoadOptimizationResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetScriptLoadOptimizationOptions struct and set the fields to provide parameter values for the GetScriptLoadOptimization method.

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/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()
    ...
    
  • ...
    options := service.NewGetScriptLoadOptimizationOptions()
    result, response, err := service.GetScriptLoadOptimization(options)
    ...
    

Response

Response type: ScriptLoadOptimizationResp

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": "off"
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "modified_on": "2018-12-08T13:51:51.231Z",
        "editable": true,
        "id": "script_load_optimization",
        "value": "off"
      },
      "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.

Update script load optimization setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/script_load_optimization
update_script_load_optimization(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateScriptLoadOptimization(updateScriptLoadOptimizationOptions *UpdateScriptLoadOptimizationOptions) (result *ScriptLoadOptimizationResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateScriptLoadOptimizationOptions struct and set the fields to provide parameter values for the UpdateScriptLoadOptimization method.

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.

  • Value.

    Allowable values: [on,off]

The UpdateScriptLoadOptimization options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateScriptLoadOptimizationOptions()
    options.SetValue(zonessettingsv1.UpdateScriptLoadOptimizationOptions_Value_Off)
    result, response, err := service.UpdateScriptLoadOptimization(options)
    ...
    

Response

Response type: ScriptLoadOptimizationResp

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 image load optimizationn setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/image_load_optimization
get_image_load_optimization(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetImageLoadOptimization(getImageLoadOptimizationOptions *GetImageLoadOptimizationOptions) (result *ImageLoadOptimizationResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetImageLoadOptimizationOptions struct and set the fields to provide parameter values for the GetImageLoadOptimization method.

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/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()
    ...
    
  • ...
    options := service.NewGetImageLoadOptimizationOptions()
    result, response, err := service.GetImageLoadOptimization(options)
    ...
    

Response

Response type: ImageLoadOptimizationResp

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": "off",
        "modified_on": "2018-12-08T13:51:38.150Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "image_load_optimization",
        "value": "off",
        "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.

Update image load optimizationn setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/image_load_optimization
update_image_load_optimization(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateImageLoadOptimization(updateImageLoadOptimizationOptions *UpdateImageLoadOptimizationOptions) (result *ImageLoadOptimizationResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateImageLoadOptimizationOptions struct and set the fields to provide parameter values for the UpdateImageLoadOptimization method.

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.

  • Value.

    Allowable values: [on,off]

The UpdateImageLoadOptimization options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateImageLoadOptimizationOptions()
    options.SetValue(zonessettingsv1.UpdateImageLoadOptimizationOptions_Value_Off)
    result, response, err := service.UpdateImageLoadOptimization(options)
    ...
    

Response

Response type: ImageLoadOptimizationResp

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 minify setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/minify
get_minify(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetMinify(getMinifyOptions *GetMinifyOptions) (result *MinifyResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetMinifyOptions struct and set the fields to provide parameter values for the GetMinify method.

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/settings/minify   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_minify().get_result()
    ...
    
  • ...
    options := service.NewGetMinifyOptions()
    result, response, err := service.GetMinify(options)
    ...
    

Response

Response type: MinifyResp

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": "off",
          "css": "off",
          "js": "off"
        },
        "modified_on": "2018-12-08T13:53:20.633Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "minify",
        "value": {
          "html": "off",
          "css": "off",
          "js": "off"
        },
        "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.

Update minify setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/minify
update_minify(self,
        *,
        value: 'MinifySettingValue' = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateMinify(updateMinifyOptions *UpdateMinifyOptions) (result *MinifyResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateMinifyOptions struct and set the fields to provide parameter values for the UpdateMinify method.

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.

  • Value.

The UpdateMinify options.

  • 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)
    ...
    
  • ...
    options := service.NewUpdateMinifyOptions()
    minifyOpt, err := service.NewMinifySettingValue(zonessettingsv1.MinifySettingValue_Css_Off, zonessettingsv1.MinifySettingValue_HTML_Off, zonessettingsv1MinifySettingValue_Js_Off)
    if err != nil {
    	return
    }
    options.SetValue(minifyOpt)
    result, response, err := service.UpdateMinTlsVersion(options)
    ...
    

Response

Response type: MinifyResp

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 minimum TLS version setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/min_tls_version
get_min_tls_version(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetMinTlsVersion(getMinTlsVersionOptions *GetMinTlsVersionOptions) (result *MinTlsVersionResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetMinTlsVersionOptions struct and set the fields to provide parameter values for the GetMinTlsVersion method.

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/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()
    ...
    
  • ...
    options := service.NewGetMinTlsVersionOptions()
    result, response, err := service.GetMinTlsVersion(options)
    ...
    

Response

Response type: MinTlsVersionResp

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.

Update minimum TLS version setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/min_tls_version
update_min_tls_version(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateMinTlsVersion(updateMinTlsVersionOptions *UpdateMinTlsVersionOptions) (result *MinTlsVersionResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateMinTlsVersionOptions struct and set the fields to provide parameter values for the UpdateMinTlsVersion method.

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.

  • Value.

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

The UpdateMinTlsVersion options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateMinTlsVersionOptions()
    options.SetValue("1.2")
    result, response, err := service.UpdateMinTlsVersion(options)
    ...
    

Response

Response type: MinTlsVersionResp

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 IP geolocation setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/ip_geolocation
get_ip_geolocation(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetIpGeolocation(getIpGeolocationOptions *GetIpGeolocationOptions) (result *IpGeolocationResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetIpGeolocationOptions struct and set the fields to provide parameter values for the GetIpGeolocation method.

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/settings/ip_geolocation   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_ip_geolocation()
    ...
    
  • ...
    options := service.NewGetIpGeolocationOptions()
    result, response, err := service.GetIpGeolocation(options)
    ...
    

Response

Response type: IpGeolocationResp

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": "off",
        "modified_on": "2018-12-08T13:51:13.916Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "ip_geolocation",
        "value": "off",
        "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.

Update IP geolocation setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/ip_geolocation
update_ip_geolocation(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateIpGeolocation(updateIpGeolocationOptions *UpdateIpGeolocationOptions) (result *IpGeolocationResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateIpGeolocationOptions struct and set the fields to provide parameter values for the UpdateIpGeolocation method.

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.

  • Value.

    Allowable values: [on,off]

The UpdateIpGeolocation options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateIpGeolocationOptions()
    options.SetValue(zonessettingsv1.UpdateIpGeolocationOptions_Value_On)
    result, response, err := service.UpdateIpGeolocation(options)
    ...
    

Response

Response type: IpGeolocationResp

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 server side exclude setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/server_side_exclude
get_server_side_exclude(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetServerSideExclude(getServerSideExcludeOptions *GetServerSideExcludeOptions) (result *ServerSideExcludeResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetServerSideExcludeOptions struct and set the fields to provide parameter values for the GetServerSideExclude method.

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/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()
    ...
    
  • ...
    options := service.NewGetServerSideExcludeOptions()
    result, response, err := service.GetServerSideExclude(options)
    ...
    

Response

Response type: ServerSideExcludeResp

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": "off",
        "modified_on": "2018-12-08T13:51:24.448Z",
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "server_side_exclude",
        "value": "off",
        "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.

Update server side exclude setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/server_side_exclude
update_server_side_exclude(self,
        *,
        value: str = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateServerSideExclude(updateServerSideExcludeOptions *UpdateServerSideExcludeOptions) (result *ServerSideExcludeResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateServerSideExcludeOptions struct and set the fields to provide parameter values for the UpdateServerSideExclude method.

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.

  • Value.

    Allowable values: [on,off]

The UpdateServerSideExclude options.

  • 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")
    ...
    
  • ...
    options := service.NewUpdateServerSideExcludeOptions()
    options.SetValue(zonessettingsv1.UpdateServerSideExcludeOptions_Value_On)
    result, response, err := service.UpdateServerSideExclude(options)
    ...
    

Response

Response type: ServerSideExcludeResp

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 HTTP strict transport security setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/security_header
get_security_header(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetSecurityHeader(getSecurityHeaderOptions *GetSecurityHeaderOptions) (result *SecurityHeaderResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetSecurityHeaderOptions struct and set the fields to provide parameter values for the GetSecurityHeader method.

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/settings/security_header   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_security_header()
    ...
    
  • ...
    options := service.NewGetSecurityHeaderOptions()
    result, response, err := service.GetSecurityHeader(options)
    ...
    

Response

Response type: SecurityHeaderResp

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.

Update HTTP strict transport security setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/security_header
update_security_header(self,
        *,
        value: 'SecurityHeaderSettingValue' = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateSecurityHeader(updateSecurityHeaderOptions *UpdateSecurityHeaderOptions) (result *SecurityHeaderResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateSecurityHeaderOptions struct and set the fields to provide parameter values for the UpdateSecurityHeader method.

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.

  • Value.

The UpdateSecurityHeader options.

  • 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)
    ...
    
  • ...
    options := service.NewUpdateSecurityHeaderOptions()
    valueOpt, err := service.NewSecurityHeaderSettingValueStrictTransportSecurity(true, 3600, true, true)
    if err != nil {
    	return
    }
    securityOpt, err := service.NewSecurityHeaderSettingValue(valueOpt)
    if err != nil {
    	return
    }
    options.SetValue(securityOpt)
    result, response, err := service.UpdateSecurityHeader(options)
    ...
    

Response

Response type: SecurityHeaderResp

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 mobile redirect setting for a zone.

GET /v1/{crn}/zones/{zone_identifier}/settings/mobile_redirect
get_mobile_redirect(self,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) GetMobileRedirect(getMobileRedirectOptions *GetMobileRedirectOptions) (result *MobileRedirectResp, response *core.DetailedResponse, err error)

Request

Instantiate the GetMobileRedirectOptions struct and set the fields to provide parameter values for the GetMobileRedirect method.

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/settings/mobile_redirect   -H 'content-type: application/json'   -H 'accept: application/json'   -H 'x-auth-user-token: Bearer xxxxxx'
    
  • ...
    response = zonesSettings.get_mobile_redirect()
    ...
    
  • ...
    options := service.NewGetMobileRedirectOptions()
    result, response, err := service.GetMobileRedirect(options)
    ...
    

Response

Response type: MobileRedirectResp

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": "off",
          "strip_uri": false,
          "mobile_subdomain": null
        },
        "modified_on": null,
        "editable": true
      },
      "success": true,
      "errors": [],
      "messages": []
    }
  • {
      "result": {
        "id": "mobile_redirect",
        "value": {
          "status": "off",
          "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.

Update mobile redirect setting for a zone.

PATCH /v1/{crn}/zones/{zone_identifier}/settings/mobile_redirect
update_mobile_redirect(self,
        *,
        value: 'MobileRedirecSettingValue' = None,
        **kwargs
    ) -> DetailedResponse
(cloudInternetServicesApi *CloudInternetServicesApiV1) UpdateMobileRedirect(updateMobileRedirectOptions *UpdateMobileRedirectOptions) (result *MobileRedirectResp, response *core.DetailedResponse, err error)

Request

Instantiate the UpdateMobileRedirectOptions struct and set the fields to provide parameter values for the UpdateMobileRedirect method.

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.

  • Value.

The UpdateMobileRedirect options.

  • 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)
    ...
    
  • ...
    options := service.NewUpdateMobileRedirectOptions()
    mobileOpt, err := service.NewMobileRedirecSettingValue(zonessettingsv1.MobileRedirecSettingValue_Status_Off, "m", false)
    if err != nil {
    	return
    }
    options.SetValue(mobileOpt)
    result, response, err := service.UpdateMobileRedirect(options)
    ...