Skip to content

000webhost/000webhost-sdk-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webhost-client

Browser and node module for making API requests against webhost-client.

Please note: This module uses Popsicle to make API requests. Promises must be supported or polyfilled on all target environments.

Installation

npm install webhost-client --save
bower install webhost-client --save

Usage

Node

var WebhostClient = require('webhost-client');

var client = new WebhostClient();

Browsers

<script src="webhost-client/index.js"></script>

<script>
  var client = new WebhostClient();
</script>

Options

You can set options when you initialize a client or at any time with the options property. You may also override options for a single request by passing an object as the second argument of any request method. For example:

var client = new WebhostClient({ ... });

client.options = { ... };

client.resource('/').get(null, {
  baseUri: 'http://example.com',
  headers: {
    'Content-Type': 'application/json'
  }
});

Base URI

You can override the base URI by setting the baseUri property, or initializing a client with a base URI. For example:

new WebhostClient({
  baseUri: 'https://example.com'
});

Base URI Parameters

If the base URI has parameters inline, you can set them by updating the baseUriParameters property. For example:

client.options.baseUriParameters.version = 'v3';

Resources

All methods return a HTTP request instance of Popsicle, which allows the use of promises (and streaming in node).

resources.users.goals.list

var resource = client.resources.users.goals.list;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get users goal choices

resource.get().then(function (res) { ... });
POST

Record users goal choice

resource.post().then(function (res) { ... });

resources.users.user_id(user_id)

  • user_id string
var resource = client.resources.users.user_id(user_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get user information

resource.get().then(function (res) { ... });
DELETE

Delete user

resource.delete().then(function (res) { ... });
PATCH

Update user

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "name": {
      "type": "string",
      "required": true,
      "minLength": 2
    },
    "country": {
      "type": "string",
      "required": true,
      "minLength": 3
    }
  }
}

resources.users.user_id(user_id).password-reset

var resource = client.resources.users.user_id(user_id).password-reset;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Request a new password reset link

resource.post().then(function (res) { ... });

resources.users.user_id(user_id).phone-number

var resource = client.resources.users.user_id(user_id).phone-number;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Update user phone number

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "phone_number": {
      "type": "string",
      "required": true,
      "minLength": 6,
      "pattern": "^(\\+?[0-9]*$)$"
    }
  }
}

resources.users.user_id(user_id).email

var resource = client.resources.users.user_id(user_id).email;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Update user email

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "email": {
      "type": "string",
      "required": true,
      "minLength": 4
    }
  }
}

resources.users.user_id(user_id).resend-confirmation

var resource = client.resources.users.user_id(user_id).resend-confirmation;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Resend email confirmation

resource.post().then(function (res) { ... });

resources.users.user_id(user_id).survey

var resource = client.resources.users.user_id(user_id).survey;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Stores survey results.

resource.patch().then(function (res) { ... });

resources.users.user_id(user_id).survey-questions

var resource = client.resources.users.user_id(user_id).survey-questions;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get users survey questions

resource.get().then(function (res) { ... });

resources.users.user_id(user_id).async.messages

var resource = client.resources.users.user_id(user_id).async.messages;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get user complated async job

resource.get().then(function (res) { ... });

resources.users.user_id(user_id).async.messages.message_id(message_id)

  • message_id string
var resource = client.resources.users.user_id(user_id).async.messages.message_id(message_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Set user complated async job as seen

resource.patch().then(function (res) { ... });

resources.users.user_id(user_id).zyro-builder

var resource = client.resources.users.user_id(user_id).zyro-builder;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get user zyro builder usage

resource.get().then(function (res) { ... });

resources.users.user_id(user_id).get-global-notifications

var resource = client.resources.users.user_id(user_id).get-global-notifications;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get user global notifications

resource.get().then(function (res) { ... });

resources.users.user_id(user_id).global-notifications-click

var resource = client.resources.users.user_id(user_id).global-notifications-click;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

User clicks on notification

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "notification": {
      "type": "integer",
      "required": true
    }
  }
}

resources.users.user_id(user_id).global-notifications-all-read

var resource = client.resources.users.user_id(user_id).global-notifications-all-read;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

