Publishes an API reference
  • 02 Nov 2024
  • 3 Minutes To Read
  • Contributors
  • Dark mode
    Light
  • PDF

Publishes an API reference

  • Dark mode
    Light
  • PDF

Article summary

Post
/v2/APIReferences/publish
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
Publish API reference Request Example

Publish an API reference with apiReferenceId, projectVersionId, and userId.

{
  "api_reference_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
  "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
  "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8"
}
object
api_reference_id
string Required

The ID of the API reference

Min length1
project_version_id
string Required

The ID of the project version

Min length1
user_id
string Required

The ID of the team account

Min length1
Publish API reference Request Example

Publish an API reference with apiReferenceId, projectVersionId, and userId.

{
  "api_reference_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
  "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
  "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8"
}
object
api_reference_id
string Required

The ID of the API reference

Min length1
project_version_id
string Required

The ID of the project version

Min length1
user_id
string Required

The ID of the team account

Min length1
Publish API reference Request Example

Publish an API reference with apiReferenceId, projectVersionId, and userId.

{
  "api_reference_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
  "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
  "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8"
}
object
api_reference_id
string Required

The ID of the API reference

Min length1
project_version_id
string Required

The ID of the project version

Min length1
user_id
string Required

The ID of the team account

Min length1
Publish API reference Request Example

Publish an API reference with apiReferenceId, projectVersionId, and userId.

{
  "api_reference_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
  "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
  "user_id": "f11efc6f-e968-4e95-82eb-85ad61559de8"
}
object
api_reference_id
string Required

The ID of the API reference

Min length1
project_version_id
string Required

The ID of the project version

Min length1
user_id
string Required

The ID of the team account

Min length1
Responses
200

Success

API reference published successfully

API reference has been successfully published. You can view the published endpoints in the KB site.

{
  "extension_data": null,
  "success": true,
  "errors": null,
  "warnings": [],
  "information": []
}
Expand All
object
extension_data
object | null

Extention data for customer API response

success
boolean

Status indication for customer API response

errors
Array of object (BaseError) | null

Errors in the customer API response

object
extension_data
object | null

Thids is the Extention data object

stack_trace
string | null

Stack trace for error response message

description
string | null

Description for error cause

error_code
string | null

Error code for Api response

custom_data
object | null
property*
warnings
Array of object (BaseWarning) | null

Warnings in the customer API response

object
extension_data
object | null

Extention Data for customer Api warning

description
string | null

Warning description

warning_code
string | null

warning code for customer Api base response

information
Array of object (BaseInformation) | null

Information passed by the customer API response

object
extension_data
object | null

Extention data for customer Api response information

description
string | null

status description for customer Api response information

400

Bad Request

Invalid API reference ID

Kindly verify the API reference ID and perform the task again.

{
  "extension_data": null,
  "success": false,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "Invalid API reference",
      "error_code": null,
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Invalid project version ID

Kindly verify the project version ID and perform the task again.

{
  "extension_data": null,
  "success": false,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "The supplied project version id 'd2eafb73-ccb6-4d15-9c4a-959b3c232ddba' does not exist in your project",
      "error_code": null,
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Invalid user ID

Kindly verify the team account ID and perform the task again.

{
  "extension_data": null,
  "success": false,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "The user with id 'f11efc6f-e968-4e95-82eb-85ad61559de8a' does not exist in your project.",
      "error_code": null,
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
All articles are already in published state.

Since all the articles are already in a published state, they cannot be published again.

{
  "extension_data": null,
  "success": false,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "All articles are already in published state.",
      "error_code": null,
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Expand All
object
extension_data
object | null

Extention data for customer API response

success
boolean

Status indication for customer API response

errors
Array of object (BaseError) | null

Errors in the customer API response

object
extension_data
object | null

Thids is the Extention data object

stack_trace
string | null

Stack trace for error response message

description
string | null

Description for error cause

error_code
string | null

Error code for Api response

custom_data
object | null
property*
warnings
Array of object (BaseWarning) | null

Warnings in the customer API response

object
extension_data
object | null

Extention Data for customer Api warning

description
string | null

Warning description

warning_code
string | null

warning code for customer Api base response

information
Array of object (BaseInformation) | null

Information passed by the customer API response

object
extension_data
object | null

Extention data for customer Api response information

description
string | null

status description for customer Api response information


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.