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.

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

  • DNS settings: you can use IBM 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 IBM CIS edge server, but does not encrypt the communication between the IBM CIS edge server and origin server.

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

API endpoint

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

API Endpoint

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. Please wait a few minutes and try again.

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

Success 200 Example Code

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
    }
  }
}

Failure 401 Example Code

401 Action unauthorized

{
  "trace": "be45687c-57f2-46e8-8717-32b3153a5886",
  "errors": [
    {
      "code": 401,
      "message": "Action is not authorized."
    }
  ]
}

Failure 404 Example:

404 API not found
{
  "trace": "c3c9f6af-a20f-4b73-8e3d-800a9284a07f",
  "errors": [
    {
      "code": null,
      "message": "404 Not Found"
    }
  ]
}

Methods

List all load balancers.

List configured load balancers.

GET /v1/{crn}/zones/{zone_identifier}/load_balancers
Request

Custom Headers

  • IBM Cloud user IAM token

Path Parameters

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

  • zone identifier

Response

Status Code

  • Success

  • Bad Request

  • Unathorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses

get a load balancer

For a given zone identifier and load balancer id, get the load balancer settings.

GET /v1/{crn}/zones/{zone_identifier}/load_balancers/{load_balancer_identifier}
Request

Custom Headers

  • IBM Cloud user IAM token

Path Parameters

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

  • zone identifier

  • load balancer identifier

Response

Status Code

  • Success

  • Bad Request

  • Unathorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses

Create a load balancer.

Create a load balancer for a given zone. The zone should be active before placing an order of a load balancer.

POST /v1/{crn}/zones/{zone_identifier}/load_balancers
Request

Custom Headers

  • IBM Cloud user IAM token

Path Parameters

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

  • zone identifier

Order a load balancer.

Response

Status Code

  • Success

  • Bad Request

  • Unathorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses

Edit a load balancer.

Edit porperties of an existing load balancer.

PUT /v1/{crn}/zones/{zone_identifier}/load_balancers/{load_balancer_identifier}
Request

Custom Headers

  • IBM Cloud user IAM token

Path Parameters

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

  • zone identifier

  • load balancer identifier

Edit properties

Response

Status Code

  • Success

  • Bad Request

  • Unathorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses

Delete a load balancer.

Delete a load balancer.

DELETE /v1/{crn}/zones/{zone_identifier}/load_balancers/{load_balancer_identifier}
Request

Custom Headers

  • IBM Cloud user IAM token

Path Parameters

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

  • zone identifier

  • load balancer identifier

Response

Status Code

  • Success

  • Bad Request

  • Unathorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses