Bulk publish articles
  • 02 Feb 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Bulk publish articles

  • Dark
    Light

POST /articles/bulkpublish/{langcode} 

Publishes the list of articles in the respective language


Header

ParameterTypeDescription
api_tokenstringYou can get the REST API from Settings > Advanced > API tokens.


Route Parameters

ParameterRequiredTypeDescription
langCodeYesstringLanguage code for the multilingual website (Default value is en)


Body Parameters

ParameterRequiredTypeDescription
article_idYes
stringThe ID of the article
version_numberYes
numberThe version number to be published. Minimum Value 1
user_idYes
stringThe ID of the user that will be marked as an author of this publish


Sample Request

[
    {
        "article_id" : "123aec55-c0a7-42bf-862c-1eea02b96trt"
        "version_number": 1,
        "user_id": "5ae331f74e60146b233558c6"
    },
    {
        "article_id" : "98ehds55-c0a7-42bf-862c-1eea02b96trt"
        "version_number": 1,
        "user_id": "5ae331f74e60146b233558c6"
    }
]


Sample Response

The response will show if all articles have been published successfully. The details property will include any errors and article title, after issues have been fixed, articles can be resubmitted for further processing.

{
   "data":[
      {
         "success":false,
         "details":"Failed to publish article with an id 123aec55-c0a7-42bf-862c-1eea02b96trt"
      },
      {
         "success":true,
         "details":"Successfully published article with an id 98ehds55-c0a7-42bf-862c-1eea02b96trt"
      }
   ],
   "extension_data":null,
   "context":null,
   "success":true,
   "errors":[ ],
   "warnings":[ ],
   "information":[ ]
}

Response Data (Array[])

ParameterTypeDescription
successbooleanIndicates if article creation was successful
detailsstringAdditional information about article creation status



Was this article helpful?