Results 1 to 2 of 2

Thread: Managing ftp accounts - API

  1. #1

    Default Managing ftp accounts - API

    Hello,

    I'm not sure what i am missing.
    I have an example.com test site, with a single ftp account (the main account).

    Sending the next packet:
    <packet version='1.6.3.4'>
    <ftp-user>
    <get>
    <filter>
    <webspace-name>example.com</webspace-name>
    </filter>
    </get>
    </ftp-user>
    </packet>

    i get the next response which doesn't anything about the ftp account.
    <packet version="1.6.3.4">
    <ftp-user>
    <get>
    <result>
    <status>ok</status>
    <filter-id>1</filter-id>
    </result>
    </get>
    </ftp-user>
    </packet>

    If i add another 2 ftp accounts (via webinterface) , ftpuser2 and ftpuser3, to the same packet i get the next response:

    <packet version="1.6.3.4">
    <ftp-user>
    <get>
    <result>
    <status>ok</status>
    <filter-id>example.com</filter-id>
    <id>3</id>
    <name>ftpuser2</name>
    <home>/</home>
    <webspace-id>1</webspace-id>
    </result>
    <result>
    <status>ok</status>
    <filter-id>example.com</filter-id>
    <id>4</id>
    <name>ftpuser3</name>
    <home>/</home>
    <webspace-id>1</webspace-id>
    </result>
    </get>
    </ftp-user>
    </packet>

    so information about 2nd and 3rd account, but nothing about first.
    In the same way if i try to change the password for the main account i get 'no such user'. If i try to add an ftp account (via API) with the same name i get 'user exists'.

    So, i'm really puzzled, what am i doing wrong?



  2. #2

    Default

    Here is the proper call to change main FTP user login and password:
    Code:
    <packet version="1.6.3.4">
      <webspace>
        <set>
          <filter><id>135</id></filter>
          <values>
            <hosting>
              <vrt_hst>
                <property>
                  <name>ftp_login</name>
                  <value>user123</value>
                </property>
                <property>
                  <name>ftp_password</name>
                  <value>123qwe</value>
                </property>
              </vrt_hst>
            </hosting>
          </values>
        </set>
      </webspace>
    </packet>
    .-[ Web, Unix, Programming ]-.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •