WSO2 DevOps API
The WSO2 API Manager DevOps API supports continuous deployment and operations workflows. It provides endpoints for managing API deployments, logging, and operational tasks in DevOps pipelines.
The WSO2 API Manager DevOps API supports continuous deployment and operations workflows. It provides endpoints for managing API deployments, logging, and operational tasks in DevOps pipelines.
# Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
openapi: 3.0.1
info:
version: v0.2
title: WSO2 API Manager - DevOps
description: |
This document specifies a **RESTful API** for WSO2 **API Manager** - DevOps.
contact:
name: WSO2
url: http://wso2.com/products/api-manager/
email: [email protected]
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
paths:
"/tenant-logs/{tenant}/apis/":
get:
summary: |
GET log level of APIs
parameters:
- $ref: '#/components/parameters/tenant'
- $ref: '#/components/parameters/logLevel'
responses:
"200":
description: Log level of APIs
content:
application/json:
schema:
$ref: "#/components/schemas/LoggingApiOutputList"
"404":
description: |
Not Found.
Request API resource or external store Ids not found.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal server error while retrieving API data to be logged
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
x-code-samples:
- lang: Curl
source: 'curl -k -H "Authorization: Basic YWRtaW46YWRtaW4="
"https://127.0.0.1:9443/api/am/devops/v0/tenant-logs/carbon.super/apis?log-level=FULL"'
"/tenant-logs/{tenant}/apis/{apiId}":
get:
summary: |
GET log enabled API data
responses:
"200":
description: Logs enabled API details
content:
application/json:
schema:
$ref: "#/components/schemas/LoggingApiOutputList"
"404":
description: |
Not Found.
Request API resource or external store Ids not found.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal server error while retrieving API data to be logged
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
parameters:
- $ref: '#/components/parameters/tenant'
- $ref: '#/components/parameters/apiId'
x-code-samples:
- lang: Curl
source: 'curl -k -H "Authorization: Basic YWRtaW46YWRtaW4="
"https://127.0.0.1:9443/api/am/devops/v0/tenant-logs/carbon.super/apis/12d6e73c-778d-45ac-b57d-117c6c5092a4"'
put:
summary: |
Set logging levels of the API with its api ID
description: >
This operation enables you to provide the API context
template(context/version) with the log level (OFF|BASIC|STANDARD|FULL).
You should either provide the api ID and the api log level.
parameters:
- $ref: '#/components/parameters/tenant'
- $ref: '#/components/parameters/apiId'
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/LoggingApiInput"
description: |
The logLeve is provided as a payload.
responses:
"200":
description: Successfully Enabled the logs for the API
content:
application/json:
schema:
$ref: "#/components/schemas/LoggingApiOutputList"
"404":
description: |
Not Found.
Request API resource or external store Ids not found.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal server error while configuring API to be logged
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
x-code-samples:
- lang: Curl
source: 'curl -k -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4="
"https://127.0.0.1:9443/api/am/devops/v0/tenant-logs/carbon.super/apis/12d6e73c-778d-45ac-b57d-117c6c5092a4"'
"/config/correlation/":
get:
summary: |
GET status of correlation log components
responses:
"200":
description: Status of Correlation Log Components
content:
application/json:
schema:
$ref: "#/components/schemas/CorrelationComponentsList"
"404":
description: |
Not Found.
Request component not found.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal server error while retrieving info
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
x-code-samples:
- lang: Curl
source: 'curl -k -H "Authorization: Basic YWRtaW46YWRtaW4="
"https://127.0.0.1:9443/api/am/devops/v0/config/correlation"'
put:
summary: |
Enable / Disable correlation logs
description: >
This operation enables you to enable / disable correlation logs
of the product. This operation can be done at the product level
or at each component level by providing the componentName query
parameter.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CorrelationComponentsList"
description: |
The enable / disable correlation log status is provided as a payload.
responses:
"200":
description: Successfully Set the status of the correlation logs.
content:
application/json:
schema:
$ref: "#/components/schemas/CorrelationComponentsList"
"404":
description: |
Not Found.
Request components not found.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal server error while configuring the correlation log status
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
x-code-samples:
- lang: Curl
source: 'curl -k -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -d data.json
"https://127.0.0.1:9443/api/am/devops/v0/config/correlation"'
servers:
- url: https://apis.wso2.com/api/am/devops/v0
components:
schemas:
LoggingApiOutputList:
title: apis
properties:
apis:
type: array
items:
$ref: "#/components/schemas/LoggingApiOutput"
CorrelationComponentsList:
title: correlation-components
properties:
components:
type: array
items:
$ref: "#/components/schemas/CorrelationComponent"
CorrelationComponent:
title: Correlation Component INFO object
properties:
name:
type: string
example: http
enabled:
type: string
example: true
properties:
type: array
items:
$ref: "#/components/schemas/CorrelationComponentProperty"
CorrelationComponentProperty:
title: Properties for correlation components
properties:
name:
type: string
example: "deniedThreads"
value:
type: array
items:
type: string
example: "MessageDeliveryTaskPool"
LoggingApiInput:
title: API Info object with log details
required:
- logLevel
properties:
logLevel:
type: string
example: FULL
resourceMethod:
type: string
example: GET
resourcePath:
type: string
example: /v1.0.0/pizza
LoggingApiOutput:
title: API Info object with log details
required:
- context
- logLevel
- apiId
properties:
context:
type: string
example: pizashack/v1.0.0
logLevel:
type: string
example: FULL
apiId:
type: string
example: 12d6e73c-778d-45ac-b57d-117c6c5092a4
resourceMethod:
type: string
example: GET
resourcePath:
type: string
example: /v1.0.0/pizza
Error:
title: Error object returned with 4XX HTTP Status
required:
- code
- message
properties:
code:
type: integer
format: int64
message:
type: string
description: Error message.
description:
type: string
description: |
A detail description about the error message.
moreInfo:
type: string
description: |
Preferably an url with more details about the error.
error:
type: array
description: |
If there are more than one error list them out.
For example, list out validation errors by each field.
items:
$ref: "#/components/schemas/ErrorListItem"
ErrorListItem:
title: Description of individual errors that may have occurred during a request.
required:
- code
- message
properties:
code:
type: string
message:
type: string
description: |
Description about individual errors occurred
description:
type: string
description: |
A detail description about the error message.
parameters:
tenant:
name: tenant
in: path
description: |
Tenant (organization) name
required: true
schema:
type: string
apiId:
name: apiId
in: path
description: |
The API ID for the logging operation
required: true
schema:
type: string
logLevel:
name: log-level
in: query
description: |
Log level of the APIs
required: false
schema:
type: string