HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
Guides

Getting Started

The Rainway API is a RESTful API that allows programmatic access to Rainway information. It's exposed via HTTPS endpoint and requires a Rainway API Key Pair to authenticate.

We provide a small set of APIs to allow access to active Rainway peers that are connected to the Rainway Network. We think these APIs are the first step in enabling folks to create multi-peer architectures for their users. For instance, these APIs could be used to enumerate multiple applications hosted in the cloud and connected as peers to the Rainway network, so that a user could be presented a list of available applications to connect to.

As mentioned above, you will need to authenticate in order to use the API. Authentication uses basic access authentication with the username being one of your Rainway API Key's public key, and the password being the accompanying secret key. In accordance with the spec, this takes the form of a header:

Authorization: Basic base64(<public key>:<secret key>)

You may generate Rainway API keys via the Rainway Hub.

Usage

📘

In the near future, we will be adding additional API clients to further simplify the process of accessing these endpoints. In the meantime, you can use the readme.io provided api library for unsupported languages. We appreciate your patience!

For more information, including an interactive API playground, refer to the API reference.

Typescript and Javascript

Use our generated API wrapper.

npm install @rainway/api
import {Configuration, PeersApi} from "@rainway/api"

const client = new PeersApi(new Configuration({
        username: "pk_live_xxx", // Rainway API public key
        password: "sk_live_xxx" // Rainway API secret key
}))
// Now you can use the methods on the api object to call the API

C#

Use our generated API wrapper.

Install-Package Rainway.Api -Version 0.2.2
using System.Collections.Generic;
using System.Diagnostics;
using Rainway.Api.Api;
using Rainway.Api.Client;
using Rainway.Api.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var client = new PeersApi(new Configuration() {
                Username = "pk_live_xxx", // Rainway API public key
                Password = "sk_live_xxx"   // Rainway API secret key
            });
            // Now you can use the methods on the apiInstance object to call the API
        }
    }
}

What’s Next