Update the OpenAPI Specification of a service
PUT /api/gateway_groups/{gateway_group_id}/services/{apisix_service_id}/oas
PUT /api/gateway_groups/{gateway_group_id}/services/{apisix_service_id}/oasInteractive request editor loads with JavaScript.
X-API-KEY<token>
In: header
Path Parameters
gateway_group_id*string
Gateway group ID.
Length
1 <= lengthapisix_service_id*string
The unique identifier of the APISIX service.
Match
^[a-zA-Z0-9-_.]+$Length
1 <= length <= 256Request Body
application/json
Response Body
application/json
application/json
curl -X PUT "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/services/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101/oas" \ -H "Content-Type: application/json" \ -d '{}'Successfully retrieved the OpenAPI specification for the service.
{
"value": {
"raw_openapi": "Raw OpenAPI spec",
"api_count": 10,
"api_desc": "OAS description."
}
}Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
PUT /api/gateway_groups/{gateway_group_id}/services/{apisix_service_id}/oas
Update the OpenAPI Specification of a service
Update the OAS document for a service.
Required IAM Permission: Action gateway:UpdatePublishedService, Resource arn:api7:gateway:gatewaygroup/%s/service/%s
Parameters
gateway_group_id(path, string, required): Gateway group ID.apisix_service_id(path, string, required): The unique identifier of the APISIX service.
Request body
Content type: application/json
raw_openapi(string, optional): The raw OpenAPI spec of the service.
Responses
200: Successfully retrieved the OpenAPI specification for the service.- allOf variant 1
value(object, optional): The specific resource.- allOf variant 2
value(object, optional):value.raw_openapi(string, optional): The raw OpenAPI spec of the service.value.api_count(integer, optional): The number of APIs in the service.value.api_desc(string, optional): The description of the OAS.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.
cURL
curl -X PUT '$API_BASE_URL/api/gateway_groups/{gateway_group_id}/services/{apisix_service_id}/oas'