User marks notifications as read

resource.patch().then(function (res) { ... });

resources.users.user_id(user_id).get-notifications

var resource = client.resources.users.user_id(user_id).get-notifications;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get users notifications

resource.get().then(function (res) { ... });

resources.users.user_id(user_id).update-show-notification

var resource = client.resources.users.user_id(user_id).update-show-notification;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

update users notifications show flag

resource.post().then(function (res) { ... });

resources.users.user_id(user_id).add-notification

var resource = client.resources.users.user_id(user_id).add-notification;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

add new user notification

resource.patch().then(function (res) { ... });

resources.users.user_id(user_id).website-pauses

var resource = client.resources.users.user_id(user_id).website-pauses;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get all app pauses which belongs to user

resource.get().then(function (res) { ... });

resources.users.user_id(user_id).next-temp-sleep

var resource = client.resources.users.user_id(user_id).next-temp-sleep;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the data about next temporary sleeping website

resource.get().then(function (res) { ... });

resources.users.user_id(user_id).phone-verified

var resource = client.resources.users.user_id(user_id).phone-verified;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

User phone verified notification

resource.get().then(function (res) { ... });

resources.users.user_id(user_id).zyro

var resource = client.resources.users.user_id(user_id).zyro;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Get redirect link for Zyro user transfer

resource.post().then(function (res) { ... });

resources.users.email-verify

var resource = client.resources.users.email-verify;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });

resources.users.email-verify.token(token)

  • token string
var resource = client.resources.users.email-verify.token(token);
POST

Verifies user's email with a token

resource.post().then(function (res) { ... });

resources.users.social.unlink.provider(provider)

  • provider string
var resource = client.resources.users.social.unlink.provider(provider);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Unlink User from social network

resource.patch().then(function (res) { ... });

resources.users.password-reset

var resource = client.resources.users.password-reset;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });

resources.users.password-reset.token(token)

  • token string
var resource = client.resources.users.password-reset.token(token);
GET

Retrieve password reset token details

resource.get().then(function (res) { ... });
PATCH

Set a new password using password reset token

resource.patch().then(function (res) { ... });

resources.users.social-login.unlink

var resource = client.resources.users.social-login.unlink;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Unlink User from social login

resource.get().then(function (res) { ... });

resources.users.onboarding

var resource = client.resources.users.onboarding;
POST

Stores onboarding answers

resource.post().then(function (res) { ... });

resources.nps

var resource = client.resources.nps;
PATCH

Net promotion score track

resource.patch().then(function (res) { ... });

resources.upgrade.hostinger

var resource = client.resources.upgrade.hostinger;
POST

Get upgrade to hostinger link

resource.post().then(function (res) { ... });

resources.upgrade.trial

var resource = client.resources.upgrade.trial;
GET

Get if user is available for free trial

resource.get().then(function (res) { ... });

resources.emailforwards

var resource = client.resources.emailforwards;
GET

Get user information

resource.get().then(function (res) { ... });
POST

Get user information

resource.post().then(function (res) { ... });

resources.emailforwards.id(id)

  • id string
var resource = client.resources.emailforwards.id(id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Delete user

resource.delete().then(function (res) { ... });

resources.apps

var resource = client.resources.apps;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get list of apps

resource.get().then(function (res) { ... });
Query Parameters
resource.get({ ... });
  • status string

Specify application status

POST

Create new app

resource.post().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "app_name": {
      "type": "string",
      "required": true
    },
    "domain": {
      "type": "string",
      "required": true
    },
    "type": {
      "type": "string",
      "required": true
    },
    "location": {
      "type": "string",
      "required": true
    },
    "password": {
      "type": "string",
      "required": true,
      "minLength": 4

    }
  }
}

resources.apps.app_id(app_id)

  • app_id string
var resource = client.resources.apps.app_id(app_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the app with appId

resource.get().then(function (res) { ... });
DELETE

Delete app

resource.delete().then(function (res) { ... });

resources.apps.app_id(app_id).reset

var resource = client.resources.apps.app_id(app_id).reset;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Clean everything client has ever created, basically delete and recreate

resource.post().then(function (res) { ... });

resources.apps.app_id(app_id).password

var resource = client.resources.apps.app_id(app_id).password;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Update application password

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "user_password": {
      "type": "string",
      "required": true,
      "minLength": 6
    },
    "new_app_password": {
      "type": "string",
      "required": true,
      "minLength": 6
    }
  }
}

