CacheFly API (2.6.0)

Download OpenAPI specification:

Info

Get Account

Fetch account information

Authorizations:
BearerAuth
query Parameters
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "origins": [
    ],
  • "certificates": [
    ]
}

Update Account

Update account information

Authorizations:
BearerAuth
Request Body schema: application/json
companyName
string
string or string
address1
string
address2
string
city
string
country
string
state
string
phone
string
email
string <email>
twoFactorAuthGracePeriod
integer [ 1 .. 30 ]
samlRequired
boolean
defaultDeliveryRegion
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Request samples

Content type
application/json
{
  • "companyName": "string",
  • "website": "http://example.com",
  • "address1": "string",
  • "address2": "string",
  • "city": "string",
  • "country": "string",
  • "state": "string",
  • "phone": "string",
  • "email": "user@example.com",
  • "twoFactorAuthGracePeriod": 1,
  • "samlRequired": true,
  • "defaultDeliveryRegion": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "origins": [
    ],
  • "certificates": [
    ]
}

Security

Enable 2FA

Two factor authentication will be enabled for the account

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "origins": [
    ],
  • "certificates": [
    ]
}

Disable 2FA

Two factor authentication will be disabled for the account

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "origins": [
    ],
  • "certificates": [
    ]
}

Certificates

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.

List

Returns a list of certificates for the current account.

Authorizations:
BearerAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Upload Certificate

Uploads a new certificate. The certificate will be automatically matched with domains and services.

Authorizations:
BearerAuth
Request Body schema: application/json
certificate
required
string non-empty
certificateKey
required
string non-empty
password
string

Responses

Request samples

Content type
application/json
{
  • "certificate": "string",
  • "certificateKey": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "subjectCommonName": "string",
  • "subjectNames": [
    ],
  • "expired": true,
  • "expiring": true,
  • "inUse": true,
  • "managed": true,
  • "services": [
    ],
  • "domains": [
    ],
  • "notBefore": "2019-08-24T14:15:22Z",
  • "notAfter": "2019-08-24T14:15:22Z"
}

Get By Id

Returns the certificate with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "subjectCommonName": "string",
  • "subjectNames": [
    ],
  • "expired": true,
  • "expiring": true,
  • "inUse": true,
  • "managed": true,
  • "services": [
    ],
  • "domains": [
    ],
  • "notBefore": "2019-08-24T14:15:22Z",
  • "notAfter": "2019-08-24T14:15:22Z"
}

Delete By Id

Deleting certificate will remove it from matching domains and services.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "subjectCommonName": "string",
  • "subjectNames": [
    ],
  • "expired": true,
  • "expiring": true,
  • "inUse": true,
  • "managed": true,
  • "services": [
    ],
  • "domains": [
    ],
  • "notBefore": "2019-08-24T14:15:22Z",
  • "notAfter": "2019-08-24T14:15:22Z"
}

TLS Profiles

List TLS Profiles

List TLS Profiles

Authorizations:
BearerAuth
query Parameters
string or Array of strings
group
string
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 1000 ]
Default: 10

Max number of results per page

Responses

Get TLS Profile by id

Get TLS Profile by id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

API Tokens

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.

List

Returns a list of API tokens for the current account.

Authorizations:
BearerAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create

Creates a new API token with the given name, allowed services, and permissions.

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string
hideSecrets
boolean
services
Array of strings[ items = 24 characters ^[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"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "hideSecrets": true,
  • "services": [
    ],
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "services": [
    ],
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "permissions": [
    ]
}

Get By Id

Returns the API token with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "services": [
    ],
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "permissions": [
    ]
}

Update By Id

Updates an existing API token with the given id, name, allowed services, and permissions.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
name
string
hideSecrets
boolean
services
Array of strings[ items = 24 characters ^[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"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "hideSecrets": true,
  • "services": [
    ],
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "services": [
    ],
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "permissions": [
    ]
}

Delete By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "services": [
    ],
  • "lastUsed": "2019-08-24T14:15:22Z",
  • "permissions": [
    ]
}

List Allowed Permissions

List of permissions that of permissions that can be assigned to token with given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "permissions": [
    ]
}

Users

User objects describe people who are permitted to login to an account. Each user as a set of permissions and a list of services. T he user is unable to access any service which has not been assigned to them.

List

Returns a list of users for the current account.

