Publishes an API reference
  • 25 Nov 2023
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Publishes an API reference

  • Dark
    Light

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 (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 response

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

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 (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 response

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?