Ruby SDK
IMPORTANT NOTE:
The Ruby SDK v5 is deprecated and no longer maintained. Please upgrade to v6, which uses the latest stable API version.
The Ruby SDK v5 will reach End of Life by September 30, 2023. After this date, the v5 API will not be accessible. If you require any assistance, please contact our support team.
Overview
The IONOS Cloud SDK for Ruby provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Ruby. The SDK for Ruby wraps the IONOS Cloud API. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
Getting Started
An IONOS account is required for access to the Cloud API; credentials from your registration are used to authenticate against the IONOS Cloud API.
Installation
1. Build a gem
To build the Ruby code into a gem:
Then either install the gem locally:
(for development, run gem install --dev ./ionoscloud-<gem-version>.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
2. Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/ionos-cloud/sdk-ruby, then add the following in the Gemfile:
3. Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
4. Install from RubyGems
Just add this to the Gemfile:
After installing please run the following code:
Authentication
The username and password or the authentication token can be manually specified when initializing the SDK client:
Environment variables can also be used for initialization. For example:
Warning: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file.
Depth
Many of the List or Get operations will accept an optional depth argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The details returned vary depending on the resource being queried, but it generally follows this pattern.
Pretty
The operations will also accept an optional pretty argument. Setting this to a value of true
or false
controls whether the response is pretty-printed (with indentation and new lines). By default, the SDK sets the pretty argument to true
.
Changing the base URL
Base URL for the HTTP operation can be changed in the following way:
Feature Reference
The IONOS Cloud SDK for Ruby aims to offer access to all resources in the IONOS Cloud API and also offers some additional features that make the integration easier:
authentication for API calls
handling of asynchronous requests
FAQ
How can I open a bug/feature request?
Bugs & feature requests can be open on the repository issues: https://github.com/ionos-cloud/sdk-ruby/issues/new/choose
Can I contribute to the Ruby SDK?
Pure SDKs are automatically generated using OpenAPI Generator and don’t support manual changes. If you need changes please open an issue and we’ll try to take care of it.
Last updated