This article describes how to create Manuals, Chapter and Articles via the API.
All updates you make via the API will appear in Activity logs as if they were done by the user whose credentials are used when making the API calls.
URL
POST /api/v2/sites/:site_id/manuals
Body
manual: {
title: "My title",
published: false,
chapters: [
{ position: 1, title: "Chapter 1", published: false },
{ position: 2, title: "Chapter 2", published: false },
]
}
Explanation
Key |
Value |
---|---|
title |
Manual title. Up to 255 characters. |
published |
Boolean |
chapters |
Optional array of a chapter JSON hashes. Each hash must contain:
pubished key is optional. |
URL
PUT /api/v2/sites/:site_id/manuals/:id
Body
Body is the same as is used when creating a manual except that the chapters
array is ignored.
URL
DELETE /api/v2/sites/:site_id/manuals/:id
URL
POST /api/v2/sites/:site_id/chapters
Body
chapter: {
position: 1,
title: "My title",
published: false,
manual_id: 4415
}
Explanation
Key |
Value |
---|---|
position |
Position of the chapter in the manual |
title |
Chapter title. Up to 255 characters. |
published |
Boolean |
manual_id |
ID of the manual the chapter is assigned to. |
URL
PUT /api/v2/sites/:site_id/chapters/:id
Body
Body is the same as is used when creating a chapter with one addition. You can also include an articles array of article ids and positions to update the contents of a chapter. See the example below.
chapter: {
position: 1,
title: "My title",
published: false,
manual_id: 4415
}
URL
PUT /api/v2/sites/:site_id/chapters/:id/update_article_positions
Body
Body is the same as is used when creating a chapter with one addition. You can also include an articles array of article ids and positions to update the contents of a chapter. See the example below.
articles: [
{ id: 1421, position: 1 },
{ id: 8817, position: 2 }
]
URL
DELETE /api/v2/sites/:site_id/chapters/:id
URL
POST /api/v2/sites/:site_id/articles
Body
article: {
position: 1,
title: "My title",
published: false,
chapter_id: 315
}
Explanation
Key |
Value |
---|---|
position |
Position of the article in the chapter. |
title |
Article title. Up to 255 characters. |
published |
Boolean |
manual_id |
ID of the chapter the article is assigned to. |
meta_search |
Additional search terms for the article. Up to 255 characters. |
meta_description |
The description that is shown to search engines. Up to 255 characters. |
meta_title |
Page title shown to search engines. Up to 255 characters. |
exclude_from_search |
Boolean. Determines whether an article will be excluded from the ScreenSteps public search. |
tags |
An array of tag names. |
URL
PUT /api/v2/sites/:site_id/articles/:id
Body
Body is the same as is used when creating an article except that instead of published
, use publish
in order to publish the article.
There is a separate API endpoint for updating article contents. See: Updating article content through the API
This will move the article to the trash.
URL
DELETE /api/v2/sites/:site_id/articles/:id
0 Comments
Add your comment