resources.apps.app_id(app_id).type

var resource = client.resources.apps.app_id(app_id).type;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Change application's type (PHP version)

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "type": {
      "type": "string",
      "required": true,
      "minLength": 5
    }
  }
}

resources.apps.app_id(app_id).category

var resource = client.resources.apps.app_id(app_id).category;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Change application's category

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "category": {
      "type": "string",
      "required": true,
      "minLength": 3
    }
  }
}

resources.apps.app_id(app_id).adult

var resource = client.resources.apps.app_id(app_id).adult;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Change application's adult property

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "adult": {
      "type": "boolean",
      "required": true
    }
  }
}

resources.apps.app_id(app_id).displayerrors

var resource = client.resources.apps.app_id(app_id).displayerrors;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Change application's display_errors property

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "adult": {
      "type": "boolean",
      "required": true
    }
  }
}

resources.apps.app_id(app_id).sendmail

var resource = client.resources.apps.app_id(app_id).sendmail;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Turn on/off sendmail

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "active": {
      "type": "boolean",
      "required": true
    }
  }
}

resources.apps.app_id(app_id).changestate

var resource = client.resources.apps.app_id(app_id).changestate;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Change state ( global action for all future switches )

resource.patch().then(function (res) { ... });

resources.apps.app_id(app_id).ftp

var resource = client.resources.apps.app_id(app_id).ftp;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Turn on/off ftp

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "active": {
      "type": "boolean",
      "required": true
    }
  }
}

resources.apps.app_id(app_id).repair

var resource = client.resources.apps.app_id(app_id).repair;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Repair Website

resource.patch().then(function (res) { ... });

resources.apps.app_id(app_id).restore

var resource = client.resources.apps.app_id(app_id).restore;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Restore Website

resource.patch().then(function (res) { ... });

resources.apps.app_id(app_id).mining

var resource = client.resources.apps.app_id(app_id).mining;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Change Mining Status

resource.patch().then(function (res) { ... });

resources.apps.app_id(app_id).files

var resource = client.resources.apps.app_id(app_id).files;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get FTP details for application

resource.get().then(function (res) { ... });
PATCH

Update FTP password

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
     "password_old": {
       "type": "string",
       "required": true,
       "minLength": 6
     },
     "password_new": {
       "type": "string",
       "required": true,
       "minLength": 6
     },
    "password_new_confirm": {
      "type": "string",
      "required": true,
      "minLength": 6
    }
  }
}

resources.apps.app_id(app_id).files.permissions

var resource = client.resources.apps.app_id(app_id).files.permissions;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Fix file permissions

resource.patch().then(function (res) { ... });

resources.apps.app_id(app_id).settings

var resource = client.resources.apps.app_id(app_id).settings;
GET

Get Application settings

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).databases

var resource = client.resources.apps.app_id(app_id).databases;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get list of databases

resource.get().then(function (res) { ... });
POST

Create new databasis

resource.post().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "name": {
      "type": "string",
      "required": true,
      "minLength": 2
    },
    "username": {
      "type": "string",
      "required": true
    },
    "password": {
      "type": "string",
      "required": true
    },
    "ip": {
      "type": "string",
      "required": false,
      "default" : "127.0.0.1"
    },
    "permission": {
      "type": "string",
      "required": false
    }
  }
}

resources.apps.app_id(app_id).databases.database_id(database_id)

  • database_id string
var resource = client.resources.apps.app_id(app_id).databases.database_id(database_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Delete databasis

resource.delete().then(function (res) { ... });

resources.apps.app_id(app_id).databases.database_id(database_id).change-password

var resource = client.resources.apps.app_id(app_id).databases.database_id(database_id).change-password;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
PATCH

Change database password

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "password_new": {
      "type": "string",
      "required": true,
      "minLength": 6
    },
    "password_new_confirm": {
      "type": "string",
      "required": true,
      "minLength": 6
    }
  }
}

