Skip to main content
GET/articles/:id/

Get article

You can return details about a specific attribute.

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/articles/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

{
"author": {
"avatar": "https://<your_app_subdomain>.user.com/static/img/agent.svg",
"id": 1,
"name": "developer developer"
},
"categories": [],
"content": "test",
"created_at": "2020-12-04T13:41:46.540889Z",
"id": 1,
"intro_text": "test",
"language": "en",
"rating": "4.00",
"slug": "test",
"tags": [],
"title": "Test",
"translations": [
{
"id": 1,
"is_default": true,
"label": "English",
"language": "en",
"status": 0
}
],
"updated_at": "2020-12-04T13:41:46.620162Z",
"url": "/knowledge-base/test/",
"views": 1
}

Response fields​

Fields returned in the 200 OK response body.

idinteger
ID of the article.
titlestring
A title of a web push message.
slugstring
URL slug of the article's default translation.
contentstring
A content of a message sent to the user.
authorobject
A unique identifier of an agent who created a global variable. A visible author.
author.idinteger
ID of the agent who wrote the article.
author.namestring
Full name of the agent who wrote the article.
author.avatarstring (URL)
URL of the author's avatar; the app's default avatar if the agent has none.
urlstring
A URL of a web push message.
intro_textstring
Intro text of the article in the requested language.
categoriesarray
A list of categories' ids.
viewsinteger
Number of times the article was viewed.
created_atstring (date-time)
When the article was created, ISO 8601.
updated_atstring (date-time)
When the article was last updated, ISO 8601.
ratingstringnullable
Average reader rating from 1 to 5, as a string with two decimal places; null if nobody has rated the article.
translationsarray of objects
Language versions of the article.
translations[].idinteger
ID of the translation.
translations[].languagestring
ISO 639-1 code of the language.
translations[].is_defaultboolean
Whether this is the article's default translation.
translations[].statusinteger
Publication status of the translation: 0 draft, 1 ready to publish, 2 published or 3 archived.
translations[].labelstring
Name of the translation's language, in English.
languagestring
ISO 639-1 code of the language.
tagsarray of string
Names of the article's tags.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.