Authorizations:
BearerAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create

Creates a new user.

Authorizations:
BearerAuth
Request Body schema: application/json
password
required
string >= 8 characters
services
Array of strings[ items = 24 characters ^[a-fA-F0-9]+$ ]
passwordChangeRequired
boolean
email
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]+)*

Responses

Request samples

Content type
application/json
{
  • "password": "stringst",
  • "services": [
    ],
  • "passwordChangeRequired": true,
  • "email": "user@example.com",
  • "fullName": "string",
  • "phone": "string",
  • "permissions": [
    ],
  • "username": "stringst"
}

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "status": "ACTIVE"
}

Get By Id

Returns the user with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "status": "ACTIVE"
}

Update By Id

Updates the user with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
password
string >= 8 characters
services
Array of strings[ items = 24 characters ^[a-fA-F0-9]+$ ]
passwordChangeRequired
boolean
email
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"

Responses

Request samples

Content type
application/json
{
  • "password": "stringst",
  • "services": [
    ],
  • "passwordChangeRequired": true,
  • "email": "user@example.com",
  • "fullName": "string",
  • "phone": "string",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "status": "ACTIVE"
}

Delete By Id

Deletes the user with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "status": "ACTIVE"
}

List of Allowed Permissions

List of permissions that can be assigned to user with given id. This list is relative to the current token that is used to access this endpoint.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "permissions": [
    ]
}

Activate User By Id

Activates the user with the given id. The user will be able to log in.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "status": "ACTIVE"
}

Deactivate User By Id

Deactivates the user with the given id. The user will not be able to log in, but their data will be preserved.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_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": [
    ],
  • "services": [
    ],
  • "status": "ACTIVE"
}

Services

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. A s 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.

List Services

Authorizations:
BearerAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create Service

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string [ 1 .. 32 ] characters
uniqueName
required
string [ 3 .. 32 ] characters ^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?!-))*[a-zA-Z0-9...
description
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "uniqueName": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Get Service By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"
includeFeatures
boolean
Default: false

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Update Service By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "tlsProfile": "stringstringstringstring",
  • "autoSsl": true,
  • "deliveryRegion": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Activate Service By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Deactivate Service By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Enable Access Logging

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
logTarget
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Request samples

Content type
application/json
{
  • "logTarget": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Disable Access Logging

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Enable Origin Logging

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
logTarget
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Request samples

Content type
application/json
{
  • "logTarget": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Disable Origin Logging

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueName": "string",
  • "autoSsl": true,
  • "configurationMode": "MANUAL",
  • "status": "ACTIVE"
}

Domains

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.

Configuring DNS

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).

List

Returns a list of service domains for the current service.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
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"

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create

Creates a new service domain.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
name
required
string^(\*\.)?([\w\d-]+\.)+[\w\d]+$
description
string
validationMode
string
Default: "NONE"
Enum: "NONE" "MANUAL" "HTTP" "DNS" "EMAIL"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "validationMode": "NONE"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "example.com",
  • "description": "string",
  • "service": "stringstringstringstring",
  • "certificates": [
    ],
  • "validationMode": "NONE",
  • "validationTarget": "string",
  • "validationStatus": "string"
}

Get By Id

Returns the service domain with the given id.

Authorizations:
BearerAuth
path Parameters
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

query Parameters
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "example.com",
  • "description": "string",
  • "service": "stringstringstringstring",
  • "certificates": [
    ],
  • "validationMode": "NONE",
  • "validationTarget": "string",
  • "validationStatus": "string"
}

Update By Id

Updates the service domain with the given id.

Authorizations:
BearerAuth
path Parameters
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

Request Body schema: application/json
name
string^(\*\.)?([\w\d-]+\.)+[\w\d]+$
description
string
validationMode
string
Enum: "NONE" "DNS" "HTTP"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "validationMode": "NONE"
}

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "example.com",
  • "description": "string",
  • "service": "stringstringstringstring",
  • "certificates": [
    ],
  • "validationMode": "NONE",
  • "validationTarget": "string",
  • "validationStatus": "string"
}

Delete By Id

Deletes the service domain with the given id.

Authorizations:
BearerAuth
path Parameters
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

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "example.com",
  • "description": "string",
  • "service": "stringstringstringstring",
  • "certificates": [
    ],
  • "validationMode": "NONE",
  • "validationTarget": "string",
  • "validationStatus": "string"
}

