GithubHelp home page GithubHelp logo

plesk / api-examples Goto Github PK

View Code? Open in Web Editor NEW
82.0 50.0 51.0 242 KB

Plesk API-RPC usage examples

License: Other

C# 13.36% Visual Basic 26.14% Shell 1.18% C++ 6.32% Go 4.73% Java 7.59% JavaScript 4.31% Objective-C 6.46% PHP 18.29% Python 7.89% Ruby 3.10% Makefile 0.64%
example

api-examples's Introduction

Plesk API-RPC Usage Examples

Repository contains the examples on how to use Plesk API-RPC using different programming languages. Here you can find useful helpers to execute API-RPC requests.

Languages

  • Bash
  • C++
  • C#
  • Go
  • Java
  • Node.js
  • Objective-C
  • PHP
  • Python
  • Ruby
  • Visual Basic

How to Run

To run the example use the following command:

REMOTE_HOST=your-plesk-host.dom REMOTE_LOGIN=admin REMOTE_PASSWORD=password ./example.py

Plain Text Examples

Plain text examples of possible requests and responses: http://plesk.github.io/api-examples/

Documentation

api-examples's People

Contributors

avoronkov avatar sibprogrammer avatar xgin 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  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  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  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

api-examples's Issues

No 'Access-Control-Allow-Origin'

Hello Plesk-Team,

thank you for your great software.
I want to connect to plesk with my nodejs app.
But I get the following error.
I followed the plesk documentation to enable api access in the panel.ini but with no success.
Do you have a solution for this?

Failed to load https://domain:8443/enterprise/control/agent.php: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://domain' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

https://docs.plesk.com/de-DE/onyx/administrator-guide/plesk-administration/absichern-von-plesk/restricting-remote-access-via-plesk-api.71930/

Kind regards

Bash example does not Work

Hi,
tried your code example for bash, but following error occurs:
/API# ls -l
total 8
-rwxr-xr-x 1 root root 200 Jun 1 08:47 example.sh
-rwxr-xr-x 1 root root 369 Jun 1 08:43 plesk_api_client.sh

REMOTE_HOST=xxx REMOTE_LOGIN=admin REMOTE_PASSWORD=xx ./example.sh
./example.sh: 4: .: plesk_api_client.sh: not found

What Am I doing wrong?

Getting error "Authentication method not specified" when trying samples

When I attempt to make a request to the Plesk XML API, i get the following error:

<?xml version="1.0"?>
<packet version="1.6.9.1">
    <system>
        <status>error</status>
        <errcode>1029</errcode>
        <errtext>Authentication method is not specified</errtext>
    </system>
</packet>

My Request looks like this:

<packet>
<customer>
   <get>
      <filter />
      <dataset>
          <gen_info/>
          <stat/>
      </dataset>
   </get>
</customer>
</packet>

And I am setting the following headers:

  1. HTTP_AUTH_LOGIN
  2. HTTP_AUTH_PASSWORD
  3. Content-Type

Am I missing something?

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.