Download OpenAPI specification:Download
API tokens are intended to be used for automated user not present integrations, that is where requesting interactive authentication would not be possible/desirable.
Users may create API tokens (if they have permissions to do so). The created token may have the same set of permissions and services as the user that created it, or any subset thereof. Users are not permitted to create tokens which have more permissions than themselves.
API tokens do not expire, and are only returned from the API once. After the API token has been created it's permissions may be modified, which allows for granting additional permissions to an application without needing to reconfigure it.
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 10 Max number of results per page |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "services": [
- "string"
], - "lastUsed": "2019-08-24T14:15:22Z",
- "permissions": [
- "P_ACCOUNT_ADMIN"
]
}
]
}
name required | string |
hideSecrets | boolean |
services | Array of strings[^[a-fA-F0-9]+$] |
permissions | Array of strings Items Enum: "P_ADMIN_VIEW" "P_ADMIN_MANAGE" "P_ADMIN_BILLING" "P_ADMIN_STATS" "P_ACCOUNT_ADMIN" "P_ACCOUNT_VIEW" "P_ACCOUNT_MANAGE" "P_BILLING_VIEW" "P_BILLING_MANAGE" "P_USER_PROFILE_VIEW" "P_USER_PROFILE_MANAGE" "P_USER_VIEW" "P_USER_MANAGE" "P_USER_GRANT_ALL" "P_SAML_VIEW" "P_SAML_MANAGE" "P_SERVICE_ALL" "P_SERVICE_PURGE" "P_SERVICE_VIEW" "P_SERVICE_MANAGE" "P_ORIGIN_VIEW" "P_ORIGIN_MANAGE" "P_CERTIFICATE_VIEW" "P_CERTIFICATE_MANAGE" "P_API_TOKENS_VIEW" "P_API_TOKENS_MANAGE" "P_STATS_VIEW" "P_STATS_MANAGE" "P_OBJECT_STORAGE_VIEW" "P_OBJECT_STORAGE_MANAGE" "P_LOG_TARGET_VIEW" "P_LOG_TARGET_MANAGE" "P_SCRIPT_CONFIG_VIEW" "P_SCRIPT_CONFIG_MANAGE" |
{- "name": "string",
- "hideSecrets": true,
- "services": [
- "stringstringstringstring"
], - "permissions": [
- "P_ADMIN_VIEW"
]
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "services": [
- "string"
], - "lastUsed": "2019-08-24T14:15:22Z",
- "permissions": [
- "P_ACCOUNT_ADMIN"
]
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "services": [
- "string"
], - "lastUsed": "2019-08-24T14:15:22Z",
- "permissions": [
- "P_ACCOUNT_ADMIN"
]
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
name | string |
hideSecrets | boolean |
services | Array of strings[^[a-fA-F0-9]+$] |
permissions | Array of strings Items Enum: "P_ADMIN_VIEW" "P_ADMIN_MANAGE" "P_ADMIN_BILLING" "P_ADMIN_STATS" "P_ACCOUNT_ADMIN" "P_ACCOUNT_VIEW" "P_ACCOUNT_MANAGE" "P_BILLING_VIEW" "P_BILLING_MANAGE" "P_USER_PROFILE_VIEW" "P_USER_PROFILE_MANAGE" "P_USER_VIEW" "P_USER_MANAGE" "P_USER_GRANT_ALL" "P_SAML_VIEW" "P_SAML_MANAGE" "P_SERVICE_ALL" "P_SERVICE_PURGE" "P_SERVICE_VIEW" "P_SERVICE_MANAGE" "P_ORIGIN_VIEW" "P_ORIGIN_MANAGE" "P_CERTIFICATE_VIEW" "P_CERTIFICATE_MANAGE" "P_API_TOKENS_VIEW" "P_API_TOKENS_MANAGE" "P_STATS_VIEW" "P_STATS_MANAGE" "P_OBJECT_STORAGE_VIEW" "P_OBJECT_STORAGE_MANAGE" "P_LOG_TARGET_VIEW" "P_LOG_TARGET_MANAGE" "P_SCRIPT_CONFIG_VIEW" "P_SCRIPT_CONFIG_MANAGE" |
{- "name": "string",
- "hideSecrets": true,
- "services": [
- "stringstringstringstring"
], - "permissions": [
- "P_ADMIN_VIEW"
]
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "services": [
- "string"
], - "lastUsed": "2019-08-24T14:15:22Z",
- "permissions": [
- "P_ACCOUNT_ADMIN"
]
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "services": [
- "string"
], - "lastUsed": "2019-08-24T14:15:22Z",
- "permissions": [
- "P_ACCOUNT_ADMIN"
]
}
List of permissions that currently logged in user (or token) can assign to token with given id.
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "permissions": [
- "P_ACCOUNT_ADMIN"
]
}
Logging in is intended to be used only when the user is present and actively interacting with the application. Logging in issues a new temporary API token which shares the same permission set as the authenticated user. The token should be discarded when the interactive session ends.
As the token is temporary it has an expiry date which is enforced by the API. The validity time for the token is typically one hour, but may be shorter. If needed the token can be renewed by exchanging it for a new temporary token.
See API Tokens for tokens which are to be used when the user is not present.
username required | string |
password required | string |
string or object |
{- "username": "string",
- "password": "string",
- "otp": "string"
}
{- "expiresAt": "2019-08-24T14:15:22Z",
- "token": "string"
}
The Account Recovery endpoints allows a user to recover access to their account when they have forgotten their authentication credentials.
If valid loginName
(email or username) is provided an email with account recovery code will be sent.
required | string or string |
{- "loginName": "user@example.com"
}
{- "hash": "string"
}
To verify your email address and proceed with account recovery a hash
string from previous step is required as well as recovery code
from email sent to user address.
hash required | string = 40 characters ^[a-fA-F0-9]+$ |
code required | string = 6 characters ^[a-fA-F0-9]+$ |
{- "hash": "stringstringstringstringstringstringstri",
- "code": "string"
}
{- "token": "string",
- "users": [
- {
- "_id": "string",
- "username": "string"
}
]
}
user required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
password required | string >= 8 characters |
token required | string |
{- "user": "stringstringstringstring",
- "password": "stringst",
- "token": "string"
}
{- "message": "string"
}
A CacheFly account is a representation of the entity who will be invoiced for provided services. All other API objects are contained within an account either directly or indirectly.
It is expected that most companies will need only one account. The concept of sub accounts found in the older version 1 API has been directly replaced by the concept of services. Opening multiple accounts is only required to separate invoicing concerns.
A shortcut endpoint to update account for currently logged in user
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
A shortcut endpoint to update account for currently logged in user
companyName | string |
string or string | |
address1 | string |
address2 | string |
city | string |
country | string |
state | string |
phone | string |
zip | string |
twoFactorAuthGracePeriod | integer [ 1 .. 30 ] |
samlRequired | boolean |
defaultDeliveryRegion | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "companyName": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthGracePeriod": 1,
- "samlRequired": true,
- "defaultDeliveryRegion": "stringstringstringstring"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
Two factor authentication will be enabled for the account of the current logged in user
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
Two factor authentication will be disabled for the account of the current logged in user
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
List accounts available to logged in user
isChild | boolean Filter by child accounts |
isParent | boolean Filter by parent accounts |
status | string Enum: "ACTIVE" "DEACTIVATED" |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 10 Max number of results per page |
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
]
}
Create a new child account under the parent account, only available for parent accounts.
companyName required | string |
username required | string [ 8 .. 32 ] characters ^(?!d+$)[a-z0-9]+(-[a-z0-9]+)* |
password required | string >= 8 characters |
fullName required | string >= 2 characters |
email required | string <email> |
string or string | |
address1 | string |
address2 | string |
city | string |
country | string |
state | string |
phone | string |
zip | string |
{- "companyName": "string",
- "username": "stringst",
- "password": "stringst",
- "fullName": "string",
- "email": "user@example.com",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
Fetch account by id
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
companyName | string |
string or string | |
address1 | string |
address2 | string |
city | string |
country | string |
state | string |
phone | string |
zip | string |
twoFactorAuthGracePeriod | integer [ 1 .. 30 ] |
samlRequired | boolean |
defaultDeliveryRegion | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "companyName": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthGracePeriod": 1,
- "samlRequired": true,
- "defaultDeliveryRegion": "stringstringstringstring"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
Activate an account by id, only available for parent accounts.
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
Deactivate an account by id, only available for parent accounts.
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "companyName": "string",
- "website": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "country": "string",
- "state": "string",
- "phone": "string",
- "zip": "string",
- "twoFactorAuthEnabled": true,
- "twoFactorAuthGracePeriod": 0,
- "users": [
- "string"
], - "services": [
- "string"
], - "origins": [
- "string"
], - "certificates": [
- "string"
]
}
Accounts may contain multiple services which can be organised and configured according to your own needs. Each service provides an aggregation point for configuration, logging, statistics, etc.
It is reasonable to think of a service as being similar to the virtual host concept from a typical web server configuration.
When applying changes to a service there may, or may not, be a propagation delay. This is to ensure that a high frequency of changes by a small number of users does not negatively impact the performance of the network as a whole. As such, although we endeavour to make this as fast as possible, and immediate in most cases, the only guarantee is that it will occur eventually.
Service configurationMode
enumeration that defines which type of configuration is going to be applied, it can be changed on upon request per service. Following configuration modes are available:
API_OPTIONS
- Simple set of configuration parameters, more details are available in Service Options section.API_RULES
- Service rules offer more advanced configuration, more details are available in Service Rules section.API_RULES_AND_OPTIONS
- Use service rules as main configuration set and service options as fallback.MANUAL
- Custom configuration available upon request.Note that in failure scenarios we will continue to serve traffic using the last working configuration.
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
includeFeatures | boolean Default: false |
status | string Enum: "ACTIVE" "DEACTIVATED" |
search | string >= 2 characters |
string or Array of strings | |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 1000 Max number of results per page |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
]
}
name required | string [ 1 .. 32 ] characters |
uniqueName required | string [ 3 .. 32 ] characters ^[a-zA-Z0-9]+$ |
description | string |
{- "name": "string",
- "uniqueName": "string",
- "description": "string"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
includeFeatures | boolean Default: false |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
description | string |
tlsProfile | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
autoSsl | boolean |
deliveryRegion | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "description": "string",
- "tlsProfile": "stringstringstringstring",
- "autoSsl": true,
- "deliveryRegion": "stringstringstringstring"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
logTarget | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "logTarget": "stringstringstringstring"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
logTarget | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "logTarget": "stringstringstringstring"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
Each service has a set of domains. Depending on available features, one or more defaults will be added to the service when it is created, including <uniqueName>.cachefly.net
.
Adding a domain to a service will configure the CacheFly edge servers to route all traffic received for that name through the configuration for that service. Each domain name must be a fully qualified hostname. If you wish to serve traffic for both www.example.com
and example.com
then you will need to add both names.
Once created domains are automatically related to TLS certificates if there are any that matches the name. You do not need to maintain the relationship between domains and certificates.
Please note that the propagation delay mentioned in the description of a service also applies to service domains.
You should configure the DNS for your custom domains to alias one of the default service domain names that you are given.
A time to live (TTL) of 86400 seconds (24 hours) is recommended to gain a performance advantage from shared DNS caching. Note that setting your TTL lower than 2400 seconds (1 hour) is suboptimal for performance.
DNS Example:
www.example.com. IN 86400 CNAME <uniqueName>.cachefly.net
You should never place a CacheFly IP address in your DNS configuration as that prevents us from applying early geographic performance optimisations, and may prevent us from ensuring continued uptime during maintenance or unscheduled outages.
If you are unable to use a CNAME
, you should look into using provider specific equivalents (e.g. ANAME, ALIAS, RECORD LINKING, etc).
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
search | string >= 2 characters |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 10 Max number of results per page |
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "example.com",
- "description": "string",
- "service": "stringstringstringstring",
- "certificates": [
- "string"
], - "validationMode": "NONE",
- "validationTarget": "string",
- "validationStatus": "string"
}
]
}
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
name required | string^(\*\.)?([\w\d-]+\.)+[\w\d]+$ |
description | string |
validationMode | string Default: "NONE" Enum: "NONE" "MANUAL" "HTTP" "DNS" "EMAIL" |
{- "name": "string",
- "description": "string",
- "validationMode": "NONE"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "example.com",
- "description": "string",
- "service": "stringstringstringstring",
- "certificates": [
- "string"
], - "validationMode": "NONE",
- "validationTarget": "string",
- "validationStatus": "string"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "example.com",
- "description": "string",
- "service": "stringstringstringstring",
- "certificates": [
- "string"
], - "validationMode": "NONE",
- "validationTarget": "string",
- "validationStatus": "string"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
name | string^(\*\.)?([\w\d-]+\.)+[\w\d]+$ |
description | string |
validationMode | string Enum: "NONE" "DNS" "HTTP" |
{- "name": "string",
- "description": "string",
- "validationMode": "NONE"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "example.com",
- "description": "string",
- "service": "stringstringstringstring",
- "certificates": [
- "string"
], - "validationMode": "NONE",
- "validationTarget": "string",
- "validationStatus": "string"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "example.com",
- "description": "string",
- "service": "stringstringstringstring",
- "certificates": [
- "string"
], - "validationMode": "NONE",
- "validationTarget": "string",
- "validationStatus": "string"
}
Each service has a set of rules. Rules define how the service should behave when serving traffic.
Please note that the propagation delay mentioned in the description of a service also applies to service rules.
Each service contains a list of rules. Each rule contains a list of conditions and a list of actions.
When handling a request for one of the configured service domains each rule is considered in order. If all of the conditions for that rule are true, then the actions on that rule are performed. If they are not true then the next rule in the list is considered.
Incomplete example (YAML format):
---
- conditions: [] # Rule 1
actions: []
- conditions: [] # Rule 2
actions: []
By convention the list of rules is written in YAML format when it is presented for humans to read, and in JSON format for machines/software to read. For comparison here is the above example in JSON format.
Incomplete example (JSON format):
[
{ "conditions": [], "actions": [] },
{ "conditions": [], "actions": [] }
]
Special attention should be given to the BRANCH
action which contains within itself a rules list. When the conditions guarding this action are true processing moves into the rules list that it contains. This allows for the configuration of a rules in a tree like structure.
Example (YAML format):
---
- conditions: [] # Rule 1
actions:
- type: BRANCH
terminal: false
rules:
- conditions: [] # Nested Rule 1.1
actions: []
- conditions: [] # Nested Rule 1.2
actions: []
- conditions: [] # Rule 2
actions: []
By convention the list of rules is written in YAML format when it is presented for humans to read, and in JSON format for machines/software to read. For comparison here is the above example in JSON format.
Incomplete example (JSON format):
[
{ "conditions": [], "actions": [] },
{
"type": "BRANCH",
"terminal": false,
"rules": [
{ "conditions": [], "actions": [] },
{ "conditions": [], "actions": [] }
]
},
{ "conditions": [], "actions": [] }
]
Conditions allow you to specify when a list of actions should be taken, or not. Please refer to the list service rules examples for a definition of the properties available for each condition.
type | description |
---|---|
SCHEME | Distinguish between HTTPS (secure) and HTTP (insecure) |
HOST | Compare with the HTTP Host header |
PATH | Compare with the HTTP request path |
QUERY | Compare with a HTTP query parameter |
Many more conditions are planned for addition during and after beta.
Actions describe what is possible to do when a list of conditions is met. Please refer to the list service rules examples for a definition of the properties available for each action.
type | description | terminal |
---|---|---|
CACHED_REVERSE_PROXY | Serve content from cache or origin | ✓ true |
DIRECT_REVERSE_PROXY | Proxy directly to origin (i.e. websockets, file uploads, etc.) | ✓ true |
BRANCH | Process a nested set of rules (see above) | ✗ false |
SET_HEADER | Set the value of a HTTP header | ✗ false |
DELETE_HEADER | Remove a HTTP header | ✗ false |
SET_QUERY | Set the value of a HTTP query parameter | ✗ false |
DELETE_QUERY | Remove a HTTP query parameter | ✗ false |
CORS | Add standard CORS headers | ✗ false |
Many more actions are planned for addition during and after beta.
The following actions are reserved for internal use only, they may be visible to you in a rules list if added by the CacheFly engineering team.
type | description | terminal |
---|---|---|
FALLBACK | Route to version 1 backend | ✓ true |
During beta, restrictions may change prior to those changes being documented. Please pay attention to the text of the API error messages.
Service rules are flexible by design. This has resulted in the possibility of combinations of configurations which are illogical or impractical. As such the API applies restrictions to the rules list to reduce the changes of it being rejected by the backend systems. You should always endeavour to comply with these restrictions when generating a rules list.
BRANCH
action must not be empty.PATH
condition modes in a single rule.PATH
condition mode EXACT
prohibits any other PATH
condition within any nested rule.PATH
condition mode REGEX
requires that any other PATH
condition within any nested rule is of the same mode.PATH
condition mode PREFIX
requires that any other PATH
condition within any nested rule starts with its prefix value.For clarity conditions list on a rule is permitted to be empty.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
responseFormat | string Default: "json" Enum: "json" "yaml" |
{- "rules": [
- {
- "conditions": [
- {
- "type": "HOST",
- "host": "example.com"
}
], - "actions": [
- {
- "type": "CACHED_REVERSE_PROXY",
- "terminal": true,
- "origin": "string"
}
]
}
]
}
NOTICE
Body validation JSON schema for this endpoint is dynamically generated according to available plugins for the account, it can be fetched for every services via /service/{sid}/rules/schema
.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "rules": [
- {
- "conditions": [
- {
- "type": "HOST",
- "host": "example.com"
}
], - "actions": [
- {
- "type": "CACHED_REVERSE_PROXY",
- "terminal": true,
- "origin": "string"
}
]
}
]
}
Service options represents a simple way to configure a service comparing to service rules. Service options are available if the service configurationMode
enumeration is set to API_OPTIONS
or API_RULES_AND_OPTIONS
, which can be enabled on request per service or as default configuration for an account.
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "cors": true,
- "autoRedirect": true,
- "reverseProxy": {
- "enabled": true,
- "hostname": "example.com",
- "prepend": "string",
- "ttl": 1,
- "cacheByQueryParam": true,
- "originScheme": "HTTP",
- "useRobotsTxt": true,
- "mode": "WEB"
}, - "mimeTypesOverrides": [
- {
- "extension": "string",
- "mimeType": "string"
}
], - "expiryHeaders": [
- {
- "path": "string",
- "extension": "string",
- "expiryTime": 5
}
], - "apiKeyEnabled": true,
- "protectServeKeyEnabled": true
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
object or object or object | |
object or object | |
cors | boolean |
autoRedirect | boolean Enable Auto Redirect HTTP to HTTPS. |
Array of objects | |
Array of objects or objects | |
property name* additional property | any |
{- "reverseProxy": {
- "mode": "WEB",
- "enabled": false
}, - "rawLogs": {
- "enabled": true,
- "value": "DAILY_INDEPENDENT"
}, - "cors": true,
- "autoRedirect": true,
- "mimeTypesOverrides": [
- {
- "extension": "string",
- "mimeType": "string"
}
], - "expiryHeaders": [
- {
- "path": "string",
- "extension": "",
- "expiryTime": 5
}
]
}
{- "cors": true,
- "autoRedirect": true,
- "reverseProxy": {
- "enabled": true,
- "hostname": "example.com",
- "prepend": "string",
- "ttl": 1,
- "cacheByQueryParam": true,
- "originScheme": "HTTP",
- "useRobotsTxt": true,
- "mode": "WEB"
}, - "mimeTypesOverrides": [
- {
- "extension": "string",
- "mimeType": "string"
}
], - "expiryHeaders": [
- {
- "path": "string",
- "extension": "string",
- "expiryTime": 5
}
], - "apiKeyEnabled": true,
- "protectServeKeyEnabled": true
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "uniqueName": "string",
- "autoSsl": true,
- "configurationMode": "MANUAL",
- "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
hideSecrets | boolean Default: false |
{- "protectServeKey": "string",
- "forceProtectserve": "OPTIONAL"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
action | string Default: "REGENERATE" Enum: "REGENERATE" "REVERT" |
{- "protectServeKey": "string",
- "forceProtectserve": "OPTIONAL"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
forceProtectServe | string Enum: "OPTIONAL" "REQUIRED" "MANDATORY" "DISABLED" |
protectServeKey | string [ 1 .. 32 ] characters ^[A-Za-z0-9+/=]+$ |
{- "forceProtectServe": "OPTIONAL",
- "protectServeKey": "string"
}
{- "protectServeKey": "string",
- "forceProtectserve": "OPTIONAL"
}
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 10 Max number of results per page |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- null
]
}
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
directory required | string non-empty ^/[^*]*$ Match Directory |
"" (string) or string | |
Array of strings or "none" (string) or "nohttp" (string) Exceptions | |
defaultAction required | string Enum: "ALLOW" "DENY" Default Action |
{- "directory": "string",
- "extension": "",
- "exceptions": [
- "example.com"
], - "defaultAction": "ALLOW"
}
null
id required | string <uuid> Service Options Referer Rule Id |
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
directory | string non-empty ^/[^*]*$ Match Directory |
"" (string) or string | |
Array of strings or "none" (string) or "nohttp" (string) Exceptions | |
defaultAction | string Enum: "ALLOW" "DENY" Default Action |
order | number New order value |
{- "directory": "string",
- "extension": "",
- "exceptions": [
- "example.com"
], - "defaultAction": "ALLOW",
- "order": 0
}
null
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 10 Max number of results per page |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- null
]
}
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
root required | string Root path for ftp child |
username required | string [ 8 .. 16 ] characters Username for ftp child |
password required | string [ 8 .. 32 ] characters Password for ftp child |
{- "root": "string",
- "username": "stringst",
- "password": "stringst"
}
null
id required | number Service Options Ftp Children Id |
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
root | string Root path for ftp child |
username | string [ 8 .. 16 ] characters Username for ftp child |
password | string [ 8 .. 32 ] characters Password for ftp child |
status | string Enum: "ACTIVE" "DEACTIVATED" Status for ftp child |
{- "root": "string",
- "username": "stringst",
- "password": "stringst",
- "status": "ACTIVE"
}
null
For objects which have been cached by a reverse proxy configuration, purge allows you to invalidate the cache and instructs the us to attempt to fetch an updated copy of the object from the origin. The fetch will occur the next time that the object is requested. Please note that if the origin is unavailable an error is served (not stale/invalidated objects).
You can specify a list of paths which are to be purged. These can be complete paths (e.g. /images/backgrounds/sky.jpg
), or they can be the path to a directory (e.g. /images/backgrounds/
). Directory paths must end with a forward slash. When a directory is specified all objects within that directory are purged.
Alternatively you can request that all of the objects cached for a service are purged. If you have a large number of objects you should avoid purging all of the objects in one go like this, as it may overload your origin.
When purging a list of paths, the paths
field is required and the all
field should be absent (or set to false
).
When purging all objects, the all
field must be set to true
and the paths
field should be absent. Please note that the all
field overrides the paths
field, so setting it to true
will always purge all objects regardless of what is placed in the paths
field.
CacheFly Smart Image Optimization allows you to transform and optimize your images on the fly. You must configure the optimization with details of image transformations that you want to be performed. These endpoints allow you to manage that image optimization configuration.
You may choose to use either YAML or JSON for your image optimization configuration. As we expect the majority of edits to be done by hand, we use YAML by default. If you are automating the configuration you may wish to choose to use JSON instead.
The specific details of the configuration are detailed in the dedicated CacheFly Smart Image Optimization documenation.
The image optimization configuration for this service is returned when calling this API endpoint. If there is no configuration a 404 status is returned and you may use create configuration to make a new one.
The Content-Type
header in the response details which format you are receiving.
This endpoint may return either YAML or JSON, depending on the format in which the configuration is stored.
See the details endpoint for a list of the valid MIME types.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
"string"
When no image optimization configuration exists for this service you may create a new one by using this endpoint. If a configuration already exists a 400 status is returned.
You may choose the format for your configuration. The Content-Type
header must be set correctly in your request. See the details endpoint for a list of the valid MIME types.
Your configuration will be checked to see if it is valid before it is saved. Invalid configurations will be rejected. See the validation schema endpoint for more details.
Note that if you just wish to view the default configuration you can fetch that without first creating a new configuration.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
It is possible to choose between YAML and JSON format, please check CacheFly Smart Image Optimization documentation for more details on configuration formats and parameters.
"string"
"string"
After an image optimization configuration exists for this service you may update it using this endpoint. If there is no configuration a 404 status is returned and you may use create configuration to make a new one.
You may choose the format for your configuration, and it may be different from the format in which it is currently saved. The Content-Type
header must be set correctly in your request. See the details endpoint for a list of the valid MIME types.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
It is possible to choose between YAML and JSON format, please check CacheFly Smart Image Optimization documentation for more details on configuration formats and parameters.
"string"
"string"
The default configuration can be fetched from this endpoint. This always returns the latest version of the default which may change infrequently (i.e. as new features are added).
The default configuration is in the YAML format, as this allows us to include helpful comments.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
"string"
All configurations are checked for validity before being saved and processed. This is done using a schema written in the JSON Schema format.
This endpoint returns the latest version of the schema being used for validation. You may use this schema to check for mistakes or problems in your configuration before attempting to upload it.
If you are automating the generation of your configuration we highly recommend including a validation step in your own software.
The schema will change infrequently (i.e. as new features are added). If using a locally cached copy, you should ensure that check for an updated version every so often.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{ }
Various metadata about the image optimisation configuration can be obtained from this endpoint.
Note that the helpText
and docsLink
fields are exist so that tooling can point end users towards the help they need when editing the configuration.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "stringstringstringstring",
- "name": "string",
- "readOnly": true,
- "status": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "mimeType": [
- "string"
], - "defaultMimeType": "string",
- "docsLink": "string",
- "helpText": "string"
}
The image optimization configuration is only used when active. This endpoint switches the configuration into the active status and enables the system to start performing image transformations.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "stringstringstringstring",
- "name": "string",
- "readOnly": true,
- "status": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
The image optimization configuration is only used when active. This endpoint essentially disables the configuration and prevents any transformations from being executed.
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "stringstringstringstring",
- "name": "string",
- "readOnly": true,
- "status": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
TLS / SSL Certificates are stored within an account, and are not specific to an any one service. Certificates will be automatically configured to any/all relevant services from the same account, based on service domains.
Certificates managed by the user can be uploaded and deleted. Certificates managed by CacheFly can only be viewed. Please contact sales to purchase managed TLS certificates.
Uploaded keys are stored encrypted and are not available for retrieval and distribution outside of our internal network. If you need to retrieve your keys from us please contact our support team to discuss your requirements.
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
search | string >= 2 characters |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 10 Max number of results per page |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "_id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "subjectCommonName": "string",
- "subjectNames": [
- "string"
], - "expired": true,
- "expiring": true,
- "inUse": true,
- "managed": true,
- "services": [
- "string"
], - "domains": [
- "string"
], - "notBefore": "2019-08-24T14:15:22Z",
- "notAfter": "2019-08-24T14:15:22Z"
}
]
}
certificate required | string non-empty |
certificateKey required | string non-empty |
password | string |
{- "certificate": "string",
- "certificateKey": "string",
- "password": "string"
}
{- "_id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "subjectCommonName": "string",
- "subjectNames": [
- "string"
], - "expired": true,
- "expiring": true,
- "inUse": true,
- "managed": true,
- "services": [
- "string"
], - "domains": [
- "string"
], - "notBefore": "2019-08-24T14:15:22Z",
- "notAfter": "2019-08-24T14:15:22Z"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
{- "_id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "subjectCommonName": "string",
- "subjectNames": [
- "string"
], - "expired": true,
- "expiring": true,
- "inUse": true,
- "managed": true,
- "services": [
- "string"
], - "domains": [
- "string"
], - "notBefore": "2019-08-24T14:15:22Z",
- "notAfter": "2019-08-24T14:15:22Z"
}
Deleting certificate will remove it from matching domains and services.
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "subjectCommonName": "string",
- "subjectNames": [
- "string"
], - "expired": true,
- "expiring": true,
- "inUse": true,
- "managed": true,
- "services": [
- "string"
], - "domains": [
- "string"
], - "notBefore": "2019-08-24T14:15:22Z",
- "notAfter": "2019-08-24T14:15:22Z"
}
Origin objects are the representation of origin of your content. Origins become associated to services via the use of rules which instruct the service to reverse proxy traffic to a specific origin.
Origins are typically either your own server, a cloud server, or a cloud storage solution. These can all be configured via this API by setting the appropriate hostname for the HTTP interface of the origin.
Other types of origins are also available on request, such as CacheFly provided storage solutions, or CacheFly managed edge application servers.
type | string |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 10 Max number of results per page |
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "name": "string",
- "hostname": "string",
- "cacheByQueryParam": true,
- "gzip": true,
- "scheme": "HTTP",
- "ttl": 5,
- "missedTtl": 5
}
]
}
type required | string Value: "WEB" |
name | string |
hostname required | string <hostname> [.] |
gzip | boolean Default: false |
cacheByQueryParam | boolean Default: false |
scheme | string Default: "FOLLOW" Enum: "HTTP" "HTTPS" "FOLLOW" |
ttl | integer [ 1 .. 7776000 ] Default: 2678400 |
missedTtl | integer [ 1 .. 7776000 ] Default: 86400 |
connectionTimeout | integer [ 1 .. 15 ] Default: 3 |
timeToFirstByteTimeout | integer [ 1 .. 15 ] Default: 3 |
{- "type": "S3_BUCKET",
- "name": "string",
- "scheme": "HTTP",
- "host": "example.com",
- "ttl": 2678400,
- "missedTtl": 86400,
- "connectionTimeout": 3,
- "timeToFirstByteTimeout": 3,
- "accessKey": "string",
- "secretKey": "string",
- "region": "string",
- "signatureVersion": "v4"
}
{- "type": "FAILOVER",
- "name": "string",
- "origins": [
- "stringstringstringstring"
]
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
responseType | string Default: "shallow" Enum: "ids" "shallow" "selected" "full" |
{- "type": "FAILOVER",
- "name": "string",
- "origins": [
- "stringstringstringstring"
]
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
type | string Value: "WEB" |
name | string |
hostname | string <hostname> [.] |
gzip | boolean |
cacheByQueryParam | boolean |
scheme | string Enum: "HTTP" "HTTPS" "FOLLOW" |
ttl | integer [ 1 .. 7776000 ] |
missedTtl | integer [ 1 .. 2678400 ] |
connectionTimeout | integer [ 1 .. 15 ] |
timeToFirstByteTimeout | integer [ 1 .. 15 ] |
{- "type": "S3_BUCKET",
- "name": "string",
- "scheme": "HTTP",
- "host": "example.com",
- "ttl": 1,
- "missedTtl": 1,
- "connectionTimeout": 1,
- "timeToFirstByteTimeout": 1,
- "accessKey": "string",
- "secretKey": "string",
- "region": "string",
- "signatureVersion": "v4"
}
{- "type": "FAILOVER",
- "name": "string",
- "origins": [
- "stringstringstringstring"
]
}
Reports are a collection of entities which allow access to the statistical data collected by the CDN. Statistics are usually aggregated to the service level. You can easily see these endpoints in action by logging in to our statistics and reporting dashboard, which itself is a consumer of these endpoints.
name | description |
---|---|
rps | Real time requests rer second |
chr | Cache hit ratio statistics |
hod | Statistics aggregated by Hour Of Day |
country | Statistics aggregated by Country |
pop | Statistics aggregated by CacheFly geographical POP |
file | Statistics aggregated by HTTP path |
referer | Statistics aggregated by HTTP referer |
refererTld | Statistics aggregated by HTTP referer TLD |
track95 | Statistics summarised to 95th percentile |
Get account reports for entity
entity required | string Enum: "rps" "pop" "country" "hod" "file" "chr" "referer" "refererTld" "isp" "track95" "ftp" Report Entity |
string or string | |
string or string | |
string or string | |
sortBy | string^([-]?[a-zA-Z0-9]+,?s*)+$ Default: "thedate" |
interval | string^[0-9]+[h|d|m|s]{1}$ |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 10000 ] Default: 1000 Max number of results per page |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "thedate": null,
- "hits200": 0,
- "hits206": 0,
- "hits304": 0,
- "hits403": 0,
- "gigs200": 0,
- "gigs206": 0,
- "hitsTotal": 0,
- "gigsTotal": 0,
- "country": "string"
}
]
}
Get account reports export token for entity
entity required | any |
string or string | |
string or string | |
string or Array of strings | |
string or Array of strings | |
interval | string^[0-9]+[h|d|m|s]{1}$ Default: "1d" |
filename | string^[a-zA-Z0-9-_]+\.[a-zA-Z0-9]+$ Default: "report.csv" Report Export Filename |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "thedate": null,
- "hits200": 0,
- "hits206": 0,
- "hits304": 0,
- "hits403": 0,
- "gigs200": 0,
- "gigs206": 0,
- "hitsTotal": 0,
- "gigsTotal": 0,
- "country": "string"
}
]
}
Get service reports for entity
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
entity required | string Enum: "rps" "pop" "country" "hod" "file" "chr" "referer" "refererTld" "isp" "track95" "ftp" Report Entity |
string or string | |
string or string | |
string or string | |
sortBy | string^([-]?[a-zA-Z0-9]+,?s*)+$ Default: "thedate" |
interval | string^[0-9]+[h|d|m|s]{1}$ |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 10000 ] Default: 1000 Max number of results per page |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "thedate": null,
- "hits200": 0,
- "hits206": 0,
- "hits304": 0,
- "hits403": 0,
- "gigs200": 0,
- "gigs206": 0,
- "hitsTotal": 0,
- "gigsTotal": 0,
- "country": "string"
}
]
}
Get service reports export token for entity
sid required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
entity required | any |
string or string | |
string or string | |
string or Array of strings | |
string or Array of strings | |
interval | string^[0-9]+[h|d|m|s]{1}$ Default: "1d" |
filename | string^[a-zA-Z0-9-_]+\.[a-zA-Z0-9]+$ Default: "report.csv" Report Export Filename |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "thedate": null,
- "hits200": 0,
- "hits206": 0,
- "hits304": 0,
- "hits403": 0,
- "gigs200": 0,
- "gigs206": 0,
- "hitsTotal": 0,
- "gigsTotal": 0,
- "country": "string"
}
]
}
User objects describe people who are permitted to login to an account. Each user as a set of permissions and a list of services. The user is unable to access any service which has not been assigned to them.
Fetch info about currently logged in user. This endpoint is only executable with tokens acquired via regular login.
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "username": "stringst",
- "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ACCOUNT_ADMIN"
], - "services": [
- "string"
], - "status": "ACTIVE"
}
Update info about currently logged in user. This endpoint is only executable with tokens acquired via regular login.
password | string >= 8 characters |
services | Array of strings[^[a-fA-F0-9]+$] |
passwordChangeRequired | boolean |
string <email> | |
fullName | string >= 2 characters |
phone | string |
walkthroughVisible | boolean |
showDeactivatedServices | boolean |
{- "password": "stringst",
- "services": [
- "stringstringstringstring"
], - "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "walkthroughVisible": true,
- "showDeactivatedServices": true
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "username": "stringst",
- "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ACCOUNT_ADMIN"
], - "services": [
- "string"
], - "status": "ACTIVE"
}
search | string >= 2 characters |
offset | integer >= 0 Default: 0 Number of results to skip |
limit | integer [ 0 .. 1000 ] Default: 10 Max number of results per page |
{- "meta": {
- "limit": 0,
- "offset": 0,
- "count": 0
}, - "data": [
- {
- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "username": "stringst",
- "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ACCOUNT_ADMIN"
], - "services": [
- "string"
], - "status": "ACTIVE"
}
]
}
password required | string >= 8 characters |
services | Array of strings[^[a-fA-F0-9]+$] |
passwordChangeRequired | boolean |
string <email> | |
fullName | string >= 2 characters |
phone | string |
permissions | Array of strings Items Enum: "P_ADMIN_VIEW" "P_ADMIN_MANAGE" "P_ADMIN_BILLING" "P_ADMIN_STATS" "P_ACCOUNT_ADMIN" "P_ACCOUNT_VIEW" "P_ACCOUNT_MANAGE" "P_BILLING_VIEW" "P_BILLING_MANAGE" "P_USER_PROFILE_VIEW" "P_USER_PROFILE_MANAGE" "P_USER_VIEW" "P_USER_MANAGE" "P_USER_GRANT_ALL" "P_SAML_VIEW" "P_SAML_MANAGE" "P_SERVICE_ALL" "P_SERVICE_PURGE" "P_SERVICE_VIEW" "P_SERVICE_MANAGE" "P_ORIGIN_VIEW" "P_ORIGIN_MANAGE" "P_CERTIFICATE_VIEW" "P_CERTIFICATE_MANAGE" "P_API_TOKENS_VIEW" "P_API_TOKENS_MANAGE" "P_STATS_VIEW" "P_STATS_MANAGE" "P_OBJECT_STORAGE_VIEW" "P_OBJECT_STORAGE_MANAGE" "P_LOG_TARGET_VIEW" "P_LOG_TARGET_MANAGE" "P_SCRIPT_CONFIG_VIEW" "P_SCRIPT_CONFIG_MANAGE" |
username required | string [ 8 .. 32 ] characters ^(?!d+$)[a-z0-9]+(-[a-z0-9]+)* |
{- "password": "stringst",
- "services": [
- "stringstringstringstring"
], - "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ADMIN_VIEW"
], - "username": "stringst"
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "username": "stringst",
- "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ACCOUNT_ADMIN"
], - "services": [
- "string"
], - "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "username": "stringst",
- "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ACCOUNT_ADMIN"
], - "services": [
- "string"
], - "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
password | string >= 8 characters |
services | Array of strings[^[a-fA-F0-9]+$] |
passwordChangeRequired | boolean |
string <email> | |
fullName | string >= 2 characters |
phone | string |
permissions | Array of strings Items Enum: "P_ADMIN_VIEW" "P_ADMIN_MANAGE" "P_ADMIN_BILLING" "P_ADMIN_STATS" "P_ACCOUNT_ADMIN" "P_ACCOUNT_VIEW" "P_ACCOUNT_MANAGE" "P_BILLING_VIEW" "P_BILLING_MANAGE" "P_USER_PROFILE_VIEW" "P_USER_PROFILE_MANAGE" "P_USER_VIEW" "P_USER_MANAGE" "P_USER_GRANT_ALL" "P_SAML_VIEW" "P_SAML_MANAGE" "P_SERVICE_ALL" "P_SERVICE_PURGE" "P_SERVICE_VIEW" "P_SERVICE_MANAGE" "P_ORIGIN_VIEW" "P_ORIGIN_MANAGE" "P_CERTIFICATE_VIEW" "P_CERTIFICATE_MANAGE" "P_API_TOKENS_VIEW" "P_API_TOKENS_MANAGE" "P_STATS_VIEW" "P_STATS_MANAGE" "P_OBJECT_STORAGE_VIEW" "P_OBJECT_STORAGE_MANAGE" "P_LOG_TARGET_VIEW" "P_LOG_TARGET_MANAGE" "P_SCRIPT_CONFIG_VIEW" "P_SCRIPT_CONFIG_MANAGE" |
{- "password": "stringst",
- "services": [
- "stringstringstringstring"
], - "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ADMIN_VIEW"
]
}
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "username": "stringst",
- "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ACCOUNT_ADMIN"
], - "services": [
- "string"
], - "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "username": "stringst",
- "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [
- "P_ACCOUNT_ADMIN"
], - "services": [
- "string"
], - "status": "ACTIVE"
}
id required | string = 24 characters ^[a-fA-F0-9]+$ Id is a hex string of 24 characters |
{- "_id": "string",
- "updateAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "username": "stringst",
- "passwordChangeRequired": true,
- "email": "user@example.com",
- "fullName": "string",
- "phone": "string",
- "permissions": [