Validation Ready

Signals that the domain with the given id is ready for validation

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "name": "example.com",
  • "description": "string",
  • "service": "stringstringstringstring",
  • "certificates": [
    ],
  • "validationMode": "NONE",
  • "validationTarget": "string",
  • "validationStatus": "string"
}

Rules

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.

How rules work

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

Branches

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

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

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

Restrictions

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.

  • The actions list on a rule must not be empty.
  • The rules list on a BRANCH action must not be empty.
  • No action may follow an action which has the terminal property.
  • Must not mix multiple PATH condition modes in a single rule.
  • The PATH condition mode EXACT prohibits any other PATH condition within any nested rule.
  • The PATH condition mode REGEX requires that any other PATH condition within any nested rule is of the same mode.
  • The 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.

Fetch Rules

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
responseFormat
string
Default: "json"
Enum: "json" "yaml"

Responses

Response samples

Content type
application/json
{
  • "rules": [
    ]
}

Update Rules

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.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "rules": [
    ]
}

Fetch Rules JSON Schema

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{ }

Options

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.

Get Service Options

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "cors": true,
  • "autoRedirect": true,
  • "reverseProxy": {
    },
  • "mimeTypesOverrides": [
    ],
  • "expiryHeaders": [
    ],
  • "apiKeyEnabled": true,
  • "protectServeKeyEnabled": true
}

Save Service Options

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "reverseProxy": {
    },
  • "rawLogs": {
    },
  • "cors": true,
  • "autoRedirect": true,
  • "mimeTypesOverrides": [
    ],
  • "expiryHeaders": [
    ]
}

Response samples

Content type
application/json
{
  • "cors": true,
  • "autoRedirect": true,
  • "reverseProxy": {
    },
  • "mimeTypesOverrides": [
    ],
  • "expiryHeaders": [
    ],
  • "apiKeyEnabled": true,
  • "protectServeKeyEnabled": true
}

Origins

Origins currently can be used only if service is in API_RULES or API_RULES_AND_OPTIONS configuration mode. 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.

List All Account Origins

Authorizations:
BearerAuth
query Parameters
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"

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create Origin

Authorizations:
BearerAuth
Request Body schema: application/json
Any of
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 .. 31536000 ]
Default: 2678400
missedTtl
integer [ 1 .. 31536000 ]
Default: 86400
connectionTimeout
integer [ 1 .. 15 ]
Default: 3
timeToFirstByteTimeout
integer [ 1 .. 15 ]
Default: 3

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "type": "FAILOVER",
  • "name": "string",
  • "origins": [
    ]
}

Get Origin By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
{
  • "type": "FAILOVER",
  • "name": "string",
  • "origins": [
    ]
}

Update Origin By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
Any of
type
string
Value: "WEB"
name
string
hostname
string <hostname> [.]
gzip
boolean
cacheByQueryParam
boolean
scheme
string
Enum: "HTTP" "HTTPS" "FOLLOW"
ttl
integer [ 1 .. 31536000 ]
missedTtl
integer [ 1 .. 2678400 ]
connectionTimeout
integer [ 1 .. 15 ]
timeToFirstByteTimeout
integer [ 1 .. 15 ]

Responses

Request samples

Content type
application/json
{
  • "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"
}

Response samples

Content type
application/json
{
  • "type": "FAILOVER",
  • "name": "string",
  • "origins": [
    ]
}

Delete Origin By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "type": "FAILOVER",
  • "name": "string",
  • "origins": [
    ]
}

ProtectServe Key

Get ProtectServe Key

Get the ProtectServe key for the service. This key is used to protect the service from abuse and unauthorized access.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
hideSecrets
boolean
Default: false

Responses

Response samples

Content type
application/json
{
  • "protectServeKey": "string",
  • "forceProtectserve": "OPTIONAL"
}

Recreate ProtectServe Key

Recreate the ProtectServe key for the service. This will invalidate the current key and generate a new one.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
action
string
Default: "REGENERATE"
Enum: "REGENERATE" "REVERT"

Responses

Response samples

Content type
application/json
{
  • "protectServeKey": "string",
  • "forceProtectserve": "OPTIONAL"
}

Update ProtectServe Key

