Users

List Users

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/users

Example

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe http://www.ihelpdesk.com/desktop/api/acme/users

Response

<users total="1">
  <user>
    <id>1321279825848036</id>
    <name>test</name>
    <role>1</role>
    <display-name>test</display-name>
    <validated>true</validated>
    <suspended>false</suspended>
    <last-login class="sql-timestamp">2011-12-02 14:42:27.0</last-login>
    <password-expiry-time>-1</password-expiry-time>
    <password-expired>false</password-expired>
    <register-date class="sql-timestamp">2011-11-14 06:10:25.0</register-date>
  </user>
</users>

In this example, user test’s ID is 1321279825848036.

Get Single User

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/users/{USER-ID}

Example

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe http://www.ihelpdesk.com/desktop/api/acme/users/1321279825848036

Create User

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/users

HTTP Method: POST

Content Type: application/xml

Request Body

<user>
    <name>{USER_NAME}</name>
    <password>{PASSWORD}</password>
</user>

Example

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe -H “Content-Type: application/xml” -d “<user><name>user3</user><password>passwd1</password></user>” -X POST http://www.ihelpdesk.com/desktop/api/acme/users

Update User

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/users/{USER_ID}

HTTP Method: PUT

Content Type: application/xml

Request Body

<user>
   <!---optional --->
   <role>{ROLE_ID}</role>
   <display-name>{DISPLAY_NAME}</display_name>
   <phone>{PHONE_NUMBER></phone>
   <address>{ADDRESS}</address>
   <postcode>{POST_CODE}</postcode>
   <local-postcode>{LOCAL_POST_CODE}</local-postcode>
   <validated>{true|false}</validated>
   <suspended>{true|false}</suspended>
   <!--end of optional-->
</user>

role :

Name ID
admin 1
agent 2
end user 3

Example

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -H “Content-Type: application/xml” -u joe@acme.com:joe -X PUT -d “<user><name>test2</name><phone>617-573-9912</phone><role>1</role></user>” http://ihelpdesk.com/desktop/api/acme/users/1322875450186003

Delete User

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/users/{USER_ID}

HTTP Method: DELETE

Example

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe -X DELETE http://www.ihelpdesk.com/desktop/api/acme/users/1322623923854043