Adds multiple articles
  • 26 Sep 2023
  • 6 Minutes to read
  • Contributors
  • Dark
    Light

Adds multiple articles

  • Dark
    Light

Article Summary

Post
/v2/Articles/bulkcreate
Security
API Key
Header parameter nameapi_token
Enter REST API key. To generate a key, go to Settings → Knowledge base portal → API tokens
Body parameters
Create Bulk Article Request Example

Create Bulk artilce by adding a list of data in title, category_id, project_version_id, and user_id. use content property to add some data in to your article.

[
  {
    "title": "New Article 1",
    "content": "This is my first article Content.",
    "category_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 0,
    "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "content_type": null
  },
  {
    "title": "New Article 2",
    "content": "This is my second article Content.",
    "category_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 0,
    "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "content_type": null
  }
]
Array of object
object
title
string Required

The title of the article

Min length1
content
string

The content of the article, for any Editor type, use this property

category_id
string Required

The ID of the category where the article will be created

Min length1
project_version_id
string Required

The project version ID in which the article will be created

Min length1
order
integer (int32)

The position of the article in the category tree (By default, it will be placed at the bottom of the category)

user_id
string Required

The ID of the team account that will be marked as a contributor of the article

Min length1
content_type
integer (int32)

0 - Markdown content; 1 - HTML content; 2 - Block Content

Valid values[0,1,2]
Create Bulk Article Request Example

Create Bulk artilce by adding a list of data in title, category_id, project_version_id, and user_id. use content property to add some data in to your article.

[
  {
    "title": "New Article 1",
    "content": "This is my first article Content.",
    "category_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 0,
    "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "content_type": null
  },
  {
    "title": "New Article 2",
    "content": "This is my second article Content.",
    "category_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 0,
    "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "content_type": null
  }
]
Array of object
object
title
string Required

The title of the article

Min length1
content
string

The content of the article, for any Editor type, use this property

category_id
string Required

The ID of the category where the article will be created

Min length1
project_version_id
string Required

The project version ID in which the article will be created

Min length1
order
integer (int32)

The position of the article in the category tree (By default, it will be placed at the bottom of the category)

user_id
string Required

The ID of the team account that will be marked as a contributor of the article

Min length1
content_type
integer (int32)

0 - Markdown content; 1 - HTML content; 2 - Block Content

Valid values[0,1,2]
Create Bulk Article Request Example

Create Bulk artilce by adding a list of data in title, category_id, project_version_id, and user_id. use content property to add some data in to your article.

[
  {
    "title": "New Article 1",
    "content": "This is my first article Content.",
    "category_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 0,
    "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "content_type": null
  },
  {
    "title": "New Article 2",
    "content": "This is my second article Content.",
    "category_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 0,
    "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "content_type": null
  }
]
Array of object
object
title
string Required

The title of the article

Min length1
content
string

The content of the article, for any Editor type, use this property

category_id
string Required

The ID of the category where the article will be created

Min length1
project_version_id
string Required

The project version ID in which the article will be created

Min length1
order
integer (int32)

The position of the article in the category tree (By default, it will be placed at the bottom of the category)

user_id
string Required

The ID of the team account that will be marked as a contributor of the article

Min length1
content_type
integer (int32)

0 - Markdown content; 1 - HTML content; 2 - Block Content

Valid values[0,1,2]
Create Bulk Article Request Example

Create Bulk artilce by adding a list of data in title, category_id, project_version_id, and user_id. use content property to add some data in to your article.

[
  {
    "title": "New Article 1",
    "content": "This is my first article Content.",
    "category_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 0,
    "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "content_type": null
  },
  {
    "title": "New Article 2",
    "content": "This is my second article Content.",
    "category_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 0,
    "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8",
    "content_type": null
  }
]
Array of object
object
title
string Required

The title of the article

Min length1
content
string

The content of the article, for any Editor type, use this property

category_id
string Required

The ID of the category where the article will be created

Min length1
project_version_id
string Required

The project version ID in which the article will be created