resources.apps.app_id(app_id).databases.database_id(database_id).usage

var resource = client.resources.apps.app_id(app_id).databases.database_id(database_id).usage;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get database usage over time

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).databases.database_id(database_id).login

var resource = client.resources.apps.app_id(app_id).databases.database_id(database_id).login;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get database login key

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).cronjobs

var resource = client.resources.apps.app_id(app_id).cronjobs;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get list of cronjobs

resource.get().then(function (res) { ... });
POST

Create new cronjob

resource.post().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "job": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "minLength": 4
    },
    "minute": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "minLength": 4
    },
    "minute": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "minLength": 4
    },
    "hour": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "minLength": 2
    },
    "month": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "minLength": 2
    },
    "weekday": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "maxLength": 1
    }
  }
}

resources.apps.app_id(app_id).cronjobs.cron_id(cron_id)

  • cron_id string
var resource = client.resources.apps.app_id(app_id).cronjobs.cron_id(cron_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Delete cronjob

resource.delete().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.all

var resource = client.resources.apps.app_id(app_id).statistics.all;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get bandwidth usage for application over time

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.bandwidth

var resource = client.resources.apps.app_id(app_id).statistics.bandwidth;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get bandwidth usage for application over time

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.response-codes

var resource = client.resources.apps.app_id(app_id).statistics.response-codes;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get bandwidth usage for application over time

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.response-time

var resource = client.resources.apps.app_id(app_id).statistics.response-time;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get bandwidth usage for application over time

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.disk-quota

var resource = client.resources.apps.app_id(app_id).statistics.disk-quota;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get bandwidth usage for application over time

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.top-statistics

var resource = client.resources.apps.app_id(app_id).statistics.top-statistics;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get Disk Space Quota , Inode Usage Quota, Request per Minute statistics

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.more-statistics

var resource = client.resources.apps.app_id(app_id).statistics.more-statistics;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get Bandwidth, Response codes , Request time, Sent emails statistics

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.sendmail

var resource = client.resources.apps.app_id(app_id).statistics.sendmail;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get sendmail daily usage

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).statistics.monthly-bandwidth

var resource = client.resources.apps.app_id(app_id).statistics.monthly-bandwidth;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get bandwidth usage for application over time

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).backend

var resource = client.resources.apps.app_id(app_id).backend;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get current backend info application

resource.get().then(function (res) { ... });
PATCH

Change backend type for application

resource.patch().then(function (res) { ... });

resources.apps.app_id(app_id).redirects

var resource = client.resources.apps.app_id(app_id).redirects;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get list of redirects

resource.get().then(function (res) { ... });
POST

Create new redirect

resource.post().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "from": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "maxLength": 150
    },
    "to": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "maxLength": 150
    },
    "type": {
      "type": "integer",
      "required": false,
      "default": 301
    }
  }
}

resources.apps.app_id(app_id).redirects.redirect_id(redirect_id)

  • redirect_id string
var resource = client.resources.apps.app_id(app_id).redirects.redirect_id(redirect_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Delete redirect

resource.delete().then(function (res) { ... });

resources.apps.app_id(app_id).security.password-protected-directories

var resource = client.resources.apps.app_id(app_id).security.password-protected-directories;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get list of password-protected-directories

resource.get().then(function (res) { ... });
POST

Create new password-protected-directory

resource.post().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "directory": {
      "type": "string",
      "required": false,
      "minLength": 1,
      "maxLength": 30
    },
    "username": {
      "type": "string",
      "required": true,
      "minLength": 2,
      "maxLength": 30
    },
    "password": {
      "type": "string",
      "required": true,
      "minLength": 1,
      "maxLength": 30
    }
  }
}

resources.apps.app_id(app_id).security.password-protected-directories.dir_id(dir_id)

  • dir_id string
