Skip to content

Self Service Endpoints

Kieran edited this page Oct 22, 2020 · 14 revisions

Below are the currently supported self-service endpoints.

Articles

GET /selfservice/article

$articles = $api->getArticles();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#self-service-article-get

$articles = $api->getArticles(['type_id' => 1]);

GET /selfservice/article/{id}

$article = $api->getArticle(1);

Additional query parameters are available. For a full list of supported filtering options, see https://api.supportpal.com/api.html#self-service-article-get-1

$article = $api->getArticle(1, ['type_id' => 1, 'increment_views' => 1]);

GET /selfservice/article/search

$articles = $api->getArticlesByTerm('foo');

Additional filtering options are available. For a full list of supported filtering options, see https://api.supportpal.com/api.html#self-service-article-get-2

$articles = $api->getArticlesByTerm('foo', ['type_id' => 1]);

Categories

GET /selfservice/category

$categories = $api->getCategories();

Additional filtering options are available. For a full list of available filtering options, see https://api.supportpal.com/api.html#self-service-category-get

$categories = $api->getCategories(['type_id' => 1]);

GET /selfservice/category/{id}

$category = $api->getCategory();

Comments

GET /selfservice/comment

$comments = $api->getComments();

Additional filtering options are available. For a full list of available filtering options, see https://api.supportpal.com/api.html#self-service-comment-get

$comments = $api->getComments(['type_id' => 1]);

POST /selfservice/comment

$comment = new \SupportPal\ApiClient\Model\Comment;
$comment->fill([
    'text'         => 'foo',
    'article_id'   => 3,
    'type_id'      => 1,
    'parent_id'    => 1,
    'status'       => 3,
    'notify_reply' => 0
]);
$api->postComment(Comment $comment);

Settings

GET /selfservice/settings

$settings = $api->getSelfServiceSettings();