1. Overview

Overview

Cloudways JS Client is a TypeScript-based client library designed to empower your applications with seamless integration with the Cloudways API

It offers a convenient and strongly-typed approach to interact with the Cloudways API, enabling efficient server management, automation, and seamless integration of Cloudways functionality into your web applications.

🚧 Under Development: 🚧
Please note that this library is currently under development. While it is functional and ready for use, some features may be incomplete or subject to change.

Features

  • Easy-to-use: Simplifies interaction with the Cloudways API.
  • Server Management: Facilitates managing servers effortlessly.
  • TypeScript Support: Built with TypeScript for enhanced type safety and development experience.
  • Comprehensive Documentation: Well-documented with detailed code examples, including JSDoc comments.

Installation

You can install the Cloudways JS Client package via npm:

npm install cloudways-js-client

Usage

Initializing the API

import { initializeCloudwaysApi } from 'cloudways-js-client';

const email = 'your_email@example.com'; // Replace with your Cloudways account email
const apiKey = 'your_api_key'; // Replace with your Cloudways API key

initializeCloudwaysApi(email, apiKey); 
        

Deleting a Server

import { deleteServer } from "cloudways-js-client";

async function deleteServerA() {
  const serverId = 12345; // Replace with the server ID you want to delete
  await deleteServer(serverId);
  console.log("Server deleted successfully.");
}
        

Issues

If you encounter any issues or have suggestions for improvement, please visit the GitHub repository and create an issue. We appreciate your feedback!

This is a draft version of the documentation. Your feedback is valuable for further improvements.

On this page