openapi: 3.0.0
info:
  description: >-
    This is the RESTful API for admin advisory management in WSO2
    Identity Server
  version: "v1"
  title: WSO2 Identity Server - Admin Advisory Management API
  contact:
    name: WSO2 Identity Server
    url: 'https://wso2.com/identity-and-access-management'
    email: architecture@wso2.org
  license:
    name: Apache 2.0
    url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
tags:
  - name: Management
    description: Open API
paths:
  /admin-advisory-management/banner:
    get:
      tags:
        - Management
      summary: Retrieve admin advisory banner related configurations.
      operationId: getAdminAdvisoryConfig
      description: |
        Retrieve admin advisory banner related configurations.<br>

        <b>Permission required:</b> <br>
            * None <br>
          <b>Scope required:</b> <br>
            * None
      responses:
        '200':
          description: Admin advisory banner configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminAdvisoryConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/ServerError'
    patch:
      tags:
        - Management
      summary: Update admin advisory banner related configurations.
      operationId: updateAdminAdvisoryConfig
      description: |
        Update admin advisory banner related configurations.<br>

        <b>Permission required:</b> <br>
            * /permission/admin/manage/identity/configmgt/update <br>
          <b>Scope required:</b> <br>
            * internal_config_mgt_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAdvisoryConfig'
        required: true
      responses:
        '200':
          description: Admin advisory banner configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminAdvisoryConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/ServerError'

servers:
  - url: https://localhost:9443/t/{tenant-domain}/api/server/v1/
components:
  responses:
    BadRequest:
      description: Invalid input in the request.
      content:
        'application/json':
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized.
    Forbidden:
      description: Resource Forbidden
    ServerError:
      description: Internal Server Error.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
    NotImplemented:
      description: Not Implemented.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
    InvalidInput:
      description: Bad Request.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
    OK:
      description: OK.
  schemas:
    AdminAdvisoryConfig:
      type: object
      description: Admin advisory banner configuration response.
      properties:
        enableBanner:
          type: boolean
          description: Admin banner enabled status.
          example: true
        bannerContent:
          type: string
          description: Admin banner content.
          example: Warning - unauthorized use of this tool is strictly prohibited.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: ADV-00000
        message:
          type: string
          example: Some Error Message
        description:
          type: string
          example: Some Error Description
        traceId:
          type: string
          example: e0fbcfeb-3617-43c4-8dd0-7b7d38e13047
