Aliases

Add aliases in bulk

Changed on

Create up to 1000 aliases for one CDN resource in a single request.

The request is atomic: if any item is invalid, nothing is created and the errors are returned per item, in the same order as the request items. An item whose hostname is already an alias of the same CDN resource is reported in exists and left unchanged.

The aliases limit of your account is checked against the items that would be created.

post/cdn/aliases/add

Request

  • Base URL
    https://api.gcore.com
  • URL
    https://api.gcore.com/cdn/aliases/add
  • Auth
    HTTP apikey

Request body

resource_idinteger required

ID of the CDN resource whose settings the aliases are served with.

Example request

{
  "resource_id": 4567,
  "items": [
    {
      "cname": "shop.example.com",
      "ssl_id": 890,
      "challenge_type": "http_01"
    }
  ]
}

Response

Successful.

Example response

{
  "created": [
    {
      "id": 1,
      "cname": "shop.example.com",
      "status": "pending",
      "ssl_status": "pending"
    }
  ],
  "exists": [
    {
      "id": 7,
      "cname": "www.example.com",
      "status": "active",
      "ssl_status": "issued"
    }
  ]
}

Changes

    • warning

      added the new http_only enum value to the // response property for the response status

    • warning

      added the new http_only enum value to the // response property for the response status

    • info

      added the new optional request property //

    • info

      removed the ssl_error enum value from the // response property for the response status

    • info

      removed the ssl_error enum value from the // response property for the response status

    • info

      removed the ssl_issuing enum value from the // response property for the response status

    • info

      removed the ssl_issuing enum value from the // response property for the response status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status