Update the ProtectServe key for the service. You can also force the ProtectServe key to be updated by setting the forceProtectServe option.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
forceProtectServe
string
Enum: "OPTIONAL" "REQUIRED" "MANDATORY" "DISABLED"
protectServeKey
string [ 1 .. 32 ] characters ^[A-Za-z0-9+/=]+$

Responses

Request samples

Content type
application/json
{
  • "forceProtectServe": "OPTIONAL",
  • "protectServeKey": "string"
}

Response samples

Content type
application/json
{
  • "protectServeKey": "string",
  • "forceProtectserve": "OPTIONAL"
}

Delete Service ProtectServe Key

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Image Optimization

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.

Format

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.

Details

The specific details of the configuration are detailed in the dedicated CacheFly Smart Image Optimization documenation.

Fetch Configuration

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.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
"string"

Create Configuration

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.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
Any of
object

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.

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/json
"string"

Update Configuration

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.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
Any of
object

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.

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/json
"string"

Fetch Default Configuration

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.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
"string"

Fetch Validation Schema

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.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{ }

Fetch Configuration Details

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.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "readOnly": true,
  • "status": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "mimeType": [
    ],
  • "defaultMimeType": "string",
  • "docsLink": "string",
  • "helpText": "string"
}

Activate

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.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "readOnly": true,
  • "status": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Deactivate

The image optimization configuration is only used when active. This endpoint essentially disables the configuration and prevents any transformations from being executed.

Authorizations:
BearerAuth
path Parameters
sid
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "readOnly": true,
  • "status": "string",
  • "updateAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Purge

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.

Purge

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Cache Warming

List tasks

List tasks

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 1000 ]
Default: 10

Max number of results per page

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create task

Create task

Authorizations:
BearerAuth
Request Body schema: application/json
name
string
targets
required
Array of strings <uri> [ items <uri > >= 4 characters [ 1 .. 500 ] items ^(http|https) ]
regions
required
Array of strings[ items non-empty ]
Items Enum: "global" "asia" "europe" "usa" "latam"
Array of strings or "none" (string)
contentEncodings
Array of strings
Items Enum: "deflate" "gzip" "brotli" "br" "none"
contentLanguages
Array of strings
Items Enum: "ar" "bg-BG" "bg" "bs-BA" "bs" "ca-ES" "ca" "cs-CZ" "cs" "cy-GB" "cy" "da-DK" "da" "de-DE" "de" "el-GR" "el" "en-GB" "en-US" "en" "es-ES" "es-MX" "es" "et-EE" "et" "eu-ES" "eu" "fi-FI" "fi" "fo-FO" "fo" "fr-CA" "fr-FR" "fr" "ga-IE" "ga" "gd-GB" "gd" "gl-ES" "gl" "he-IL" "he" "hi-IN" "hi" "hr-HR" "hr" "hu-HU" "hu" "id-ID" "id" "is-IS" "is-oldd" "is" "it-IT" "it" "ja-JP" "ja" "ko-KR" "ko" "lb-LU" "lb" "lt-LT" "lt" "lv-LV" "lv" "mk-MK" "mk" "mt-MT" "mt" "nb" "nl-NL" "nl" "nn" "no" "pl-PL" "pl" "pt-BR" "pt-PT" "pt" "ro-RO" "ro" "ru-RU" "ru" "sk-SK" "sk" "sl-SI" "sl" "sq-AL" "sq" "sr-Cyrl" "sr-Latn" "sr-RS" "sr" "sv-SE" "sv" "th-TH" "th" "tr-TR" "tr" "uk-UA" "uk" "vi-VN" "vi" "zh-CN" "zh-Hans" "zh-Hant" "zh-TW" "zh" "none"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "targets": [],
  • "regions": [
    ],
  • "contentTypes": [
    ],
  • "contentEncodings": [
    ],
  • "contentLanguages": [
    ]
}

Response samples

Content type
application/json
{
  • "type": null,
  • "properties": null,
  • "_id": "stringstringstringstringstringstring",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "stoppedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "targets": [],
  • "regions": [
    ],
  • "contentTypes": [
    ],
  • "contentEncodings": [
    ],
  • "contentLanguages": [
    ],
  • "status": "PENDING"
}

Get task info

Get task info

Authorizations:
BearerAuth
path Parameters
id
required
string = 36 characters ^[a-fA-F0-9-]+$

Responses

Response samples