var resource = client.resources.apps.app_id(app_id).security.password-protected-directories.dir_id(dir_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Delete password-protected-directory

resource.delete().then(function (res) { ... });

resources.apps.app_id(app_id).security.hotlink-protection

var resource = client.resources.apps.app_id(app_id).security.hotlink-protection;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get list of hotlink-protection

resource.get().then(function (res) { ... });
POST

Create new hotlink-protection

resource.post().then(function (res) { ... });
Query Parameters
resource.post(null, { query: { ... } });
  • domain string

Specify domain to protect

  • redirect string

Specify hotlink url

  • redirect_protocol string

Specify hotlink url

  • extensions string

Specify hotlink extensions

  • direct_requests boolean

Allow direct requests

Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "domain": {
      "type": "string",
      "required": true
    },
    "redirect": {
      "type": "string",
      "required": true
    },
    "redirect_protocol": {
      "type": "string",
      "required": false
    },
    "extensions": {
      "type": "string",
      "required": true
    },
    "direct_requests": {
      "type": "boolean",
      "required": false,
      "default": false
    }
  }
}

resources.apps.app_id(app_id).security.hotlink-protection.hostlink_id(hostlink_id)

  • hostlink_id string
var resource = client.resources.apps.app_id(app_id).security.hotlink-protection.hostlink_id(hostlink_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Delete hotlink-protection

resource.delete().then(function (res) { ... });

resources.apps.app_id(app_id).security.ip.whitelist

var resource = client.resources.apps.app_id(app_id).security.ip.whitelist;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get list of whitelist

resource.get().then(function (res) { ... });
POST

Create new whitelist

resource.post().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "ip": {
      "type": "string",
      "required": true
    }
  }
}

resources.apps.app_id(app_id).security.ip.whitelist.whitelist_id(whitelist_id)

  • whitelist_id string
var resource = client.resources.apps.app_id(app_id).security.ip.whitelist.whitelist_id(whitelist_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Delete whitelist

resource.delete().then(function (res) { ... });

resources.apps.app_id(app_id).security.ip.blacklist

var resource = client.resources.apps.app_id(app_id).security.ip.blacklist;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get list of blacklist

resource.get().then(function (res) { ... });
POST

Create new blacklist

resource.post().then(function (res) { ... });
Query Parameters
resource.post(null, { query: { ... } });
  • ip string

Specify IP Address

Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "ip": {
      "type": "string",
      "required": true
    }
  }
}

resources.apps.app_id(app_id).security.ip.blacklist.blacklist_id(blacklist_id)

  • blacklist_id string
var resource = client.resources.apps.app_id(app_id).security.ip.blacklist.blacklist_id(blacklist_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Delete blacklist

resource.delete().then(function (res) { ... });

resources.apps.app_id(app_id).domain

var resource = client.resources.apps.app_id(app_id).domain;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get current domain information

resource.get().then(function (res) { ... });
PATCH

Change application domain property

resource.patch().then(function (res) { ... });
Body

application/json

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-03/schema",
  "id": "http://jsonschema.net",
  "required": true,
  "properties": {
    "type": {
      "type": { "enum": [ "default","subdomain","domain" ] },
      "required": true
    },
    "domain": {
      "type": "string",
      "required": true
    }
  }
}

resources.apps.app_id(app_id).zyro

var resource = client.resources.apps.app_id(app_id).zyro;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Get URL to Zyro application

resource.post().then(function (res) { ... });

resources.apps.app_id(app_id).logs

var resource = client.resources.apps.app_id(app_id).logs;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the activity log for the application

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).build_status

var resource = client.resources.apps.app_id(app_id).build_status;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get application's build status

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).install

var resource = client.resources.apps.app_id(app_id).install;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Install specified software to user's application

resource.post().then(function (res) { ... });

resources.apps.app_id(app_id).filemanager.wasaccessed

var resource = client.resources.apps.app_id(app_id).filemanager.wasaccessed;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Trigger File Manager access Amplitude event

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).software

var resource = client.resources.apps.app_id(app_id).software;
GET

Get what software app uses

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).app-pause

var resource = client.resources.apps.app_id(app_id).app-pause;
GET

Get app daily sleeping info

resource.get().then(function (res) { ... });

resources.apps.app_id(app_id).update-app-pause

var resource = client.resources.apps.app_id(app_id).update-app-pause;
PATCH

Update app daily sleeping info

resource.patch().then(function (res) { ... });

resources.apps.check-name

var resource = client.resources.apps.check-name;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Validate email

