Giter Site home page Giter Site logo

api's Introduction

What is this?

This is the place to go for documentation, examples and support/feedback for GleSYS API.

You should start out by reading the introduction.

Where can I find documentation?

The documentation can be found right here on github in our wiki. It comes in the form of an introduction and a full documentation of all functions available in GleSYS API. This documentation has been automatically generated from the API.

Where can I find examples?

The examples are available right here on our github repo. They are broken up by scripting/programming language and if you browse around in the repository you will find that each example has its own description.

Please feel free to contribute with more examples. You could either do a pull-request or send us an email to [email protected]

Remember that all these examples are just examples. If you want to use any of these scripts in an production environment, its on your own responsibility.

Current examples

BASH

All bash examples

PHP

All PHP examples

Ruby

All Ruby examples

Python

All Python examples

  • ConkyServerStatus - Commandline script to be used with conky to show a specific glesys servers status directly on your desktop

Are there any frameworks/toolboxes available?

If you are looking for a framework to manage your GleSYS virtual servers take a look at the following projects:

  • glesys-go - An official client library written in go.
  • docker-machine-driver-glesys - An official glesys api driver for docker machine
  • fog - The Ruby cloud services library.
  • jclouds - API abstractions as java and clojure libraries.
  • knife-glesys - A Knife addon for managing you GleSYS vps. Uses fog.
  • glesys-bash-client - A bash client for interacting with the GleSYS API.
  • glesys-dnshook - A hook for the Let's Encrypt ACME client dehydrated that allows you to use GleSYS DNS records to respond to dns-01 challenges.
  • lexicon - Manipulate DNS records on various DNS providers (including GleSYS) in a standardized/agnostic way.
  • multipass - Fully-automated certificate manager for NodeJS 16 with support for various DNS providers (including GleSYS).
  • glesys-api-node - A Node.js wrapper for the GleSYS API.

If you know about any other frameworks that support the GleSYS API, please let us know!

Where can I get support?

You can either open a new issue here on github or send us an email at [email protected]

License

If not stated otherwise, the contents of this repository are distributed under the MIT license.

api's People

Contributors

abdulaziz-alahmad avatar antonlindstrom avatar asio avatar brother avatar emil-nasso avatar emilv avatar formmailer avatar hejhansson avatar joelek avatar kiranos avatar tethik avatar wecc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api's Issues

networkadapter/create optional value adaptertype not validated.

When creating adapters via the api the 'adaptertype' argument is not checked, and is accepted as it is.

It would be helpful to get a warning in such case.

This is valid at this moment.

$ curl -X POST -d '{'serverid':'vz123456', 'adaptertype':'korven'}' -k --basic -u [API-USER]:[API-KEY] https://api.glesys.com/networkadapter/create/

License?

Are we allowed to use this code? PHP/MiniControlpanel/ is without licensing info.

Please add support for changing the template value

Hi,

we migrated server from CentOS to AlmaLinux but the template stil says "CentOS 8". You customer service told me that there is no option to change this via API or dashboard, so I would like to ask for this feature.

In server detail, it is about this block:
"templatename": "CentOS 8", "initialtemplate": { "id": "<uuid>", "name": "CentOS 8", "currenttags": [ "centos", "centos-8" ] },
I tried to call this API:

curl -H "Accept: application/json" -X POST --basic -u $id:$token -d "serverid=$server_id&template=AlmaLinux 8" https://api.glesys.com/server/edit/

but it did not change anything.

Calling user/login with wrong credentials returns HTTP 500

A response of 500 Internal Server Error doesn't seem right for an authentication failure. According to RFC 7235, 401 Unauthorized should be used in this case. Quoting from the RFC:

[...] If the request included authentication credentials, then the 401
response indicates that authorization has been refused for those
credentials. [...]

Reproducing

Call the user/login function with something nonsense as username and password:

