The API token used for authenticating the request. This must be passed as a header parameter. To generate an API token, go to Settings > Knowledge base portal > API tokens. This token must correspond to a valid workspace and permission level.
Import an API reference with projectVersionId, userId and a spec file url or a file type.
{
"project_version_id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
"user_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
"force_import": true,
"url": "https://petstore.swagger.io/v2/swagger.json",
"file": null
}
The ID of the project version
The ID of the team account
true : The errors and alerts will not be shown while importing the spec file
false : The errors and alerts will be shown while importing the spec file
Url of the spec file
File path of the spec file
Success
This is the sample response for single API reference import with server variables.
{
"data": {
"categories_created": 23,
"articles_created": 23,
"api_reference_id": "9874c1d9-033f-484c-8e3e-c343301eae57",
"errors": [],
"alerts": []
},
"extension_data": null,
"success": true,
"errors": [],
"warnings": [],
"information": []
}
This is the sample response for single API reference import without server variables.
{
"data": {
"categories_created": 3,
"articles_created": 23,
"api_reference_id": "9874c1d9-033f-484c-8e3e-c343301eae57",
"errors": [],
"alerts": []
},
"extension_data": null,
"success": true,
"errors": [],
"warnings": [
{
"extension_data": null,
"description": "You may not be able to use try-it feature. Looks like server variables aren’t defined in your OpenAPI Specification file.",
"warning_code": null
}
],
"information": []
}
This is the sample response for single API reference import with force import as false.
{
"data": {
"categories_created": 3,
"articles_created": 23,
"api_reference_id": "9874c1d9-033f-484c-8e3e-c343301eae57",
"errors": [
{
"message": "Declared path parameter 'contentId' needs to be defined as a path parameter at either the path or operation level",
"pointer": "#/paths/~1v2~1Content~1{Id}~1version~1{contentCategoryId}/delete/parameters/2/in"
}
],
"alerts": [
{
"message": "Data and type mismatch found.",
"pointer": "#/paths/~1v2~1Content/{Id}/depete/response/200/content/application~1json/examples/Content"
}
]
},
"extension_data": null,
"success": true,
"errors": [],
"warnings": [],
"information": []
}
Import response data
Total category created
Total article created
Api reference ID
Error log response
Descriptive message of the problem
Path where the problem occures
Alerts log response
Descriptive message of the problem
Path where the problem occures
Extension data for customer API response
Indicates the status of the API response. A value of true signifies that the request was successfully processed, while false indicates a failure or error occurred.
A list of errors encountered during the API request. Each error object provides details about the problem, including an error code and a message explaining the issue. This field is populated when the request fails or encounters issues.
This is the Extension data object
A technical trace showing where the error occurred within the system. Intended for backend debugging.
A clear message explaining what caused the error. This helps quickly understand what went wrong.
A short, predefined code that identifies the type of error. Useful for logging the error or raising a support request.
Any structured metadata for the error object.
A list of warnings generated during the API request. These are non-critical issues or recommendations that might affect the request but won't stop it from processing. Each warning object provides a message to inform the user of potential problems.
Extension Data for customer Api warning
A plain message that describes the warning and helps understand what should be reviewed.
A short, predefined code that uniquely identifies the warning type.
Contains additional non-critical information relevant to the request or response. This field provides extra details that might assist in understanding the context of the API response but is not essential for processing.
Extension data for customer Api response information
A plain message offering helpful context about the response, such as confirmation of fallback logic or skipped operations.
Bad Request
Kindly ensure that the given project version ID is valid.
{
"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": []
}
Kindly ensure that the given user ID is valid.
{
"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": []
}
You had reached your maximum API reference limit, for continuing add a new version.
{
"extension_data": null,
"success": false,
"errors": [
{
"extension_data": null,
"stack_trace": null,
"description": "Unable to add API Reference: Maximum API Reference limit reached",
"error_code": null,
"custom_data": null
}
],
"warnings": [],
"information": []
}
You have to provide a valid OAS spec file URL.
{
"extension_data": null,
"success": false,
"errors": [
{
"extension_data": null,
"stack_trace": null,
"description": "Invalid Url",
"error_code": null,
"custom_data": null
}
],
"warnings": [],
"information": []
}
You have to provide only a valid OAS spec file or a spec file URL.
{
"extension_data": null,
"success": false,
"errors": [
{
"extension_data": null,
"stack_trace": null,
"description": "You can only upload URL or a spec file.",
"error_code": null,
"custom_data": null
}
],
"warnings": [],
"information": []
}
You have to upload a valid JSON or a YAML file.
{
"extension_data": null,
"success": false,
"errors": [
{
"extension_data": null,
"stack_trace": null,
"description": "Only YAML or JSON files are allowed.",
"error_code": null,
"custom_data": null
}
],
"warnings": [],
"information": []
}
Extension data for customer API response
Indicates the status of the API response. A value of true signifies that the request was successfully processed, while false indicates a failure or error occurred.
A list of errors encountered during the API request. Each error object provides details about the problem, including an error code and a message explaining the issue. This field is populated when the request fails or encounters issues.
This is the Extension data object
A technical trace showing where the error occurred within the system. Intended for backend debugging.
A clear message explaining what caused the error. This helps quickly understand what went wrong.
A short, predefined code that identifies the type of error. Useful for logging the error or raising a support request.
Any structured metadata for the error object.
A list of warnings generated during the API request. These are non-critical issues or recommendations that might affect the request but won't stop it from processing. Each warning object provides a message to inform the user of potential problems.
Extension Data for customer Api warning
A plain message that describes the warning and helps understand what should be reviewed.
A short, predefined code that uniquely identifies the warning type.
Contains additional non-critical information relevant to the request or response. This field provides extra details that might assist in understanding the context of the API response but is not essential for processing.
Extension data for customer Api response information
A plain message offering helpful context about the response, such as confirmation of fallback logic or skipped operations.