Content type
application/json
{
  • "type": null,
  • "properties": null,
  • "_id": "stringstringstringstringstringstring",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "stoppedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "targets": [],
  • "regions": [
    ],
  • "contentTypes": [
    ],
  • "contentEncodings": [
    ],
  • "contentLanguages": [
    ],
  • "status": "PENDING"
}

Delete task

Delete task

Authorizations:
BearerAuth
path Parameters
id
required
string = 36 characters ^[a-fA-F0-9-]+$

Responses

Response samples

Content type
application/json
{
  • "type": null,
  • "properties": null,
  • "_id": "stringstringstringstringstringstring",
  • "startedAt": "2019-08-24T14:15:22Z",
  • "stoppedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "targets": [],
  • "regions": [
    ],
  • "contentTypes": [
    ],
  • "contentEncodings": [
    ],
  • "contentLanguages": [
    ],
  • "status": "PENDING"
}

Log Targets

Log Shipping lets you send log data from CacheFly services to external storage targets (cloud storage buckets) that CacheFly calls Log Targets. You can thus store your logs indefinitely at an external Log Target, for example while you create or deploy tools to parse the log data for your requirements.

You will need an existing storage bucket together with the information required for the transmission of data to the bucket from another system or platform (in this instance, from CacheFly).

Notice: CacheFly Log Shipping is provided on a “best efforts” basis and without guarantee. When loads exceed certain levels, Log Shipping may not send all log data.

There are two types of logs shipped by CacheFly for your CacheFly services:

  • Access Logs Shipping
    • CDN <> End-Users - Shows requests from end-users to the CDN
  • Origin Logs Shipping
    • CDN <> Origin - Shows requests from the CDN to origin (reverse proxy)

When you use Log Shipping, a "cachefly" folder is created to store the logs as standard gzip (GZ) files. Within this folder, for a service for which you enable Log Shipping, a folder will be created for the access and/or for the origin logs. The access/origin log folders will have the following naming convention:

  • {service_uid}_access
  • {service_uid}_origin

List

Returns a list of log targets for the account.

Authorizations:
BearerAuth
query Parameters
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"

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create

Creates a new log target.

Authorizations:
BearerAuth
Request Body schema: application/json
Any of
type
required
string
Value: "GOOGLE_BUCKET"
name
string >= 2 characters
bucket
required
string
jsonKey
required
string

Responses

Request samples

Content type
application/json
{
  • "type": "S3_BUCKET",
  • "name": "string",
  • "endpoint": "string",
  • "region": "string",
  • "bucket": "string",
  • "accessKey": "string",
  • "secretKey": "string",
  • "signatureVersion": "v2"
}

Response samples

