Articles
How to list and get articles
Request Overview
Actions | Returns | Description |
|---|---|---|
|
| Get all articles |
|
| Get an article |
Fields
Article Object
Field | Type | Required | Specifics |
|---|---|---|---|
|
| ||
|
| nullable | The article of the default language has parent_id null |
|
| Identifier of the category. | |
|
| Identifier of the site. | |
|
| Locale of the article. | |
|
| Show or hide the article. | |
|
| Persistent URL of the article | |
|
| Slug URL. May change if slug is changing. | |
|
| ||
|
| ||
|
| ||
|
| ||
|
|
Requests
Get All Articles
This collection does not include the article body! Get article by id to request the body.
GET /api/v1/docs/articles Returns, a collection of articles
GET /api/v1/docs/articles HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8200 Response
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"data": [
{
"id": 189,
"parent_id": null,
"docs_category_id": 38,
"docs_site_id": 9,
"locale": "en",
"visibility": 1,
"url": "http:\/\/blog.help\/en\/article\/189",
"url_with_slug": "http:\/\/blog.help\/en\/garden",
"title": "Joy in the Garden",
"subtitle": "Nice climbin route on Kalymnos",
"published_at": "2024-03-26T09:26:00+00:00",
"created_at": "2024-03-25T13:52:16+00:00",
"updated_at": "2023-05-26T15:40:09+00:00"
},
...
],
"links": {
...
},
"meta": {
...
}
}Information about links and meta, please read this article.
Query parameters
By default, the article API will return all articles. Use the query parameters to filter.
For example: /api/v1/docs/articles?modified-since=2024-08-08T13%3A17%3A34%2B00%3A00&site[3]¬-categories[]=12
Query Parameters | Possible Values | |
|---|---|---|
Modified Since | ?modified-since=2024-08-08T13%3A17%3A34%2B00%3A00 Returns all sites that had modifications since the given date. |
|
Sites | ?sites[]=9&site[]=12 Returns all articles of the given sites |
|
Categories | ?categories[]=12&categories[]=40 Returns all articles of the given categories |
|
Not Categories | ?not-categories[]=12¬-categories[]=40 Returns all articles, but not of the given categories. |
|
Get Article
GET /api/v1/docs/articles/{id} Returns the article object
GET /api/v1/docs/articles/{{id}} HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8200 Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Encoding: gzip
...
{
"data": {
"id": 159,
"parent_id": null,
"docs_category_id": 45,
"docs_site_id": 9,
"locale": "en",
"visibility": 1,
"url": "http:\/\/blog.help\/en\/article\/159",
"url_with_slug": "http:\/\/blog.help\/en\/1234",
"title": "Introduction",
"subtitle": "The HelpSpace Mission",
"body": "<p>HelpSpace is a help desk app that is easy to use with a simple workflow. We designed the onboarding process to be fast and efficient to get you up and running in no time.<\/p>",
"published_at": "2023-12-03T17:13:10+00:00",
"created_at": "2023-12-03T18:12:57+00:00",
"updated_at": "2023-09-06T15:56:55+00:00"
}
}