REST-Department
This topic provides details about the REST - Department API call that GFI HelpDesk uses, including its field types, arguments, and responses.
Retrieve a list of all departments and sub-departments in the help desk.
Response
<department>
<id>1</id>
<title>Support</title>
<type>private</type>
<app>tickets</app>
<displayorder>1</displayorder>
<parentdepartmentid>0</parentdepartmentid>
<uservisibilitycustom>1</uservisibilitycustom>
<usergroups><id>1</id><id>2</id><id>3</id></usergroups>
</department>
<department>
<id>2</id>
<title>Sales</title>
<type>public</type>
<app>livechat</app>
<displayorder>2</displayorder>
<parentdepartmentid>0</parentdepartmentid>
<uservisibilitycustom>0</uservisibilitycustom>
</department>
<department>
<id>3</id>
<title>GFI HelpDesk Fusion</title>
<type>public</type>
<app>livechat</app>
<displayorder>3</displayorder>
<parentdepartmentid>2</parentdepartmentid>
<uservisibilitycustom>0</uservisibilitycustom>
</department>
</departments>
Retrieve the department identified by its internal $id$.
Arguments
Name | Description |
---|---|
$id$ | The unique numeric identifier of the department to retrieve |
Response
<department>
<id>1</id>
<title>Support</title>
<type>private</type>
<app>tickets</app>
<displayorder>1</displayorder>
<parentdepartmentid>0</parentdepartmentid>
<uservisibilitycustom>1</uservisibilitycustom>
<usergroups><id>1</id><id>2</id><id>3</id></usergroups>
</department>
</departments>
Update the department identified by $id$.
Arguments
Name | Description |
---|---|
$id$ | The unique numeric identifier of the department to update |
title | The title of the department |
type | The accessibility level of the department ('public' or 'private') |
displayorder | A positive integer that the help desk uses to sort departments when displaying them (ascending) |
parentdepartmentid | A positive integer of the parent department for this department |
uservisibilitycustom | 1 or 0 Boolean that controls whether or not to restrict the visibility of the department to particular user groups (seeusergroupid[]) |
usergroupid[] | An array of positive integers identifying the user groups to be assigned to this department |
Posting an array using the query string for instance:
Response
<department>
<id>3</id>
<title>GFI HelpDesk Fusion</title>
<type>public</type>
<app>livechat</app>
<displayorder>3</displayorder>
<parentdepartmentid>2</parentdepartmentid>
<uservisibilitycustom>0</uservisibilitycustom>
</department>
</departments>
Create a department.
Arguments
Name | Description |
---|---|
title | The title of the department |
app | The app of the department should be associated with ('tickets' or 'livechat') |
type | The accessibility level of the department ('public' or 'private') |
displayorder | A positive integer that the help desk uses to sort departments when displaying them (ascending) |
parentdepartmentid | A positive integer of the parent department for this department |
uservisibilitycustom | 1 or 0 boolean that controls whether or not to restrict the visibility of this department to particular user groups (see usergroupid[]) |
usergroupid[] | An array of positive integers identifying the user groups to be assigned to this department |
Posting an array using the query string like this:
Response
<department>
<id>1</id>
<title>Support</title>
<type>private</type>
<app>tickets</app>
<displayorder>1</displayorder>
<parentdepartmentid>0</parentdepartmentid>
<uservisibilitycustom>1</uservisibilitycustom>
<usergroups><id>1</id><id>2</id><id>3</id></usergroups>
</department>
</departments>
Delete the Department identified by $id$.
Arguments
Name | Description |
---|---|
$id$ | The unique numeric identifier of the department to delete |