Content type
application/json
{
  • "type": "ELASTICSEARCH",
  • "name": "string",
  • "hosts": [
    ],
  • "ssl": true,
  • "sslCertificateVerification": true,
  • "index": "string",
  • "user": "string",
  • "password": "string",
  • "_id": "stringstringstringstring",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Update By Id

Updates the log target with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
Any of
type
string
Value: "GOOGLE_BUCKET"
name
string >= 2 characters
bucket
string
jsonKey
string

Responses

Request samples

Content type
application/json
{
  • "type": "S3_BUCKET",
  • "name": "string",
  • "endpoint": "string",
  • "region": "string",
  • "bucket": "string",
  • "accessKey": "string",
  • "secretKey": "string",
  • "signatureVersion": "v2"
}

Response samples

Content type
application/json
{
  • "type": "MANUAL",
  • "name": "string",
  • "_id": "stringstringstringstring",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Delete By Id

Deletes the log target with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "type": "ELASTICSEARCH",
  • "name": "string",
  • "hosts": [
    ],
  • "ssl": true,
  • "sslCertificateVerification": true,
  • "index": "string",
  • "user": "string",
  • "password": "string",
  • "_id": "stringstringstringstring",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Enable services logging

Enables logging for the given services on the log target with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
accessLogsServices
Array of strings[ items = 24 characters ^[a-fA-F0-9]+$ ]
originLogsServices
Array of strings[ items = 24 characters ^[a-fA-F0-9]+$ ]

Responses

Request samples

Content type
application/json
{
  • "accessLogsServices": [
    ],
  • "originLogsServices": [
    ]
}

Response samples

Content type
application/json
{
  • "type": "ELASTICSEARCH",
  • "name": "string",
  • "hosts": [
    ],
  • "ssl": true,
  • "sslCertificateVerification": true,
  • "index": "string",
  • "user": "string",
  • "password": "string",
  • "_id": "stringstringstringstring",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Test Connection

Tests the connection to the log target with the given id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Script Definitions

List Account Script Config Definitions

List of available script definitions for account

Authorizations:
BearerAuth
query Parameters
includeFeatures
boolean
Default: false
includeHidden
boolean
Default: false
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"

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Get Script Config Definitions By Id

Get available or in use script definitions by id.

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "helpText": "string",
  • "docsLink": "string",
  • "scriptConfigs": [
    ],
  • "available": true,
  • "linkWithService": true,
  • "requiresOptions": true,
  • "requiresRules": true,
  • "requiresPlugin": true,
  • "canCreate": true,
  • "purpose": "string",
  • "meta": { },
  • "allowedMimeTypes": [
    ],
  • "defaultMimeType": "string",
  • "valueSchema": { },
  • "dataMode": "JSON",
  • "defaultValue": { }
}

Script Configs

List Script Configs

Authorizations:
BearerAuth
query Parameters
includeFeatures
boolean
Default: false
includeHidden
boolean
Default: false
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"
search
string >= 2 characters
string or Array of strings

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create Script Config

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string
services
Array of strings[ items = 24 characters ^[a-fA-F0-9]+$ ]
scriptConfigDefinition
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

mimeType
string^[-\w.]+/[-\w.]+$
object or string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "services": [
    ],
  • "scriptConfigDefinition": "stringstringstringstring",
  • "mimeType": "string",
  • "value": { }
}

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "services": [
    ],
  • "scriptConfigDefinition": "stringstringstringstring",
  • "purpose": "string",
  • "useSchema": true,
  • "meta": { },
  • "mimeType": "string",
  • "dataMode": "JSON",
  • "value": { }
}

Get Script Config By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "services": [
    ],
  • "scriptConfigDefinition": "stringstringstringstring",
  • "purpose": "string",
  • "useSchema": true,
  • "meta": { },
  • "mimeType": "string",
  • "dataMode": "JSON",
  • "value": { }
}

Update Script Config By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
name
string
mimeType
string^[-\w.]+/[-\w.]+$
services
Array of strings[ items = 24 characters ^[a-fA-F0-9]+$ ]
object or string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "mimeType": "string",
  • "services": [
    ],
  • "value": { }
}

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "services": [
    ],
  • "scriptConfigDefinition": "stringstringstringstring",
  • "purpose": "string",
  • "useSchema": true,
  • "meta": { },
  • "mimeType": "string",
  • "dataMode": "JSON",
  • "value": { }
}

Get Script Config Schema By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{ }

Activate Script Config By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "services": [
    ],
  • "scriptConfigDefinition": "stringstringstringstring",
  • "purpose": "string",
  • "useSchema": true,
  • "meta": { },
  • "mimeType": "string",
  • "dataMode": "JSON",
  • "value": { }
}

Activate Script Config By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "name": "string",
  • "services": [
    ],
  • "scriptConfigDefinition": "stringstringstringstring",
  • "purpose": "string",
  • "useSchema": true,
  • "meta": { },
  • "mimeType": "string",
  • "dataMode": "JSON",
  • "value": { }
}

Get Script Config Value As File

Returns script config value as file, file format depends on mime type

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Update Script Config Value As File

Updates script config value from a file, file format depends on mime type and script config schema

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Update Script Config Value As File

Updates script config value from a file, file format depends on mime type and script config schema

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
Any of
string <binary>

Responses

Request samples

Content type
application/json
"string"

Account

POP stats

Get account stats by POP

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

string or Array of strings
integer or Array of integers
string or Array of strings
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Country stats

Get account stats by Country

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
string or Array of strings
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Cache stats

Get account stats by cache

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
string or Array of strings

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Status stats

Get account stats by status codes

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Origin stats

Get origin stats accross all accounts

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Storage stats

Get object storage usage stats.

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Realtime stats

Get realtime stats across all accounts

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

string or string or integer
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
string or Array of strings
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Path stats

Get account stats by paths

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Referer stats

Get account stats by referers

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
tldOnly
boolean

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Service

POP stats

Get service stats by POP

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

string or Array of strings
integer or Array of integers
string or Array of strings
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Country stats