$ curl -v -X POST --data-urlencode "username=adsfgaw" --data-urlencode "password=hfgdhe" https://api.glesys.com/user/login
Note: Unnecessary use of -X or --request, POST is already inferred.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 79.99.4.198...
* TCP_NODELAY set
* Connected to api.glesys.com (79.99.4.198) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [220 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [108 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4999 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [589 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: OU=Domain Validated Only; CN=*.glesys.com
*  start date: Mar 26 13:47:47 2018 GMT
*  expire date: Mar 26 13:47:47 2020 GMT
*  subjectAltName: host "api.glesys.com" matched cert's "*.glesys.com"
*  issuer: C=CH; O=SwissSign AG; CN=SwissSign Server Silver CA 2014 - G22
*  SSL certificate verify ok.
> POST /user/login HTTP/1.1
> Host: api.glesys.com
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Length: 32
> Content-Type: application/x-www-form-urlencoded
> 
} [32 bytes data]
* upload completely sent off: 32 out of 32 bytes
< HTTP/1.1 500 Internal Server Error
< Date: Tue, 06 Nov 2018 20:59:03 GMT
< Server: Apache/2.4.25 (Debian)
< Status: 1601
< Content-Length: 304
< Content-Type: application/xml
< 
{ [304 bytes data]

100   336  100   304  100    32   1688    177 --:--:-- --:--:-- --:--:--  1698
* Connection #0 to host api.glesys.com left intact
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>
  <code>1601</code>
  <timestamp>2018-11-06T21:59:03+01:00</timestamp>
  <text>Login Failed</text>
  <transactionid/>
 </status>
 <debug>
  <input>
   <username>adsfgaw</username>
   <password>hfgdhe</password>
  </input>
 </debug>
</response>

And note the:

< HTTP/1.1 500 Internal Server Error

In the response headers printed by curl.

Unable to create @ records with PHP API

It seems that @ has some special meaning in CURL, so trying to add a MX record for @ will result in a PHP error:

Adding @ IN MX 10 (...).se.
PHP Deprecated:  curl_setopt_array(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead in API/PHP/api_classes/glesys_api.php on line 66

PHP 5.5.17 on current master at e825d825

Call made with glesys_domain->domain_addrecord() and 'host' => '@'

Edit: Fixed wrong key name

Documentation for server/destroy unclear

In the documentation it does not stipulate what type "keepip" parameter should be, and possibly in other places where there are booleans.
i.e. Would it be, "yes/no", "y/n", "1/0", 1/0, true/false?
Would "keepip": "NULL" keep or not keep the IP?

loadbalancer/create ip: 'none' fails

When creating a loadbalancer it is not possible to create it without any ip address even if the documentation says so.

curl -X POST -d '{'name':'my-lb', 'datacenter':'Falkenberg', 'ip':'none'}' -k --basic -u [API-USER]:[API-KEY] https://api.glesys.com/loadbalancer/create/

'status': {'code': 400,
   'text': 'ip or ipv6 required',
   'timestamp': '2017-08-29T10:33:59+02:00',
   'transactionid': None}

List resources for multiple servers

Do you have any plans to implement an array option to say server/status?

This would probably reduce the load a lot, especially for dashboards displaying multiple servers.

Thanks for an otherwise great api

Parameter for domain/renew

It would be nice with a months parameter for the domain/renew command. Some TLDs support this by allowing the renewal period to be 12-120 months, but this is not visible in the Glesys API.

expression expected in cpumonitor

I got the [: : integer expression expected on line 5 and 14 after adding quotes

and the [: -ge: unary operator expected on line 5 and [: -lt: unary operator expected on line 14 if quotes are not added.

Rename maxnumemailaccount

The service limit maxnumemailaccount in account/info should probably be renamed maxnumemailaccounts

New status code for server/edit? Not mentioned in documentation.

Hi,

Did the server/edit response status code change recently?
I'm getting an incrementing status code with the status text "Server update scheduled".

I didn't see this (recent?) behaviour mentioned in the API documentation.
Any update on this would be appreciated.

Thanks.

servers/create lists users as an optional parameter

The documentation lists the users parameter as optional, but the API responds that it is.

curl -X POST --basic -u X:Y --data-urlencode "datacenter=Falkenberg" --data-urlencode "platform=KVM" --data-urlencode "hostname=abc" --data-urlencode "templatename=ubuntu-18-04" --data-urlencode "disksize=5" --data-urlencode "memorysize=512" --data-urlencode "cpucores=1" https://api.glesys.com/server/create/

 <status>
  <code>400</code>
  <timestamp>2020-02-08T23:53:35+01:00</timestamp>
  <text>The users field is required.</text>
  <transactionid/>
 </status>

Presumably due to KVM being newly added/in beta based on the description here: glesys/glesys-go#21

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.