Overview
This article provides details about the REST - NewsItem API call that Kayako Classic uses, including its field types, arguments, and responses.
- GET /News/NewsItem/ListAll/$categoryid$
- GET /News/NewsItem
- GET /News/NewsItem/$id$
- POST /News/NewsItem
- PUT /News/NewsItem/$id$
- DELETE /News/NewsItem/$id$
Information
GET /News/NewsItem/ListAll/$categoryid$
Retrieve the news item identified by $categoryid$.
Arguments
Red = required
Name |
Description |
$categoryid$ | The news category ID |
Response
<newsitems>
<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>
GET /News/NewsItem
Retrieve the list of news items.
Response
<newsitems>
<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>
GET /News/NewsItem/$id$
Retrieve the news item identified by $id$.
Arguments
Red = required
Name |
Description |
$id$ | The unique numeric identifier of the news item. |
Response
<newsitems>
<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>
POST /News/NewsItem
A new news item.
Argument (POST variables)
Red = required
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 m/d/Y format |
newscategoryidlist | The category ID list. Multiple values comma separated like 1,2,3 |
Response
<newsitems>
<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>
PUT /News/NewsItem/$id$
Update news item identified by $id$.
Arguments
Red = required
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 m/d/Y format |
newscategoryidlist | The category ID list. Multiple values comma separated like 1,2,3 |
Response
<newsitems>
<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 /News/NewsItem/$id$
Delete a news item identified by $id$
Arguments
Red = required
Name |
Description |
$id$ | The unique numeric identifier of the news item |