Waven API (1.0.0)

Download OpenAPI specification:Download

Overview

The Waven API is a RESTful API. The requests and responses are formated according to the JSON API specification.

In addition to this documentation, we also provide an OpenAPI "yaml" file describing the API: Waven API Specification.

Authentication

Authentication for the Waven API is based on bearer tokens. You can obtain a bearer token by logging in to your Waven account and generating it. Then, you can authenticate with the API by including the token in the Authorization header of your requests:

Authorization: Bearer <your_token>

Paging

The Waven API supports and enforces pagination strategies for GET collection endpoints.

Cursor-based paging

Cursor-based paging uses the query parameters after and before to specify chunk of data to be returned. Add limit to the parameters to choose how many items returned collection must return at most. The response will include a cursor object containing after and/or before field, if the next and/or previous page exists.

Cursor-based paging is not subject to duplication if new resources are added to the collection. For example, if you are iterating through the services resource via GET /services?limit=10&order=asc(created_time), and a new service is created that has a created_time value after the first service, you will not see a duplicate entry when you fetch the next page at GET /services?limit=10&order=asc(created_time)&after=<cursor.after>.

Billing

Get billing details

Authorizations:
bearerAuth
query Parameters
id
string
order
string^(asc|desc\((created_at)\))$
Example: order=desc(created_at)

Sort order: 'desc' for descending default, or 'asc(field)' for ascending on a specific field. Allowed fields: created_at.

limit
integer <int32> [ 1 .. 50 ]
Default: 10
before
string
after
string

Responses

Request samples

<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.waven.it/v1/billing?id=123&limit=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type: application/json"
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Response samples

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

Create a billing detail

Authorizations:
bearerAuth
Request Body schema: application/json
first_name
string or null
middle_name
string or null
last_name
string or null
tax_id
required
string
address_line_one
required
string
address_line_two
string or null
city
required
string
country
required
string
company_name
string or null

Responses

Request samples

Content type
application/json
{
  • "first_name": "string",
  • "middle_name": "string",
  • "last_name": "string",
  • "tax_id": "string",
  • "address_line_one": "string",
  • "address_line_two": "string",
  • "city": "string",
  • "country": "string",
  • "company_name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "first_name": "string",
  • "middle_name": "string",
  • "last_name": "string",
  • "tax_id": "string",
  • "address_line_one": "string",
  • "address_line_two": "string",
  • "city": "string",
  • "country": "string",
  • "company_name": "string"
}

Delete billing detail by ID

Authorizations:
bearerAuth
path Parameters
id
required
string

Billing detail ID

Responses

Request samples

<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.waven.it/v1/billing/123",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type: application/json"
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Proxies

Get allowed proxy networks

Authorizations:
bearerAuth
query Parameters
order
string^(asc|desc\((created_at)\))$
Example: order=desc(created_at)

Sort order: 'desc' for descending default, or 'asc(field)' for ascending on a specific field. Allowed fields: created_at.

limit
integer <int32> [ 1 .. 50 ]
Default: 10
before
string
after
string

Responses

Request samples

<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.waven.it/v1/proxies/allowed-networks?limit=10",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type: application/json"
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Response samples

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

Add an allowed network

Authorizations:
bearerAuth
Request Body schema: application/json
network
required
string^([0-9]{1,3}\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-...

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": "string",
  • "network": "string"
}

Delete allowed network by ID

Authorizations:
bearerAuth
path Parameters
id
required
string

Network ID

Responses

Request samples

<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.waven.it/v1/proxies/allowed-networks/123",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type": "application/json"
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Services

Get services list

Authorizations:
bearerAuth
query Parameters
id
string
order
string^(asc|desc\((created_at)\))$
Example: order=desc(created_at)

Sort order: 'desc' for descending default, or 'asc(field)' for ascending on a specific field. Allowed fields: created_at.

limit
integer <int32> [ 1 .. 100 ]
Default: 50
before
string
after
string

Responses

Request samples

<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.waven.it/v1/services?limit=10",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type: "application/json"
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Response samples

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

Create a service

Authorizations:
bearerAuth
Request Body schema: application/json
plan_id
required
string
payment_method
string
Enum: "STRIPE" "COINBASE"
traffic_gb_amount
integer or null
is_recurring
boolean
billing_detail_id
required
string

Responses

Request samples

Content type
application/json
{
  • "plan_id": "string",
  • "payment_method": "STRIPE",
  • "traffic_gb_amount": 0,
  • "is_recurring": true,
  • "billing_detail_id": "string"
}

Response samples

Content type
application/json
{
  • "code": "badRequest",
  • "message": "bad request",
  • "details": {
    }
}

Update a service by ID

Authorizations:
bearerAuth
path Parameters
id
required
string

Service ID

Request Body schema: application/json
start_at
string or null <date-time>
end_at
string or null <date-time>
status
string or null
traffic_mb_amount
integer or null <int64>
remaining_mb_amount
integer or null <int64>
automatic_ip_change_interval
string or null
Array of objects

Responses

Request samples

Content type
application/json
{
  • "start_at": "2019-08-24T14:15:22Z",
  • "end_at": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "traffic_mb_amount": 0,
  • "remaining_mb_amount": 0,
  • "automatic_ip_change_interval": "string",
  • "endpoints": [
    ]
}

Delete a service by ID

Authorizations:
bearerAuth
path Parameters
id
required
string

Service ID

Responses

Request samples

<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.waven.it/v1/services/123",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type": "application/json"
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Change IP of a service by ID

Authorizations:
bearerAuth
path Parameters
id
required
string

Service ID

Request Body schema: application/json
id
string

Responses

Request samples

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

Invoices

Get invoices list

Authorizations:
bearerAuth
query Parameters
id
string
status
string
Enum: "CREATED" "PAID" "EXPIRED"
order
string^(asc|desc\((created_at)\))$
Example: order=desc(created_at)

Sort order: 'desc' for descending default, or 'asc(field)' for ascending on a specific field. Allowed fields: created_at.

limit
integer <int32> [ 1 .. 100 ]
Default: 50
before
string
after
string

Responses

Request samples

<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.waven.it/v1/invoices?status=PAID&limit=10",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type": "application/json"
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Response samples

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