Get service stats by country

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
string or Array of strings
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Cache stats

Get service stats by cache

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
string or Array of strings

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Status stats

Get service stats by status codes

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Realtime stats

Get realtime stats across all accounts

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

string or string or integer
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
string or Array of strings
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Path stats

Get service stats by paths

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Referer stats

Get service stats by referers

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
tldOnly
boolean

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Origin stats

Get origin stats accross all services

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 10000 ]
Default: 10000

Max number of results per page

required
string or string or integer
required
string or string or integer
string or Array of strings
string or Array of strings

Allowed values for sortBy filed are depending on groupBy field. If groupBy is not set, then sortBy can be any of the fields. If groupBy is set, then sortBy can be any of the fields in groupBy plus aggregatable fields

includeInfo
boolean
Default: false

Depending on the context and given parameters, this will include additional information in the response.

integer or Array of integers
integer or Array of integers

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Automated Reports

List Automated Reports

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 1000 ]
Default: 10

Max number of results per page

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create Automated Report

Authorizations:
BearerAuth
Request Body schema: application/json
service
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

name
string <= 255 characters

Report name

type
required
string
Enum: "POP" "COUNTRY" "CACHE" "STATUS_CODE" "PATH" "REFERER" "STORAGE"

Type of report to generate

interval
required
string
Enum: "DAILY" "WEEKLY" "MONTHLY"

Interval to send the report

users
required
Array of strings non-empty [ items = 24 characters ^[a-fA-F0-9]+$ ]

List of user IDs to send the report to

Responses

Request samples

Content type
application/json
{
  • "service": "stringstringstringstring",
  • "name": "string",
  • "type": "POP",
  • "interval": "DAILY",
  • "users": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "service": "stringstringstringstring",
  • "name": "string",
  • "type": "POP",
  • "interval": "DAILY",
  • "users": [
    ],
  • "lastSentAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Get Automated Report By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "service": "stringstringstringstring",
  • "name": "string",
  • "type": "POP",
  • "interval": "DAILY",
  • "users": [
    ],
  • "lastSentAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Update Automated Report By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Request Body schema: application/json
service
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

name
string <= 255 characters

Report name

type
string
Enum: "POP" "COUNTRY" "CACHE" "STATUS_CODE" "PATH" "REFERER" "STORAGE"

Type of report to generate

interval
string
Enum: "DAILY" "WEEKLY" "MONTHLY"

Interval to send the report

users
Array of strings non-empty [ items = 24 characters ^[a-fA-F0-9]+$ ]

List of user IDs to send the report to

Responses

Request samples

Content type
application/json
{
  • "service": "stringstringstringstring",
  • "name": "string",
  • "type": "POP",
  • "interval": "DAILY",
  • "users": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "service": "stringstringstringstring",
  • "name": "string",
  • "type": "POP",
  • "interval": "DAILY",
  • "users": [
    ],
  • "lastSentAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Delete Automated Report By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Response samples

Content type
application/json
{
  • "_id": "stringstringstringstring",
  • "service": "stringstringstringstring",
  • "name": "string",
  • "type": "POP",
  • "interval": "DAILY",
  • "users": [
    ],
  • "lastSentAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Accounts

List Accounts

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 1000 ]
Default: 10

Max number of results per page

string or Array of strings
region
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

status
string
Enum: "OPERATIONAL" "PENDING" "DEACTIVATED" "DELETED"
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Create Account

Authorizations:
BearerAuth
Request Body schema: application/json
name
required
string
region
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "region": "stringstringstringstring"
}

Response samples

Content type
application/json
null

Get Account By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
null

Regions

List Regions

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 1000 ]
Default: 10

Max number of results per page

string or Array of strings

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Buckets

List Buckets

Authorizations:
BearerAuth
query Parameters
offset
integer >= 0
Default: 0

Number of results to skip

limit
integer [ 0 .. 1000 ]
Default: 10

Max number of results per page

string or Array of strings
storageAccount
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

status
string
Enum: "OPERATIONAL" "DELETED"
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Get Bucket By Id

Authorizations:
BearerAuth
path Parameters
id
required
string = 24 characters ^[a-fA-F0-9]+$

Id is a hex string of 24 characters

query Parameters
responseType
string
Default: "shallow"
Enum: "ids" "shallow" "selected" "full"

Responses

Response samples

Content type
application/json
null