Web and VPS Hosting Automation API

API

NeuPrime Hosting API supports automation of basic and advanced tasks.

API Usage Basics and Examples

Queries are HTTPS to https://www.neuprime.com/api/. You can use both GET and POST as you wish. Response is JSON.

You need token to start. Here is an example:

  • https://www.neuprime.com/api/auth/start?login=[neuprime-login] - returns salt string
  • https://www.neuprime.com/api/auth/login?login=[neuprime-login]&salt=[salt]&response=[md5(passwod+salt+line-feed-symbol)] - this returns token
    MD5 PHP example: md5($password.$salt."\n")

You should store the token and use the token for any future requests. Token voids if you change account password.

Further example:

  • https://www.neuprime.com/api/billing/info?_token_=[token] - generic data query for the account

API HTTP 200 are success. JSON can be like this:

  • [ "string" ]: or "OK", or "[number]" (cast to int), if ID is returned
  • [ { ... } , { ... } ] (array): if 0 or more structures returned ("field":"value" hash).
HTTP > 200 mean error, ususally the body contains description, like this: "ERROR: vds.missing".

NeuPrime API Commands & Usage Considerations

Most API exports, such as /list, return internal structures that should be treated with obvious manual observations "as is".

If you have questions about the fields, feel free to contact support@neuprime.com.

Available API Commands

https://www.neuprime.com/api + address below. Mandatory input value is _token_. The rest is from the manual. Mandatory is marked [like this]. Examples and/or defaults are given (like this).


/auth/start
	login

/auth/login
	login
	salt
	response
	[user_agent]

/logoff
/auth/logoff
	Destroy current token.

/c2dmkey/set
	_key_
	Internal usage, do not call.

/gcmkey/set
	_key_
	Internal usage, do not call.

/iospushkey/set
	_key_
	Internal usage, do not call.

/billing/info

/billing/limits

/billing/balance

/billing/balance.lic

/billing/debt

/updates/list
	_key_ - first ID or 0 to show all

/updates/last

/vds/list
	[_key_] - /vds/list|id

/vds/ip/list
	[_key_] - /vds/list|id

/vds/templates-list

/vds/create
	[type] (vds.dynamic) vz1|vz2|vz3|vz4|vz5|vds.dynamic
	[cr_hvmem] (2048)
	[cr_hvdsk] (30)
	[cr_hvcpu] (2)
	[template] (win2012R2x64)
	[force_memo]
	[hv_1gb_panel_version]
	[panel_install] - 1|0
	[cr_ssd1] - 1|0
	[cr_hv_all_system] - 1|0
	
/vds/update
	_key_ - /vds/list|id
	[cr_hvmem] (2048)
	[cr_hvdsk] (30)
	[cr_hvcpu] (2)	
	
/vds/ip/add
	_key_ - /vds/list|id
	
/vds/ip/delete
	_key_ - /vds/list|id
	del_ip
	
/vds/reboot
	_key_ - /vds/list|id
	
/vds/delete
	_key_ - /vds/list|id
	[force_critical] - 1|0
	
/vds/online
	_key_ - /vds/list|id
	online - 1|0

/email/list

/email/alias/list

/email/add
	add_email

/email/delete
	_key_ - email address (string)

/email/alias/delete
	_key_ - email address (string)

/website/add
	name - website name (temp subdomain), keep simple, unique and short
	srv_type -
		99901	Best for PHP
		99902	Best for ASP, ASP.NET
		99903	Best for Static Content
		8	.NET 2 - 3.5
		99904	.NET 4+, .Core
		1	Legacy ASP + .NET 2 - 3.5
		4	mod_php 5.2
		9	mod_php 5.3
		10	mod_php 5.4
		11	mod_php 5.5
		12	mod_php 5.6
		13	mod_php 7
		15	mod_php 7.1
		16	mod_php 7.2
		17	mod_php 7.3
		18	mod_php 7.4
		19	mod_php 8.0
		20	mod_php 8.1
		5	PHP - FastCGI
		6	PHP - CGI (not recommended)
		20008	Frankfurt - .NET 2 - 3.5
		29994	Frankfurt - .NET 4+
		2004	Frankfurt - mod_php 5.2
		2009	Frankfurt - mod_php 5.3
		2010	Frankfurt - mod_php 5.4
		2011	Frankfurt - mod_php 5.5
		2005	Frankfurt - PHP - FastCGI
	
/website/list

/website/delete
	_key_ - /website/list|id

/ftp/list
	(not recommented - use /website/ API)

/ftp/delete
	_key_ - /ftp/list|id
	(not recommented - use /website/ API)

/dns/list

/dns/add
	add_dns_zone
	[add_dns_record]
	[iis_site_for_dns] - /website/list|id OR "ip_a.b.c.d" string to bind to VDS
	[bind_only] - 1|0

/dns/bind
	_key_ - /dns/list|id
	[dns_to] - /website/list|id OR "ip_a.b.c.d" string to bind to VDS

/dns/delete
	_key_ - /dns/list|id

/dns/raw/managedmx
	_key_ - /dns/list|id
	upd_managed_mx - 1
	managed_mx - 1|0 - add/keep/update (1) or delete (0) hosting-managed root MX record

/dns/raw
	_key_ - /dns/list|id
	s_del = 1 to delete record, DO NOT specify ANY s_del to create record
	s_add = 1 to create record, DO NOT specify ANY s_add to delete record
	dns_type = A,MX,CNAME,AAAA,NS,TXT,SRV
	dns_name = record name or @ for root
	dns_value = record content, dnscmd.exe format (A: [ip], CNAME: [name], MX: [priority] [target])

/database/list

/mssql/list

/dns/prolong/list
	[show_all - 1|0]

/chat/key

 

API Advice
      

This is internal API used for our Mobile platform apps and different like-that purposes.

It is now do not have 100% coverage. If you miss something, we can do things you need really fast. feel free to contact support@neuprime.com.