REST-NewsItem
This article provides details about the REST - NewsItem API call that GFI HelpDesk uses, including its field types, arguments, and responses.
Retrieve the news item identified by $categoryid$
.
Arguments
Name | Description |
---|---|
$categoryid$ | The news category ID |
Response
<newsitem>
<id><![CDATA[41]]]]><![CDATA[></id>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<newstype><![CDATA[1]]]]><![CDATA[></newstype>
<newsstatus><![CDATA[2]]]]><![CDATA[></newsstatus>
<author><![CDATA[Author full name]]]]><![CDATA[></author>
<email><![CDATA[author@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[News subject]]]]><![CDATA[></subject>
<emailsubject /><dateline><![CDATA[1338237929]]]]><![CDATA[></dateline>
<expiry><![CDATA[0]]]]><![CDATA[></expiry>
<issynced><![CDATA[0]]]]><![CDATA[></issynced>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<uservisibilitycustom><![CDATA[1]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist><usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[2]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[3]]]]><![CDATA[></usergroupid>
</usergroupidlist>
<staffvisibilitycustom><![CDATA[1]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist><staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
<staffgroupid><![CDATA[2]]]]><![CDATA[></staffgroupid>
</staffgroupidlist>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<contents><![CDATA[Test]]]]><![CDATA[></contents>
<categories><categoryid><![CDATA[1]]]]><![CDATA[></categoryid>
<categoryid><![CDATA[2]]]]><![CDATA[></categoryid></categories>
</newsitem>
</newsitems>
Retrieve the list of news items.
Response
<newsitem>
<id><![CDATA[41]]]]><![CDATA[></id>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<newstype><![CDATA[1]]]]><![CDATA[></newstype>
<newsstatus><![CDATA[2]]]]><![CDATA[></newsstatus>
<author><![CDATA[Author full name]]]]><![CDATA[></author>
<email><![CDATA[author@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[News subject]]]]><![CDATA[></subject>
<mailsubject /><dateline><![CDATA[1338237929]]]]><![CDATA[></dateline>
<expiry><![CDATA[0]]]]><![CDATA[></expiry>
<issynced><![CDATA[0]]]]><![CDATA[></issynced>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<uservisibilitycustom><![CDATA[1]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist><usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[2]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[3]]]]><![CDATA[></usergroupid></usergroupidlist>
<staffvisibilitycustom><![CDATA[1]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist><staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
<staffgroupid><![CDATA[2]]]]><![CDATA[></staffgroupid></staffgroupidlist>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<contents><![CDATA[Test]]]]><![CDATA[></contents>
<categories><categoryid><![CDATA[1]]]]><![CDATA[></categoryid>
<categoryid><![CDATA[2]]]]><![CDATA[></categoryid></categories></newsitem>
<newsitem><id><![CDATA[42]]]]><![CDATA[></id>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<newstype><![CDATA[1]]]]><![CDATA[></newstype>
<newsstatus><![CDATA[2]]]]><![CDATA[></newsstatus>
<author><![CDATA[Mr. Author]]]]><![CDATA[></author>
<email><![CDATA[mr.author@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[New subject]]]]><![CDATA[></subject>
<emailsubject /><dateline><![CDATA[1338237929]]]]><![CDATA[></dateline>
<expiry><![CDATA[0]]]]><![CDATA[></expiry>
<issynced><![CDATA[0]]]]><![CDATA[></issynced>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<uservisibilitycustom><![CDATA[1]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist><usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[2]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[3]]]]><![CDATA[></usergroupid></usergroupidlist>
<staffvisibilitycustom><![CDATA[1]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist><staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
<staffgroupid><![CDATA[2]]]]><![CDATA[></staffgroupid></staffgroupidlist>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<contents><![CDATA[Contents]]]]><![CDATA[></contents>
<categories><categoryid><![CDATA[1]]]]><![CDATA[></categoryid>
<categoryid><![CDATA[2]]]]><![CDATA[></categoryid>
</categories></newsitem></newsitems>
Retrieve the news item identified by $id$.
Arguments
Name | Description |
---|---|
$id$ | The unique numeric identifier of the news item |
Response
<newsitem>
<id><![CDATA[41]]]]><![CDATA[></id>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<newstype><![CDATA[1]]]]><![CDATA[></newstype>
<newsstatus><![CDATA[2]]]]><![CDATA[></newsstatus>
<author><![CDATA[Author full name]]]]><![CDATA[></author>
<email><![CDATA[author@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[News subject]]]]><![CDATA[></subject>
<emailsubject /><dateline><![CDATA[1338237929]]]]><![CDATA[></dateline>
<expiry><![CDATA[0]]]]><![CDATA[></expiry>
<issynced><![CDATA[0]]]]><![CDATA[></issynced>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<uservisibilitycustom><![CDATA[1]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist><usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[2]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[3]]]]><![CDATA[></usergroupid></usergroupidlist>
<staffvisibilitycustom><![CDATA[1]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist><staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
<staffgroupid><![CDATA[2]]]]><![CDATA[></staffgroupid></staffgroupidlist>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<contents><![CDATA[Test]]]]><![CDATA[></contents>
<categories><categoryid><![CDATA[1]]]]><![CDATA[></categoryid>
<categoryid><![CDATA[2]]]]><![CDATA[>
</categoryid>
</categories>
</newsitem>
A new news item.
Argument (POST variables)
Name | Description |
---|---|
subject | The news item subject |
contents | The news item contents |
staffid | The Staff ID |
newstype | The news type. Global: 1, public: 2, private: 3 |
newsstatus | The news status. Draft: 1, published: 2 |
fromname | The custom from name used in email notification |
The custom from email used in email notification | |
customemailsubject | The custom subject used in email notification |
sendemail | Whether to send email notification. 0 or 1 |
allowcomments | Allow comments. 0 or 1 |
uservisibilitycustom | The user visibility custom. 0 or 1 |
usergroupidlist | The user group ID list. Multiple values comma separated like 1,2,3 |
staffvisibilitycustom | The staff visibility custom. 0 or 1 |
staffgroupidlist | The staff group id list. Multiple values comma separated like 1,2,3 |
expiry | The expiry date in the m/d/Y format |
newscategoryidlist | The category ID list. Multiple values comma separated like 1,2,3 |
Response
<newsitem>
<id><![CDATA[41]]]]><![CDATA[></id>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<newstype><![CDATA[1]]]]><![CDATA[></newstype>
<newsstatus><![CDATA[2]]]]><![CDATA[></newsstatus>
<author><![CDATA[Author full name]]]]><![CDATA[></author>
<email><![CDATA[author@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[News subject]]]]><![CDATA[></subject>
<emailsubject /><dateline><![CDATA[1338237929]]]]><![CDATA[></dateline>
<expiry><![CDATA[0]]]]><![CDATA[></expiry>
<issynced><![CDATA[0]]]]><![CDATA[></issynced>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<uservisibilitycustom><![CDATA[1]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist><usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[2]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[3]]]]><![CDATA[></usergroupid>
</usergroupidlist>
<staffvisibilitycustom><![CDATA[1]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist><staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
<staffgroupid><![CDATA[2]]]]><![CDATA[></staffgroupid></staffgroupidlist>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<contents><![CDATA[Test]]]]><![CDATA[></contents>
<categories><categoryid><![CDATA[1]]]]><![CDATA[></categoryid>
<categoryid><![CDATA[2]]]]><![CDATA[></categoryid></categories>
</newsitem>
</newsitems>
Update news item identified by $id$.
Arguments
Name | Description |
---|---|
subject | The news item subject |
contents | The news item contents |
editedstaffid | The Staff ID |
newsstatus | The news status. Draft: 1, published: 2 |
fromname | The custom from name used in email notification |
The custom from email used in email notification | |
customemailsubject | The custom subject used in email notification |
sendemail | Whether to send email notification. 0 or 1 |
allowcomments | Allow comments. 0 or 1 |
uservisibilitycustom | The user visibility custom. 0 or 1 |
usergroupidlist | The user group ID list. Multiple values comma separated like 1,2,3 |
staffvisibilitycustom | The staff visibility custom. 0 or 1 |
staffgroupidlist | The staff group id list. Multiple values comma separated like 1,2,3 |
expiry | The expiry date in the m/d/Y format |
newscategoryidlist | The category ID list. Multiple values comma separated like 1,2,3 |
Response
<newsitem>
<id><![CDATA[41]]]]><![CDATA[></id>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<newstype><![CDATA[1]]]]><![CDATA[></newstype>
<newsstatus><![CDATA[2]]]]><![CDATA[></newsstatus>
<author><![CDATA[Author full name]]]]><![CDATA[></author>
<email><![CDATA[author@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[News subject]]]]><![CDATA[></subject><emailsubject />
<dateline><![CDATA[1338237929]]]]><![CDATA[></dateline>
<expiry><![CDATA[0]]]]><![CDATA[></expiry>
<issynced><![CDATA[0]]]]><![CDATA[></issynced>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<uservisibilitycustom><![CDATA[1]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist><usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[2]]]]><![CDATA[></usergroupid>
<usergroupid><![CDATA[3]]]]><![CDATA[></usergroupid>
</usergroupidlist>
<staffvisibilitycustom><![CDATA[1]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist><staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
<staffgroupid><![CDATA[2]]]]><![CDATA[></staffgroupid>
</staffgroupidlist>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<contents><![CDATA[Test]]]]><![CDATA[></contents>
<categories><categoryid><![CDATA[1]]]]><![CDATA[></categoryid>
<categoryid><![CDATA[2]]]]><![CDATA[></categoryid>
</categories>
</newsitem>
</newsitems>
Delete a news item identified by $id$
Arguments
Name | Description |
---|---|
$id$ | The unique numeric identifier of the news item |