API Specification
Create API Specification
Changed onCreates a specification (OpenAPI or AsyncAPI) for an API. Note: You can only have one specification for an API. This endpoint is deprecated and will be removed: use /versions instead.
post/v3/apis/{apiId}/specifications
Request
- Base URL: https://global.api.konghq.com
- URL: https://global.api.konghq.com/v3/apis/{apiId}/specifications
- Auth: one of:
- HTTP bearer
- HTTP bearer
- HTTP bearer
- HTTP bearer
Request body
Example request
{
"id": "7710d5c4-d902-410b-992f-18b814155b53",
"content": "{\"openapi\":\"3.0.3\",\"info\":{\"title\":\"Example API\",\"version\":\"1.0.0\"},\"paths\":{\"/example\":{\"get\":{\"summary\":\"Example endpoint\",\"responses\":{\"200\":{\"description\":\"Successful response\"}}}}}}",
"type": "oas3",
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z"
}Response
API specification (OpenAPI or AsyncAPI)
Example response
{
"id": "7710d5c4-d902-410b-992f-18b814155b53",
"content": "{\"openapi\":\"3.0.3\",\"info\":{\"title\":\"Example API\",\"version\":\"1.0.0\"},\"paths\":{\"/example\":{\"get\":{\"summary\":\"Example endpoint\",\"responses\":{\"200\":{\"description\":\"Successful response\"}}}}}}",
"type": "oas3",
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z"
}Changes
- warning
added the new
typeenum value to the///////response property for the response status
- warning
- breaking
the response property
///////became nullable for the status - breaking
the response property
///////became nullable for the status - breaking
the response property
///////became nullable for the status - breaking
the response property
///////became nullable for the status - breaking
the response property
///////became nullable for the status
- breaking