Min length1
order
integer (int32)

The position of the article in the category tree (By default, it will be placed at the bottom of the category)

user_id
string Required

The ID of the team account that will be marked as a contributor of the article

Min length1
content_type
integer (int32)

0 - Markdown content; 1 - HTML content; 2 - Block Content

Valid values[0,1,2]
Responses
200

Success

Article Created Successfully

The article has been created under the following category. you can use the article Id to view the article in the portal.

{
  "data": [
    {
      "article_id": "d83f3388-7493-489f-ab51-249d4e6a25ce",
      "success": true,
      "details": "Successfully created article c1"
    },
    {
      "article_id": "5cabbba1-fc2a-4f82-9dee-01759509b109",
      "success": true,
      "details": "Successfully created article c2"
    }
  ],
  "extension_data": null,
  "success": true,
  "errors": [],
  "warnings": [],
  "information": []
}
Expand All
object
data
Array of object (BulkArticleResultCustomer)

Bulk article create response

object
article_id
string

Article ID that has updated

success
boolean

Indicates if articles creation was successful

details
string

Additional information about articles creation status

extension_data
object (ExtensionDataObject)
success
boolean

Status indication for customer API response

errors
Array of object (BaseError)

Errors in the customer API response

object
extension_data
object (ExtensionDataObject)
stack_trace
string

Stack trace for error response message

description
string

Description for error cause

error_code
string

Error code for Api resonse

custom_data
object
warnings
Array of object (BaseWarning)

Warning in the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

Warning description

warning_code
string

warning code for customer Api base response

information
Array of object (BaseInformation)

Information passed by the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

status description for customer Api response information

400

Bad Request

userId not found

Kindly check your user Id and perform the task again. Find your user Id at /v2/Teams.

{
  "data": [
    {
      "article_id": null,
      "success": false,
      "details": "Failed to create article c2\r\nError: The user with id 'f11efc6f-e968-4e95-82eb-85ad61559de81' does not exist in your project."
    }
  ],
  "extension_data": null,
  "success": true,
  "errors": null,
  "warnings": [],
  "information": []
}
project_version_id not foundd

Kindly check the project_version_id from /v2/ProjectVersions and perform the task again.

{
  "data": [
    {
      "article_id": null,
      "success": false,
      "details": "Failed to create article c1\r\nError: The supplied workspace id 46f48bc7-760f-4b07-b2d2-fce4aa8ba2341 does not exist in your project."
    }
  ],
  "extension_data": null,
  "success": true,
  "errors": null,
  "warnings": [],
  "information": []
}
category_id not found

Kindly check the category_id from /v2/ProjectVersions/{projectVersionId}/categories and perform the task again.

{
  "data": [
    {
      "article_id": null,
      "success": false,
      "details": "Failed to create article c1\r\nError: Unable to find specified parent category with an id 5b291e6b-fa40-4ab9-941e-f8fffc23b3761."
    }
  ],
  "extension_data": null,
  "success": true,
  "errors": null,
  "warnings": [],
  "information": []
}
title not found

Kindly check the title is empty or null, and perform the task again.

{
  "data": null,
  "extension_data": null,
  "success": true,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "The Title field is required.",
      "error_code": "400",
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Expand All
object
data
Array of object (BulkArticleResultCustomer)

Bulk article create response

object
article_id
string

Article ID that has updated

success
boolean

Indicates if articles creation was successful

details
string

Additional information about articles creation status

extension_data
object (ExtensionDataObject)
success
boolean

Status indication for customer API response

errors
Array of object (BaseError)

Errors in the customer API response

object
extension_data
object (ExtensionDataObject)
stack_trace
string

Stack trace for error response message

description
string

Description for error cause

error_code
string

Error code for Api resonse

custom_data
object
warnings
Array of object (BaseWarning)

Warning in the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

Warning description

warning_code
string

warning code for customer Api base response

information
Array of object (BaseInformation)

Information passed by the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

status description for customer Api response information


Was this article helpful?