Articles & Revisions Management
Management APIs can create new articles and revisions, or modify existing contents.
Create a new Article and a Revision
Property | Description |
---|---|
Method | POST |
Path | /open/v1/spaces/$me/articles |
Accept | application/json |
Content-Type | application/json |
Description | Creates a new article and revision with given content. The created revision is in draft state. The body can be specified either in blocks-formatted object ( body field) or in HTML (bodyHtml field), which will be then parsed into the blocks format. If given both, body will take precedence. |
- Request
- Query
(empty) - Body
type Request = { language: LanguageCode name: string authorId?: string title?: string subtitle?: string body?: Blocks bodyHtml?: string }
- Query
- Response
type ArticleRevisionView = { article: Article revision: Revision author: Author }
Create a new Revision
Property | Description |
---|---|
Method | POST |
Path | /open/v1/spaces/$me/articles/{articleId}/revisions |
Accept | application/json |
Content-Type | application/json |
Description | Creates a new draft revision to an article. The body can be specified either in blocks-formatted object ( body field) or in HTML (bodyHtml field), which will be then parsed into the blocks format. If given both, body will take precedence. |
- Request
- Query
(empty) - Body
type Request = { language: LanguageCode name: string authorId?: string title?: string subtitle?: string body?: Blocks bodyHtml?: string }
- Query
- Response
type ArticleRevisionView = { article: Article revision: Revision author: Author }
Save a Revision
Property | Description |
---|---|
Method | PATCH |
Path | /open/v1/spaces/$me/articles/{articleId}/revisions/{revisionId} |
Accept | application/json |
Content-Type | application/json |
Description | Updates title or other contents of a revision. Only revisions in draft state can be updated (once published, it will become immutable). The body can be specified either in blocks-formatted object ( body field) or in HTML (bodyHtml field), which will be then parsed into the blocks format. If given both, body will take precedence. |
- Request
- Query
(empty) - Body
type Request = { name?: string authorId?: string title?: string | null subtitle?: string | null body?: Blocks | null bodyHtml?: string | null }
- Query
- Response
type ArticleRevisionView = { article: Article revision: Revision author: Author }
Publish a Revision
Property | Description |
---|---|
Method | PUT |
Path | /open/v1/spaces/$me/articles/{articleId}/revisions/{revisionId}/publish |
Accept | application/json |
Content-Type | application/json |
Description | Publishes a revision. The published revision becomes the new current version of this article in the language, which will be exposed to the published website. The previously published revision (if any) will become unpublished. Once the revision is published, it is no longer editable. |
- Request
- Query
(empty) - Body
// (empty)
- Query
- Response
type ArticleRevisionView = { article: Article revision: Revision author: Author }
Unpublish a Revision
Property | Description |
---|---|
Method | PUT |
Path | /open/v1/spaces/$me/articles/{articleId}/revisions/{revisionId}/unpublish |
Accept | application/json |
Content-Type | application/json |
Description | Unpublishes a revision. The revision and article will no longer be exposed int eh published website. |
- Request
- Query
(empty) - Body
// (empty)
- Query
- Response
type ArticleRevisionView = { article: Article revision: Revision author: Author }
Delete a Revision
Property | Description |
---|---|
Method | DELETE |
Path | /open/v1/spaces/$me/articles/{articleId}/revisions/{revisionId} |
Accept | application/json |
Content-Type | application/json |
Description | Deletes a revision. (You cannot delete a published revision: you should unpublish it first.) |
- Request
- Query
(empty) - Body
// (empty)
- Query
- Response
// (empty)
Delete an Article
Property | Description |
---|---|
Method | DELETE |
Path | /open/v1/spaces/$me/articles/{articleId} |
Accept | application/json |
Content-Type | application/json |
Description | Deletes an article and all revisions within the article. You cannot delete an article which has a published revision in any language. |
- Request
- Query
(empty) - Body
// (empty)
- Query
- Response
// (empty)
Updated about 1 month ago