resource.post().then(function (res) { ... });

resources.archived-apps

var resource = client.resources.archived-apps;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of archived applications

resource.get().then(function (res) { ... });

resources.premium-apps

var resource = client.resources.premium-apps;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of premium user aps

resource.get().then(function (res) { ... });

resources.premium-apps.autologin

var resource = client.resources.premium-apps.autologin;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Get autologin link to premium app by invoice id

resource.post().then(function (res) { ... });

resources.hostinger-pricing

var resource = client.resources.hostinger-pricing;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of hostinger prices and plan info

resource.get().then(function (res) { ... });

resources.hostinger-pricing-all

var resource = client.resources.hostinger-pricing-all;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of all hostinger prices and plans info

resource.get().then(function (res) { ... });

resources.hostinger-pricing-old-endpoint

var resource = client.resources.hostinger-pricing-old-endpoint;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of all hostinger prices and plans info from old endpoint

resource.get().then(function (res) { ... });

resources.hostinger-pricing-hbilling

var resource = client.resources.hostinger-pricing-hbilling;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of all hostinger prices and plans info from hBilling

resource.get().then(function (res) { ... });

resources.types

var resource = client.resources.types;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of available application types

resource.get().then(function (res) { ... });

resources.parked-domains

var resource = client.resources.parked-domains;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of parked domains

resource.get().then(function (res) { ... });
POST

Park a new domain

resource.post().then(function (res) { ... });

resources.parked-domains.appName(appName).has-3rd-party

var resource = client.resources.parked-domains.appName(appName).has-3rd-party;
GET

Get if app uses 3rd party parked domain

resource.get().then(function (res) { ... });

resources.parked-domains.domain_id(domain_id)

  • domain_id string
var resource = client.resources.parked-domains.domain_id(domain_id);
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
DELETE

Deletes a parked domain

resource.delete().then(function (res) { ... });

resources.parked-domains.domain_id(domain_id).status

var resource = client.resources.parked-domains.domain_id(domain_id).status;
GET

Get name server status for a parked domain

resource.get().then(function (res) { ... });

resources.parked-domains.domain_id(domain_id).records

var resource = client.resources.parked-domains.domain_id(domain_id).records;
PATCH

Updates DNS records for a parked domain

resource.patch().then(function (res) { ... });

resources.categories

var resource = client.resources.categories;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
GET

Get the list of available application categories

resource.get().then(function (res) { ... });

resources.domains.search

var resource = client.resources.domains.search;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST
resource.post().then(function (res) { ... });

resources.domains.check

var resource = client.resources.domains.check;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Check domain availability

resource.post().then(function (res) { ... });

resources.domains.buy

var resource = client.resources.domains.buy;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Create domain purchase invoice

resource.post().then(function (res) { ... });

resources.domains.invoice

var resource = client.resources.domains.invoice;
OPTIONS

OAuth2 preflight check

resource.options().then(function (res) { ... });
POST

Get invoice autologin URL

resource.post().then(function (res) { ... });

resources.add-translation

var resource = client.resources.add-translation;
PATCH

Sends translations to REST

resource.patch().then(function (res) { ... });

resources.store

var resource = client.resources.store;
GET

Get the list of referral store items

resource.get().then(function (res) { ... });

resources.store.announcements

var resource = client.resources.store.announcements;
POST

Record if the user has seen the store announcement modal

resource.post().then(function (res) { ... });

resources.store.announcements.user_id(user_id)

  • user_id string
var resource = client.resources.store.announcements.user_id(user_id);
GET

Get boolean if user has seen store announcement modal

resource.get().then(function (res) { ... });

resources.store.latest-announcement

var resource = client.resources.store.latest-announcement;
POST

Record if the user has seen the latest store item announcement modal

resource.post().then(function (res) { ... });

resources.gamification

var resource = client.resources.gamification;
GET

Returns user active gamification tasks

resource.get().then(function (res) { ... });

resources.cart

var resource = client.resources.cart;
POST

Gets Cart url

resource.post().then(function (res) { ... });

Custom Resources

You can make requests to a custom path in the API using the #resource(path) method.

client.resource('/example/path').get();

License

Apache 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published