ScreenSteps Help

Updating V4 (Legacy) article content through the API

Updated on

Review API Update Limitations

  • You can only update text content via API.
  • To replace images, use the ScreenSteps web or desktop app.
  • API updates appear in Activity logs as the user whose credentials are used.
  • The contents endpoint writes the V4 (Legacy) content-block format. It is not a way to edit V5 (New) articles.

Retrieve Article Content

  1. Get the article JSON via the API.
    How to retrieve article contents
  2. Find the content_blocks key.
    • Each block has: uuid, type, depth.
    • depth 0 = top-level block.
    • type shows block type (see table below).
Content Block TypeValues
StepContenttitle: string
content_block_ids: array
foldable: boolean
auto_numbered: boolean
depth: integer
TextContentbody: string (html text)
style: string (introduction, info, alert, tip, or warning)
HtmlEmbedContentbody: string (html text)
ImageContentBlockimage_asset_id: integer
alt_tag: string
AttachmentContentfile_asset_id: integer
CodeContentbody: string
TableContentbody: string
  • StepContent blocks are headings and can have child content_block_ids.

Modify Article JSON

  • Edit the content_blocks array to update text.
  • To add blocks, include all required values from the table above.

Upload Changes via API

  1. POST the modified JSON to:
    /api/v2/sites/:site_id/articles/:article_id/contents
  2. Include JSON data like:
    {
      article: {
        title: "Article title",
        content_blocks: [
          { uuid: "ase4399s" type: "StepContent", title: "First step", depth: 0 }
        ],
        publish: true
      }
    }
  3. Set publish to true to make updates live.

    If omitted, a draft is saved.

Updating V5 (New) articles

Before you update an article, GET it and check schema_version. If it is 5, or if content_blocks comes back empty, the steps above do not apply. Read and replace that article's HTML with GET and PUT /api/v2/sites/:site_id/articles/:article_id/v5_contents.

See: Updating V5 (New) article content through the API

Previous Article Updating V5 (New) article content through the API
Next Article Resolving Internal Links in API