Documentation

Articles

How to list and get articles

Request Overview

Actions

Returns

Description

GET /api/v1/docs/articles

Collection

Get all articles

GET /api/v1/docs/articles/{id}

200 Object

Get an article

Fields

Article Object

Field

Type

Required

Specifics

id

Integer

parent_id

Integer

nullable

The article of the default language has parent_id null

docs_category_id

Integer

Identifier of the category.

docs_site_id

Integer

Identifier of the site.

locale

String

Locale of the article.

visibility

Integer 0|1

Show or hide the article.

url

String

Persistent URL of the article

url_with_slug

String

Slug URL. May change if slug is changing.

title

String

subtitle

String

created_at

Date String

updated_at

Date String

published_at

Date String

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-8

200 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]&not-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.

urlencoded string

Sites

?sites[]=9&site[]=12

Returns all articles of the given sites

urlencoded string

Categories

?categories[]=12&categories[]=40

Returns all articles of the given categories

urlencoded string

Not Categories

?not-categories[]=12&not-categories[]=40

Returns all articles, but not of the given categories.

urlencoded string

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-8

200 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"
  }
}