Searches for a phrase inside project version
  • 26 Sep 2023
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Searches for a phrase inside project version

  • Dark
    Light

Article Summary

Get
/v2/ProjectVersions/{projectVersionId}/{langCode}
Security
API Key
Header parameter nameapi_token
Enter REST API key. To generate a key, go to Settings → Knowledge base portal → API tokens
Path parameters
projectVersionId
stringRequired

The ID of the project version

langCode
stringRequired

The language code of the article

Default"en"
Query parameters
searchQuery
string

The phrase to search across all articles in the project version

page
integer (int32)

Specify the page to retrieve. Page numbers are zero-based. Therefore, to retrieve the 10th page, you need to set page=9

Default"0"
hitsPerPage
integer (int32)

Number of results per page

Default"10"
Responses
200

Success

Example for 200 response

200 response in searches for a phrase inside project version

{
  "data": [
    {
      "title": "Understanding Home page builder",
      "content": "The home page is the first page an end-user will see when they visit your knowledge base. The Home Page Builder lets you customize your home page by adding links, changing colors, including categories from your knowledge base, and more. \n The home page builder comes with an intuitive interface to design a professional looking front-page to your knowledge base. You do not need any developer support to create a good looking home page. \n If you do not want a home page and would like to direct the user directly to the real content, you can easily turn off the home page for your knowledge base. \n \n                \n                This is a sample article, you can safely delete it. \n  \n",
      "is_hidden": false,
      "tags": [],
      "slug": "understanding-home-page-builder",
      "version": 1,
      "article_id": "6116080f-5b38-4037-b878-82d318543dsw",
      "category_id": "6116080f-5b38-4037-b878-82d318543af",
      "order": 5,
      "is_draft": false,
      "exclude": false,
      "object_id": "",
      "_snippet_result": {
        "content": {
          "value": " The home page is the first page an end-user will see when they visit your knowledge base. The Home Page Builder lets you customize your home page by adding links, changing colors, including categories from your knowledge base, and more. \n The home page builder comes with an intuitive",
          "match_level": ""
        }
      },
      "_highlight_result": {
        "title": null
      }
    }
  ],
  "extension_data": null,
  "success": true,
  "errors": [],
  "warnings": [],
  "information": []
}
Expand All
object
data

The list of project versions available in the project

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

Example for 400 response due to project version Id

400 bad response due to invalid Project version Id

{
  "data": null,
  "extension_data": null,
  "success": false,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "The supplied project version id does not exist in your project",
      "error_code": "400",
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Example for 400 response due to Lanuage Code

400 bad response due to invalid Language Code

{
  "data": null,
  "extension_data": null,
  "success": false,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "Invalid Language code",
      "error_code": "400",
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Expand All
object
data

The list of project versions available in the project

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?