- Change Application access state
- Get Application Backup status
- Create App Credentials
- Delete App Credential
- Delete Cname
- Delete Local Backup
- Get App Credentials
- Get Application SSH Access status
- Get Application access state
- Get Cron List
- Get FPM Settings
- Get Varnish Settings.
- Reset File Permissions
- Restore App
- Rollback Restore
- Backup
- Update App Aliases
- Update App Cname
- Update App Credential
- Update Application SSH Access status
- Update Cron List
- Update DB Password
- Update FPM Settings
- Update Symlink
- Update Varnish Settings
- Update Webroot
- Update CORS Headers
- Update WebP Redirectoin
- Enforce HTTPS
- Update Application GEO IP
- Update Application XMLRPC
- Update Device Detection Status
- Update Ignore Query String Status
- Update Direct PHP Execution Status
- Update Cron Optimizer Status
- Update Application Admin Password
- Bot Protection Status
- Bot Protection Traffic
- Bot Protection Traffic Summary
- Bot Protection Login Traffic
- Bot Protection Login Traffic Summary
- Bot Protection Bad Bots List
- Bot Protection Whitelisted IPs
- Bot Protection Whitelisted Bots
- Bot Protection Activation
- Bot Protection Deactivation
- Bot Protection IP Whitelisting
- Bot Protection Bad-Bots Whitelisting
- Clear App Cache
- Get Cloudflare details
- Set up Cloudflare for your Application
- Fetch TXT Records
- Delete Domain
- Transfer Domain
- Purge Domain
- Get Dns Query
- Verify Txt Records
- Get Smart Cache Purge status
- Configure Smart Cache Purge
- Get Settings
- Update Settings
- Get Cloudflare Cache Analytics
- Get Cloudflare Security Analytics
- List DNS Made Easy domains
- Add DNS Made Easy domains
- Delete DNS Made Easy domains
- Get DNS Made Easy domain's status
- Get DNS Made Easy domain's records
- Add records to DNS Made Easy domain
- Delete records from DNS Made Easy domain
- Update record of a DNS Made Easy domain
- Get current month DNS Made Easy domain's usage
- Backup Server
- Delete Local Server Backups
- Get Monitoring Graph
- Get Server Settings
- Get Maintenance Window
- Update Maintenance Window
- Update Backup Settings
- Update Master Password
- Update Master Username
- Update Server Package
- Update Server Settings
- Update Snapshot frequency
- Get Disk Cleanup Settings
- Update Disk Cleanup Settings
- Optimize Server Disk
Getting Started
Welcome to the Cloudways API documentation.
Cloudways Platform API provides the power, flexibility and ease of use of the Cloudways Platform in a simple to use API.
This section covers detailed specifications and documentation of the Platform API. Everything that you can do on the Cloudways Platform is available readily at your finger-tips through an easy to use API.
The Code Examples section provides quick code samples in PHP and Python programming languages that demonstrate how to perform various operations, such as fetching an OAuth token, creating a server, etc.
Request
Cloudways API is a full-featured HTTP API over SSL. It makes use of the following HTTP verbs:
GET |
POST |
PUT |
DELETE |
HTTP Response Status and Error codes
Cloudways API sends specific HTTP status codes in response to API requests. For successful responses, the standard 200 response code is used. Any other data returned in response is provided as a well-formed JSON object in the body of the response.
In the event of a problem, the status code will contain an error code, while the body of the response will usually contain additional information about the problem that was encountered. The following is a list of error codes and their descriptions:
400 Access Token not provided | Make sure that you have sent a proper access token along with your request |
---|---|
401 Authentication Error | Make sure that you have provided a valid access token with your request |
403 Forbidden / Authorization Error | You don't have access to the requested resource/action |
422 Validation Error |
All validation errors will throw this status code. Response body will contain details of the error.
{ "server_id": [{ "code": "integer", "message": "The server id must be an integer." }], "app_id": [{ "code": "integer", "message": "The app id must be an integer." }] } |
500 Internal server Error | API Server is unable to handle your request. |
Authentication
To access any API call you first need to authorize yourself on our Cloudways API. For this purpose we use OAuth authentication, an open standard for authorization. Here are the steps involved:
- Get your API Key from here https://platform.cloudways.com/api
- Generate the OAuth access token
- Send the access token with each request in bearer authorization header.