openapi: 3.0.1
info:
  contact:
    email: architecture@wso2.com
    name: WSO2
    url: http://wso2.com/products/api-manager/
  description: |
    This document specifies a **RESTful API** for WSO2 **API Manager** - **Admin Portal**.
    Please see [full OpenAPI Specification](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.7.206/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/main/resources/admin-api.yaml) of the API which is written using [OAS 3.0](http://swagger.io/) specification.

    # Authentication
    Our REST APIs are protected using OAuth2 and access control is achieved through scopes. Before you start invoking
    the the API you need to obtain an access token with the required scopes. This guide will walk you through the steps
    that you will need to follow to obtain an access token.
    First you need to obtain the consumer key/secret key pair by calling the dynamic client registration (DCR) endpoint. You can add your preferred grant types
    in the payload. A sample payload is shown below.
    ```
      {
      "callbackUrl":"www.google.lk",
      "clientName":"rest_api_admin",
      "owner":"admin",
      "grantType":"client_credentials password refresh_token",
      "saasApp":true
      }
    ```
    Create a file (payload.json) with the above sample payload, and use the cURL shown bellow to invoke the DCR endpoint. Authorization header of this should contain the
    base64 encoded admin username and password.
    **Format of the request**
    ```
      curl -X POST -H "Authorization: Basic Base64(admin_username:admin_password)" -H "Content-Type: application/json"
      \ -d @payload.json https://<host>:<servlet_port>/client-registration/v0.17/register
    ```
    **Sample request**
    ```
      curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json"
      \ -d @payload.json https://localhost:9443/client-registration/v0.17/register
    ```
    Following is a sample response after invoking the above curl.
    ```
    {
    "clientId": "fOCi4vNJ59PpHucC2CAYfYuADdMa",
    "clientName": "rest_api_admin",
    "callBackURL": "www.google.lk",
    "clientSecret": "a4FwHlq0iCIKVs2MPIIDnepZnYMa",
    "isSaasApplication": true,
    "appOwner": "admin",
    "jsonString": "{\"grant_types\":\"client_credentials password refresh_token\",\"redirect_uris\":\"www.google.lk\",\"client_name\":\"rest_api_admin\"}",
    "jsonAppAttribute": "{}",
    "tokenType": null
    }
    ```
    Next you must use the above client id and secret to obtain the access token.
    We will be using the password grant type for this, you can use any grant type you desire.
    You also need to add the proper **scope** when getting the access token. All possible scopes for Admin REST API can be viewed in **OAuth2 Security** section
    of this document and scope for each resource is given in **authorizations** section of resource documentation.
    Following is the format of the request if you are using the password grant type.
    ```
    curl -k -d "grant_type=password&username=<admin_username>&password=<admin_passowrd>&scope=<scopes seperated by space>"
    \ -H "Authorization: Basic base64(cliet_id:client_secret)"
    \ https://<host>:<gateway_port>/token
    ```
    **Sample request**
    ```
    curl https://localhost:8243/token -k \
    -H "Authorization: Basic Zk9DaTR2Tko1OVBwSHVjQzJDQVlmWXVBRGRNYTphNEZ3SGxxMGlDSUtWczJNUElJRG5lcFpuWU1h" \
    -d "grant_type=password&username=admin&password=admin&scope=apim:admin apim:tier_view"
    ```
    Shown below is a sample response to the above request.
    ```
    {
    "access_token": "e79bda48-3406-3178-acce-f6e4dbdcbb12",
    "refresh_token": "a757795d-e69f-38b8-bd85-9aded677a97c",
    "scope": "apim:admin apim:tier_view",
    "token_type": "Bearer",
    "expires_in": 3600
    }
    ```
    Now you have a valid access token, which you can use to invoke an API.
    Navigate through the API descriptions to find the required API, obtain an access token as described above and invoke the API with the authentication header.
    If you use a different authentication mechanism, this process may change.

    # Try out in Postman
    If you want to try-out the embedded postman collection with "Run in Postman" option, please follow the guidelines listed below.
    * All of the OAuth2 secured endpoints have been configured with an Authorization Bearer header with a parameterized access token. Before invoking any REST API resource make sure you run the `Register DCR Application` and `Generate Access Token` requests to fetch an access token with all required scopes.
    * Make sure you have an API Manager instance up and running.
    * Update the `basepath` parameter to match the hostname and port of the APIM instance.

    [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/f5ac2ca9fb22afef6ed6)
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: WSO2 API Manager - Admin
  version: v4
servers:
- url: https://apis.wso2.com/api/am/admin/v4
paths:
  /throttling/policies/search:
    get:
      description: |
        This operation provides you a list of available Throttling Policies qualifying the given keyword match.
      operationId: throttlingPolicySearch
      parameters:
      - description: |
          **Search**.
          You can search by providing a keyword. Allowed to search by type only.
        explode: true
        in: query
        name: query
        required: false
        schema:
          type: string
        style: form
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlePolicyDetailsList'
          description: |
            OK.
            List of qualifying Throttling Policies is returned.
          headers:
            Content-Type:
              description: The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: |
        Retrieve/Search Throttling Policies
      tags:
      - Throttling Policy Search
      x-code-samples:
      - lang: Curl
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/search?query=type:sub"'
      x-accepts: application/json
  /throttling/policies/application:
    get:
      description: |
        Retrieves all existing application throttling policies.
      parameters:
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationThrottlePolicyList'
          description: |
            OK.
            Policies returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: Get all Application Throttling Policies
      tags:
      - Application Policy (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/application"'
      x-accepts: application/json
    post:
      description: |
        This operation can be used to add a new application level throttling policy.
      parameters:
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationThrottlePolicy'
        description: |
          Application level policy object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                policyId: e0fd4a15-969e-4056-94c8-8a7b56f8103f
                policyName: 20PerMin
                displayName: 20PerMin
                description: Allows 20 request per minute
                isDeployed: true
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 20
              schema:
                $ref: '#/components/schemas/ApplicationThrottlePolicy'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
            Location header contains URL of newly created entity.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                Location of the newly created Policy object.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "415":
          content:
            application/json:
              example:
                code: 415
                message: Unsupported media type
                description: The entity of the request was not in a supported format
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Unsupported Media Type. The entity of the request was not in
            a supported format.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Add an Application Throttling Policy
      tags:
      - Application Policy (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/application"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/policies/application/{policyId}:
    delete:
      description: |
        Deletes an application level throttling policy.
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Resource successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Delete an Application Throttling policy
      tags:
      - Application Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/application/4e098fff-7f94-459a-981f-d257332f69d0"'
      x-accepts: application/json
    get:
      description: |
        Retrieves an application throttling policy.
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                policyId: e0fd4a15-969e-4056-94c8-8a7b56f8103f
                policyName: 20PerMin
                displayName: 20PerMin
                description: Allows 20 request per minute
                isDeployed: true
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 20
              schema:
                $ref: '#/components/schemas/ApplicationThrottlePolicy'
          description: |
            OK.
            Policy returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: Get an Application Throttling Policy
      tags:
      - Application Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/application/4e098fff-7f94-459a-981f-d257332f69d0"'
      x-accepts: application/json
    put:
      description: |
        Updates an existing application level throttling policy. Upon a succesfull update, you will receive the updated application policy as the response.
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationThrottlePolicy'
        description: |
          Policy object that needs to be modified
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                policyId: e0fd4a15-969e-4056-94c8-8a7b56f8103f
                policyName: 20PerMin
                displayName: 20PerMin
                description: Allows 20 request per minute
                isDeployed: true
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 20
              schema:
                $ref: '#/components/schemas/ApplicationThrottlePolicy'
          description: |
            OK.
            Policy updated.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional request.
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional reuquests.
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                The URL of the newly created resource.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Update an Application Throttling policy
      tags:
      - Application Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/application/4e098fff-7f94-459a-981f-d257332f69d0"'
      x-contentType: application/json
      x-accepts: application/json
  /policies/mediation:
    get:
      description: |
        This operation provides you a list of all available global mediation policies.
      parameters:
      - description: |
          Maximum size of resource array to return.
        explode: true
        in: query
        name: limit
        required: false
        schema:
          default: 25
          type: integer
        style: form
      - description: |
          Starting point within the complete list of items qualified.
        explode: true
        in: query
        name: offset
        required: false
        schema:
          default: 0
          type: integer
        style: form
      - description: -Not supported yet-
        explode: true
        in: query
        name: query
        required: false
        schema:
          type: string
        style: form
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mediationList'
          description: |
            OK.
            List of mediation policies is returned.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:mediation_policy_view
      summary: |
        Get all Global Mediation Policies
      tags:
      - Mediation Policy (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/policies/mediation"'
      x-accepts: application/json
    post:
      description: |
        This operation can be used to add a new global mediation policy.
      parameters:
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Mediation'
        description: mediation policy to upload
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mediation'
          description: |
            OK.
            Mediation policy added successfully.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                The URL of the uploaded thumbnail image of the API.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:mediation_policy_create
      summary: Add a Global Mediation Policy
      tags:
      - Mediation Policy (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/policies/mediation"'
      x-contentType: application/json
      x-accepts: application/json
  /policies/mediation/{mediationPolicyId}:
    delete:
      description: |
        This operation can be used to delete an existing global mediation policy providing the Id of the mediation policy.
      parameters:
      - description: |
          Mediation policy Id
        explode: false
        in: path
        name: mediationPolicyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Mediation policy successfully deleted.
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:mediation_policy_create
      summary: Delete a Global Mediation Policy
      tags:
      - Mediation Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/policies/mediation/2253cf01-0356-4cc1-9941-3034a8c29007"'
      x-accepts: application/json
    get:
      description: |
        This operation can be used to retrieve a particular global mediation policy.
      parameters:
      - description: |
          Mediation policy Id
        explode: false
        in: path
        name: mediationPolicyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mediation'
          description: |
            OK.
            Mediation Policy returned.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:mediation_policy_view
      summary: Get a Global Mediation Policy
      tags:
      - Mediation Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/policies/mediation/2253cf01-0356-4cc1-9941-3034a8c29007"'
      x-accepts: application/json
    put:
      description: |
        This operation can be used to update an existing global mediation policy.
      parameters:
      - description: |
          Mediation policy Id
        explode: false
        in: path
        name: mediationPolicyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Mediation'
        description: |
          Mediation policy object that needs to be updated
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mediation'
          description: |
            OK.
            Successful response with updated mediation policy object
          headers:
            ETag:
              description: |
                Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                The URL of the newly created resource.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:mediation_policy_create
      summary: Update a Global Mediation Policy
      tags:
      - Mediation Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/policies/mediation/2253cf01-0356-4cc1-9941-3034a8c29007"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/policies/subscription:
    get:
      description: |
        This operation can be used to retrieve all Subscription level throttling policies.
      parameters:
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionThrottlePolicyList'
          description: |
            OK.
            Policies returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: Get all Subscription Throttling Policies
      tags:
      - Subscription Policy (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/subscription"'
      x-accepts: application/json
    post:
      description: |
        This operation can be used to add a Subscription level throttling policy specifying the details of the policy in the payload.
      parameters:
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionThrottlePolicy'
        description: |
          Subscripion level policy object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                policyId: 78c3ebff-176d-40d8-9377-fb3276528291
                policyName: Gold
                displayName: Gold
                description: Allows 5000 requests per minute
                isDeployed: true
                graphQLMaxComplexity: 0
                graphQLMaxDepth: 0
                subscriberCount: 0
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 5000
                rateLimitCount: 0
                customAttributes: []
                stopOnQuotaReach: true
                billingPlan: FREE
              schema:
                $ref: '#/components/schemas/SubscriptionThrottlePolicy'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
            Location header contains URL of newly created entity.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                Location of the newly created Policy object.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "415":
          content:
            application/json:
              example:
                code: 415
                message: Unsupported media type
                description: The entity of the request was not in a supported format
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Unsupported Media Type. The entity of the request was not in
            a supported format.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Add a Subscription Throttling Policy
      tags:
      - Subscription Policy (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/subscription"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/policies/subscription/{policyId}:
    delete:
      description: |
        This operation can be used to delete a subscription level throttling policy by specifying the Id of the policy as a path paramter.
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Resource successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Delete a Subscription Policy
      tags:
      - Subscription Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/subscription/c948c723-71dd-4d50-8c77-0a0e99c8cbb1"'
      x-accepts: application/json
    get:
      description: |
        This operation can be used to retrieves subscription level throttling policy by specifying the Id of the policy as a path paramter
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                policyId: 78c3ebff-176d-40d8-9377-fb3276528291
                policyName: Gold
                displayName: Gold
                description: Allows 5000 requests per minute
                isDeployed: true
                graphQLMaxComplexity: 0
                graphQLMaxDepth: 0
                subscriberCount: 0
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 5000
                rateLimitCount: 0
                customAttributes: []
                stopOnQuotaReach: true
                billingPlan: FREE
              schema:
                $ref: '#/components/schemas/SubscriptionThrottlePolicy'
          description: |
            OK.
            Policy returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: Get a Subscription Policy
      tags:
      - Subscription Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/subscription/c948c723-71dd-4d50-8c77-0a0e99c8cbb1"'
      x-accepts: application/json
    put:
      description: |
        Updates an existing subscription level throttling policy.
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionThrottlePolicy'
        description: |
          Policy object that needs to be modified
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                policyId: 78c3ebff-176d-40d8-9377-fb3276528291
                policyName: Gold
                displayName: Gold
                description: Allows 5000 requests per minute
                isDeployed: true
                graphQLMaxComplexity: 0
                graphQLMaxDepth: 0
                subscriberCount: 0
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 5000
                rateLimitCount: 0
                customAttributes: []
                stopOnQuotaReach: true
                billingPlan: FREE
              schema:
                $ref: '#/components/schemas/SubscriptionThrottlePolicy'
          description: |
            OK.
            Policy updated.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                The URL of the newly created resource.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Update a Subscription Policy
      tags:
      - Subscription Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/subscription/c948c723-71dd-4d50-8c77-0a0e99c8cbb1"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/policies/custom:
    get:
      description: |
        Retrieves all custom rules.

        **NOTE:**
        * Only super tenant users are allowed for this operation.
      parameters:
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRuleList'
          description: |
            OK.
            Policies returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: Get all Custom Rules
      tags:
      - Custom Rules (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/custom"'
      x-accepts: application/json
    post:
      description: |
        Adds a new custom rule.

        **NOTE:**
        * Only super tenant users are allowed for this operation.
      parameters:
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomRule'
        description: |
          Custom Rule object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                policyId: 7c7ed7c4-5a7c-4e08-850a-a95bbfcc2fb6
                policyName: custom
                description: Allow 10 requests per minute for admin user
                isDeployed: true
                siddhiQuery: "FROM RequestStream\nSELECT userId, ( userId == 'admin@carbon.super'\
                  \ ) AS isEligible , str:concat('admin@carbon.super','') as throttleKey\n\
                  INSERT INTO EligibilityStream; \n\nFROM EligibilityStream[isEligible==true]#throttler:timeBatch(1\
                  \ min) \nSELECT throttleKey, (count(userId) >= 10) as isThrottled,\
                  \ expiryTimeStamp group by throttleKey \nINSERT ALL EVENTS into\
                  \ ResultStream;"
                keyTemplate: $userId
              schema:
                $ref: '#/components/schemas/CustomRule'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
            Location header contains URL of newly created entity.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                Location of the newly created resource.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "415":
          content:
            application/json:
              example:
                code: 415
                message: Unsupported media type
                description: The entity of the request was not in a supported format
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Unsupported Media Type. The entity of the request was not in
            a supported format.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Add a Custom Rule
      tags:
      - Custom Rules (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/custom"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/policies/custom/{ruleId}:
    delete:
      description: |
        Delete a custom rule. We need to provide the Id of the policy as a path parameter.

        **NOTE:**
        * Only super tenant users are allowed for this operation.
      parameters:
      - description: |
          Custom rule UUID
        explode: false
        in: path
        name: ruleId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Resource successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Delete a Custom Rule
      tags:
      - Custom Rules (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/custom/33662a62-8db1-4d75-af08-afd63c6bd0b4"'
      x-accepts: application/json
    get:
      description: |
        Retrieves a custom rule. We need to provide the policy Id as a path parameter.

        **NOTE:**
        * Only super tenant users are allowed for this operation.
      parameters:
      - description: |
          Custom rule UUID
        explode: false
        in: path
        name: ruleId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                policyId: 7c7ed7c4-5a7c-4e08-850a-a95bbfcc2fb6
                policyName: custom
                description: Allow 10 requests per minute for admin user
                isDeployed: true
                siddhiQuery: "FROM RequestStream\nSELECT userId, ( userId == 'admin@carbon.super'\
                  \ ) AS isEligible , str:concat('admin@carbon.super','') as throttleKey\n\
                  INSERT INTO EligibilityStream; \n\nFROM EligibilityStream[isEligible==true]#throttler:timeBatch(1\
                  \ min) \nSELECT throttleKey, (count(userId) >= 10) as isThrottled,\
                  \ expiryTimeStamp group by throttleKey \nINSERT ALL EVENTS into\
                  \ ResultStream;"
                keyTemplate: $userId
              schema:
                $ref: '#/components/schemas/CustomRule'
          description: |
            OK.
            Policy returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: Get a Custom Rule
      tags:
      - Custom Rules (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/custom/33662a62-8db1-4d75-af08-afd63c6bd0b4"'
      x-accepts: application/json
    put:
      description: |
        Updates an existing custom rule.

        **NOTE:**
        * Only super tenant users are allowed for this operation.
      parameters:
      - description: |
          Custom rule UUID
        explode: false
        in: path
        name: ruleId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomRule'
        description: |
          Policy object that needs to be modified
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                policyId: 7c7ed7c4-5a7c-4e08-850a-a95bbfcc2fb6
                policyName: custom
                description: Allow 10 requests per minute for admin user
                isDeployed: true
                siddhiQuery: "FROM RequestStream\nSELECT userId, ( userId == 'admin@carbon.super'\
                  \ ) AS isEligible , str:concat('admin@carbon.super','') as throttleKey\n\
                  INSERT INTO EligibilityStream; \n\nFROM EligibilityStream[isEligible==true]#throttler:timeBatch(1\
                  \ min) \nSELECT throttleKey, (count(userId) >= 10) as isThrottled,\
                  \ expiryTimeStamp group by throttleKey \nINSERT ALL EVENTS into\
                  \ ResultStream;"
                keyTemplate: $userId
              schema:
                $ref: '#/components/schemas/CustomRule'
          description: |
            OK.
            Policy updated.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                The URL of the newly created resource.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Update a Custom Rule
      tags:
      - Custom Rules (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/custom/33662a62-8db1-4d75-af08-afd63c6bd0b4"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/policies/advanced:
    get:
      description: |
        Retrieves all existing advanced throttling policies.
      parameters:
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedThrottlePolicyList'
          description: |
            OK.
            Policies returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: Get all Advanced Throttling Policies
      tags:
      - Advanced Policy (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/advanced"'
      x-accepts: application/json
    post:
      description: |
        Add a new advanced throttling policy.
      parameters:
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedThrottlePolicy'
        description: |
          Advanced level policy object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                policyId: 4cf46441-a538-4f79-a499-ab81200c9bca
                policyName: 10KPerMin
                displayName: 10KPerMin
                description: Allows 10000 requests per minute
                isDeployed: true
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 10000
                conditionalGroups: []
              schema:
                $ref: '#/components/schemas/AdvancedThrottlePolicy'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
            Location header contains URL of newly created entity.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                Location of the newly created Advanced Throttling Policy.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "415":
          content:
            application/json:
              example:
                code: 415
                message: Unsupported media type
                description: The entity of the request was not in a supported format
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Unsupported Media Type. The entity of the request was not in
            a supported format.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Add an Advanced Throttling Policy
      tags:
      - Advanced Policy (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/advanced"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/policies/advanced/{policyId}:
    delete:
      description: |
        Deletes an advanced throttling policy.
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Resource successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Delete an Advanced Throttling Policy
      tags:
      - Advanced Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/advanced/229a3c46-c836-43c8-b988-8eebd9c7774b"'
      x-accepts: application/json
    get:
      description: |
        Retrieves an advanced throttling policy.
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                policyId: 4cf46441-a538-4f79-a499-ab81200c9bca
                policyName: 10KPerMin
                displayName: 10KPerMin
                description: Allows 10000 requests per minute
                isDeployed: true
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 10000
                conditionalGroups: []
              schema:
                $ref: '#/components/schemas/AdvancedThrottlePolicy'
          description: |
            OK.
            Policy returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_view
      summary: Get an Advanced Throttling Policy
      tags:
      - Advanced Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/advanced/229a3c46-c836-43c8-b988-8eebd9c7774b"'
      x-accepts: application/json
    put:
      description: |
        Updates an existing Advanced throttling policy.
      parameters:
      - description: |
          Thorttle policy UUID
        explode: false
        in: path
        name: policyId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedThrottlePolicy'
        description: |
          Policy object that needs to be modified
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                policyId: 4cf46441-a538-4f79-a499-ab81200c9bca
                policyName: 10KPerMin
                displayName: 10KPerMin
                description: Allows 10000 requests per minute
                isDeployed: true
                defaultLimit:
                  type: REQUESTCOUNTLIMIT
                  requestCount:
                    timeUnit: min
                    unitTime: 1
                    requestCount: 10000
                conditionalGroups: []
              schema:
                $ref: '#/components/schemas/AdvancedThrottlePolicy'
          description: |
            OK.
            Policy updated.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                The URL of the newly created resource.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
      summary: Update an Advanced Throttling Policy
      tags:
      - Advanced Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/advanced/229a3c46-c836-43c8-b988-8eebd9c7774b"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/policies/export:
    get:
      description: |
        This operation can be used to export the details of a particular Throttling Policy.
      operationId: exportThrottlingPolicy
      parameters:
      - description: UUID of the ThrottlingPolicy
        explode: true
        in: query
        name: policyId
        required: false
        schema:
          type: string
        style: form
      - description: |
          Throttling Policy Name
        explode: true
        in: query
        name: name
        required: false
        schema:
          type: string
        style: form
      - description: |
          Type of the Throttling Policy
        explode: true
        in: query
        name: type
        required: false
        schema:
          enum:
          - sub
          - app
          - api
          - global
          type: string
        style: form
      responses:
        "200":
          content:
            application/json:
              example:
                type: rate-limiting policy
                subtype: application
                version: v4.1.0
                data:
                  policyId: cd828243-a0db-430c-97e9-9e41fd865d48
                  policyName: 50PerMin
                  displayName: 50PerMin
                  description: Allows 50 request per minute
                  isDeployed: true
                  type: ApplicationThrottlePolicy
                  defaultLimit:
                    type: BANDWIDTHLIMIT
                    requestCount:
                      timeUnit: min
                      unitTime: 1
                      requestCount: 50
                    bandwidth:
                      timeUnit: min
                      unitTime: 5
                      dataAmount: 100
                      dataUnit: MB
                    eventCount:
                      timeUnit: min
                      unitTime: 5
                      eventCount: 16
              schema:
                $ref: '#/components/schemas/ExportThrottlePolicy'
          description: |
            OK.
            Export Successful.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
        - apim:policies_import_export
      summary: Export a Throttling Policy
      tags:
      - Import Export Throttling Policy
      x-code-samples:
      - lang: Curl
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/export?policyId=96077508-fd01-4fae-bc64-5de0e2baf43c&name=Bronze&type=subscription&format=YAML"'
      x-accepts: application/json
  /throttling/policies/import:
    post:
      description: |
        This operation can be used to import a Throttling Policy
      operationId: importThrottlingPolicy
      parameters:
      - description: |
          Update an existing throttlingpolicy with the same name
        explode: true
        in: query
        name: overwrite
        required: false
        schema:
          type: boolean
        style: form
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: Json File
                  format: binary
                  type: string
              required:
              - file
        required: true
      responses:
        "200":
          description: |
            Created.
            Throttling Policy Imported Successfully.
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "409":
          content:
            application/json:
              example:
                code: 409
                message: Conflict
                description: Specified resource already exists
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict. Specified resource already exists.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tier_manage
        - apim:policies_import_export
      summary: Import a Throttling Policy
      tags:
      - Import Export Throttling Policy
      x-code-samples:
      - lang: Curl
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/import?overwrite=True"'
      x-contentType: multipart/form-data
      x-accepts: application/json
  /throttling/deny-policies:
    get:
      description: |
        Retrieves all existing deny policies.
      parameters:
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockingConditionList'
          description: |
            OK.
            Deny Policies returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:bl_view
      summary: Get all Deny Policies
      tags:
      - Deny Policies (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/deny-policies"'
      x-accepts: application/json
    post:
      description: |
        Adds a new deny policy
      parameters:
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockingCondition'
        description: |
          Blocking condition object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockingCondition'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
            Location header contains URL of newly created entity.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Location:
              description: |
                Location of the newly created resource.
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "415":
          content:
            application/json:
              example:
                code: 415
                message: Unsupported media type
                description: The entity of the request was not in a supported format
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Unsupported Media Type. The entity of the request was not in
            a supported format.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:bl_manage
      summary: Add a deny policy
      tags:
      - Deny Policies (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/deny-policies"'
      x-contentType: application/json
      x-accepts: application/json
  /throttling/deny-policy/{conditionId}:
    delete:
      description: |
        Deletes an existing deny policy
      parameters:
      - description: |
          Blocking condition identifier
        explode: false
        in: path
        name: conditionId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Resource successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:bl_manage
      summary: Delete a Deny Policy
      tags:
      - Deny Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/deny-policy/b513eb68-69e8-4c32-92cf-852c101363c"'
      x-accepts: application/json
    get:
      description: |
        Retrieves a Deny policy providing the condition Id
      parameters:
      - description: |
          Blocking condition identifier
        explode: false
        in: path
        name: conditionId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header of the
          formerly retrieved variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-Modified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockingCondition'
          description: |
            OK.
            Condition returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:bl_view
      summary: Get a Deny Policy
      tags:
      - Deny Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/deny-policy/b513eb68-69e8-4c32-92cf-852c101363c"'
      x-accepts: application/json
    patch:
      description: |
        Update a deny policy by Id
      parameters:
      - description: |
          Blocking condition identifier
        explode: false
        in: path
        name: conditionId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Media type of the entity in the body. Default is application/json.
        explode: false
        in: header
        name: Content-Type
        required: true
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockingConditionStatus'
        description: |
          Blocking condition with updated status
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockingCondition'
          description: |
            OK.
            Resource successfully updated.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:bl_manage
      summary: Update a Deny Policy
      tags:
      - Deny Policy (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PATCH -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/throttling/policies/deny-policy/b513eb68-69e8-4c32-92cf-852c101363c"'
      x-contentType: application/json
      x-accepts: application/json
  /applications:
    get:
      description: |
        This operation can be used to retrieve list of applications owned by the given user, If no user
        is provided, the applications owned by the user associated with the provided access token will be returned.
      parameters:
      - description: |
          username of the application creator
        explode: true
        in: query
        name: user
        required: false
        schema:
          type: string
        style: form
      - description: |
          Maximum size of resource array to return.
        explode: true
        in: query
        name: limit
        required: false
        schema:
          default: 25
          type: integer
        style: form
      - description: |
          Starting point within the complete list of items qualified.
        explode: true
        in: query
        name: offset
        required: false
        schema:
          default: 0
          type: integer
        style: form
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Application Name
        explode: true
        in: query
        name: name
        required: false
        schema:
          type: string
        style: form
      - description: |
          Tenant domain of the applications to get. This has to be specified only if it is required to get applications of
          a tenant other than the requester's tenant. So, if not specified, the default will be set as the
          requester's tenant domain. This cross tenant Application access is allowed only for super tenant admin
          users **only at a migration process**.
        explode: true
        in: query
        name: tenantDomain
        required: false
        schema:
          type: string
        style: form
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationList'
          description: |
            OK.
            Application list returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:app_owner_change
        - apim:app_import_export
      summary: |
        Retrieve/Search Applications
      tags:
      - Application (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/applications"'
      x-accepts: application/json
  /applications/{applicationId}:
    delete:
      description: |
        This operation can be used to delete an application by specifying its id.
      parameters:
      - description: |
          Application UUID
        explode: false
        in: path
        name: applicationId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Resource successfully deleted.
        "202":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponse'
          description: |
            Accepted.
            The request has been accepted.
          headers:
            Location:
              description: |
                Location of the existing Application.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:app_import_export
      summary: |
        Delete an Application
      tags:
      - Applications
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/applications/0a043c2b-ee75-4ef3-9e1c-fc2610ccfa8b"'
      x-accepts: application/json
  /applications/{applicationId}/change-owner:
    post:
      description: |
        This operation is used to change the owner of an Application.
        In order to change the owner of an application, we need to pass the new application owner as a query parameter
      parameters:
      - explode: true
        in: query
        name: owner
        required: true
        schema:
          type: string
        style: form
      - description: |
          Application UUID
        explode: false
        in: path
        name: applicationId
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Application owner changed successfully.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "412":
          content:
            application/json:
              example:
                code: 412
                message: Precondition Failed
                description: The request has not been performed because one of the
                  preconditions is not met
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Precondition Failed. The request has not been performed because
            one of the preconditions is not met.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:app_owner_change
      summary: Change Application Owner
      tags:
      - Application
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/applications/0a043c2b-ee75-4ef3-9e1c-fc2610ccfa8b/change-owner?owner=admin"'
      x-accepts: application/json
  /export/applications:
    get:
      description: |
        This operation can be used to export the details of a particular application as a zip file.
      parameters:
      - description: |
          Application Name
        explode: true
        in: query
        name: appName
        required: true
        schema:
          type: string
        style: form
      - description: |
          Owner of the Application
        explode: true
        in: query
        name: appOwner
        required: true
        schema:
          type: string
        style: form
      - description: |
          Export application keys
        explode: true
        in: query
        name: withKeys
        required: false
        schema:
          type: boolean
        style: form
      responses:
        "200":
          content:
            application/json:
              schema:
                format: binary
                type: string
            application/zip:
              schema:
                format: binary
                type: string
          description: |
            OK.
            Export Successful.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:app_import_export
      summary: Export an Application
      tags:
      - Application (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/export/applications?appName=sampleApp&appOwner=admin&withKeys=true"
          > exported-application.zip'
      x-accepts: application/json
  /export/api:
    get:
      description: |
        This operation can be used to export the details of a particular API as a zip file.
      parameters:
      - description: |
          API Name
        explode: true
        in: query
        name: name
        required: true
        schema:
          type: string
        style: form
      - description: |
          Version of the API
        explode: true
        in: query
        name: version
        required: true
        schema:
          type: string
        style: form
      - description: |
          Provider name of the API
        explode: true
        in: query
        name: providerName
        required: false
        schema:
          type: string
        style: form
      - description: |
          Format of output documents. Can be YAML or JSON.
        explode: true
        in: query
        name: format
        required: false
        schema:
          enum:
          - JSON
          - YAML
          type: string
        style: form
      - description: |
          Preserve API Status on export
        explode: true
        in: query
        name: preserveStatus
        required: false
        schema:
          type: boolean
        style: form
      responses:
        "200":
          content:
            application/zip:
              schema:
                format: binary
                type: string
          description: |
            OK.
            Export Successful.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_import_export
      summary: Export an API
      tags:
      - API (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/export/api?name=PizzaShackAPI&version=1.0.0&providerName=admin&format=YAML&preserveStatus=true"
          > exportAPI.zip'
      x-accepts: application/json
  /export/api-product:
    get:
      description: |
        This operation can be used to export the details of a particular API Product as a zip file.
      parameters:
      - description: |
          API Product Name
        explode: true
        in: query
        name: name
        required: true
        schema:
          type: string
        style: form
      - description: |
          Version of the API Product
        explode: true
        in: query
        name: version
        required: true
        schema:
          type: string
        style: form
      - description: |
          Provider name of the API Product
        explode: true
        in: query
        name: providerName
        required: false
        schema:
          type: string
        style: form
      - description: |
          Format of output documents. Can be YAML or JSON.
        explode: true
        in: query
        name: format
        required: false
        schema:
          enum:
          - JSON
          - YAML
          type: string
        style: form
      - description: |
          Preserve API Product Status on export
        explode: true
        in: query
        name: preserveStatus
        required: false
        schema:
          type: boolean
        style: form
      responses:
        "200":
          content:
            application/zip:
              schema:
                format: binary
                type: string
          description: |
            OK.
            Export Successful.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_product_import_export
      summary: Export an API Product
      tags:
      - API Product (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/export/api-product?name=PizzaShackAPIProduct&version=1.0.0&providerName=admin&format=YAML&preserveStatus=true"
          > exportAPIProduct.zip'
      x-accepts: application/json
  /import/applications:
    post:
      description: |
        This operation can be used to import an application.
      parameters:
      - description: |
          Preserve Original Creator of the Application
        explode: true
        in: query
        name: preserveOwner
        required: false
        schema:
          type: boolean
        style: form
      - description: |
          Skip importing Subscriptions of the Application
        explode: true
        in: query
        name: skipSubscriptions
        required: false
        schema:
          type: boolean
        style: form
      - description: |
          Expected Owner of the Application in the Import Environment
        explode: true
        in: query
        name: appOwner
        required: false
        schema:
          type: string
        style: form
      - description: |
          Skip importing Keys of the Application
        explode: true
        in: query
        name: skipApplicationKeys
        required: false
        schema:
          type: boolean
        style: form
      - description: |
          Update if application exists
        explode: true
        in: query
        name: update
        required: false
        schema:
          type: boolean
        style: form
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    Zip archive consisting of exported Application Configuration.
                  format: binary
                  type: string
              required:
              - file
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationInfo'
          description: |
            OK.
            Successful response with the updated object information as entity in the body.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "207":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIInfoList'
          description: |
            Multi Status.
            Partially successful response with skipped APIs information object as entity in the body.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:app_import_export
      summary: Import an Application
      tags:
      - Application (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -F file=@exported-application.zip "https://127.0.0.1:9443/api/am/admin/v4/import/applications?preserveOwner=true&skipSubscriptions=false&appOwner=admin&skipApplicationKeys=false&update=true"'
      x-contentType: multipart/form-data
      x-accepts: application/json
  /import/api:
    post:
      description: |
        This operation can be used to import an API.
      parameters:
      - description: |
          Preserve Original Provider of the API. This is the user choice to keep or replace the API provider.
        explode: true
        in: query
        name: preserveProvider
        required: false
        schema:
          type: boolean
        style: form
      - description: |
          Whether to update the API or not. This is used when updating already existing APIs.
        explode: true
        in: query
        name: overwrite
        required: false
        schema:
          type: boolean
        style: form
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    Zip archive consisting on exported api configuration
                  format: binary
                  type: string
              required:
              - file
        required: true
      responses:
        "200":
          content: {}
          description: |
            Created.
            API Imported Successfully.
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "409":
          content:
            application/json:
              example:
                code: 409
                message: Conflict
                description: Specified resource already exists
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict. Specified resource already exists.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_import_export
      summary: Import an API
      tags:
      - API (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -F file=@admin-PizzaShackAPI-1.0.0.zip "https://127.0.0.1:9443/api/am/admin/v4/import/api?preserveProvider=false&overwrite=false"'
      x-contentType: multipart/form-data
      x-accepts: application/json
  /import/api-product:
    post:
      description: |
        This operation can be used to import an API Product.
      parameters:
      - description: |
          Preserve Original Provider of the API Product. This is the user choice to keep or replace the API Product provider.
        explode: true
        in: query
        name: preserveProvider
        required: false
        schema:
          type: boolean
        style: form
      - description: |
          Whether to import the dependent APIs or not.
        explode: true
        in: query
        name: importAPIs
        required: false
        schema:
          type: boolean
        style: form
      - description: |
          Whether to update the API Product or not. This is used when updating already existing API Products.
        explode: true
        in: query
        name: overwriteAPIProduct
        required: false
        schema:
          type: boolean
        style: form
      - description: |
          Whether to update the dependent APIs or not. This is used when updating already existing dependent APIs of an API Product.
        explode: true
        in: query
        name: overwriteAPIs
        required: false
        schema:
          type: boolean
        style: form
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    Zip archive consisting on exported API Product configuration
                  format: binary
                  type: string
              required:
              - file
        required: true
      responses:
        "200":
          content: {}
          description: |
            Created.
            API Product Imported Successfully.
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "409":
          content:
            application/json:
              example:
                code: 409
                message: Conflict
                description: Specified resource already exists
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict. Specified resource already exists.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_product_import_export
      summary: Import an API Product
      tags:
      - API Product (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -F file=@exportAPIProduct.zip "https://127.0.0.1:9443/api/am/admin/v4/import/api-product?preserveProvider=false&overwriteAPIProduct=false&overwriteAPIs=false&importAPIs=false"'
      x-contentType: multipart/form-data
      x-accepts: application/json
  /labels:
    get:
      description: |
        Get all Registered Labels
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LabelList'
          description: |
            OK.
            Labels returned
      security:
      - OAuth2Security:
        - apim:admin
        - apim:label_read
      summary: Get all registered Labels
      tags:
      - Label Collection
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/labels"'
      x-accepts: application/json
    post:
      description: |
        Add a new gateway label
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Label'
        description: |
          Label object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Label'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:label_manage
      summary: Add a Label
      tags:
      - Label
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/labels"'
      x-contentType: application/json
      x-accepts: application/json
  /labels/{labelId}:
    delete:
      description: |
        Delete a Label by label Id
      parameters:
      - description: |
          Label UUID
        explode: false
        in: path
        name: labelId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Label successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:label_manage
      summary: Delete a Label
      tags:
      - Label
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/labels/d7cf8523-9180-4255-84fa-6cb171c1f779"'
      x-accepts: application/json
    put:
      description: |
        Update a Label by label Id
      parameters:
      - description: |
          Label UUID
        explode: false
        in: path
        name: labelId
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Label'
        description: |
          Label object with updated information
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Label'
          description: |
            OK.
            Label updated.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:label_manage
      summary: Update a Label
      tags:
      - Label
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/labels/d7cf8523-9180-4255-84fa-6cb171c1f779"'
      x-contentType: application/json
      x-accepts: application/json
  /environments:
    get:
      description: |
        Get all Registered Environments
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentList'
          description: |
            OK.
            Environments returned
      security:
      - OAuth2Security:
        - apim:admin
        - apim:environment_read
      summary: Get all registered Environments
      tags:
      - Environment Collection
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/environments"'
      x-accepts: application/json
    post:
      description: |
        Add a new geteway environment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Environment'
        description: |
          Environment object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:environment_manage
      summary: Add an Environment
      tags:
      - Environment
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/environments"'
      x-contentType: application/json
      x-accepts: application/json
  /environments/{environmentId}:
    delete:
      description: |
        Delete a Environment by Environment Id
      parameters:
      - description: |
          Environment UUID (or Environment name defined in config)
        explode: false
        in: path
        name: environmentId
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Environment successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:environment_manage
      summary: Delete an Environment
      tags:
      - Environment
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/environments/d7cf8523-9180-4255-84fa-6cb171c1f779"'
      x-accepts: application/json
    put:
      description: |
        Update a gateway Environment by environment Id
      parameters:
      - description: |
          Environment UUID (or Environment name defined in config)
        explode: false
        in: path
        name: environmentId
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Environment'
        description: |
          Environment object with updated information
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Environment'
          description: |
            OK.
            Environment updated.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:environment_manage
      summary: Update an Environment
      tags:
      - Environment
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/environments/d7cf8523-9180-4255-84fa-6cb171c1f779"'
      x-contentType: application/json
      x-accepts: application/json
  /bot-detection-data:
    get:
      description: |
        Get all bot detected data
      operationId: getBotDetectionData
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotDetectionDataList'
          description: |
            OK.
            Bot detected data returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:bot_data
      summary: |
        Get all Bot Detected Data
      tags:
      - Bot Detection Data
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/bot-detection-data"'
      x-accepts: application/json
  /monetization/publish-usage:
    post:
      description: |
        Publish usage records of monetized APIs
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishStatus'
          description: Usage records successfully published.
        "202":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishStatus'
          description: Request is sucessfully accepted for processing.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:monetization_usage_publish
      summary: Publish Usage Records
      tags:
      - Monetization (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/monetization/publish-usage"'
      x-accepts: application/json
  /monetization/publish-usage/status:
    get:
      description: |
        Get the status of monetization usage publisher
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonetizationUsagePublishInfo'
          description: |
            OK.
            Status returned
      security:
      - OAuth2Security:
        - apim:admin
        - apim:monetization_usage_publish
      summary: Get the Status of Monetization Usage Publisher
      tags:
      - Monetization (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/monetization/publish-usage/status"'
      x-accepts: application/json
  /workflows:
    get:
      description: |
        This operation can be used to retrieve list of workflow pending processes.
      parameters:
      - description: |
          Maximum size of resource array to return.
        explode: true
        in: query
        name: limit
        required: false
        schema:
          default: 25
          type: integer
        style: form
      - description: |
          Starting point within the complete list of items qualified.
        explode: true
        in: query
        name: offset
        required: false
        schema:
          default: 0
          type: integer
        style: form
      - description: |
          Media types acceptable for the response. Default is application/json.
        explode: false
        in: header
        name: Accept
        required: false
        schema:
          default: application/json
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          We need to show the values of each workflow process separately .for that we use workflow type.
          Workflow type can be AM_APPLICATION_CREATION, AM_SUBSCRIPTION_CREATION,   AM_USER_SIGNUP, AM_APPLICATION_REGISTRATION_PRODUCTION, AM_APPLICATION_REGISTRATION_SANDBOX.
        explode: true
        in: query
        name: workflowType
        required: false
        schema:
          enum:
          - AM_APPLICATION_CREATION
          - AM_SUBSCRIPTION_CREATION
          - AM_USER_SIGNUP
          - AM_APPLICATION_REGISTRATION_PRODUCTION
          - AM_APPLICATION_REGISTRATION_SANDBOX
          - AM_SUBSCRIPTION_DELETION
          - AM_APPLICATION_DELETION
          - AM_API_STATE
          - AM_API_PRODUCT_STATE
          - AM_REVISION_DEPLOYMENT
          type: string
        style: form
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowList'
          description: |
            OK.
            Workflow pendding process list returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_workflow_view
      summary: |
        Retrieve All Pending Workflow Processes
      tags:
      - Workflow (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/workflows"'
      x-accepts: application/json
  /workflows/{externalWorkflowRef}:
    get:
      description: |
        Using this operation, you can retrieve complete details of a pending workflow request that either belongs to application creation, application subscription, application registration, api state change, user self sign up.. You need to provide the External_Workflow_Reference of the workflow Request to retrive it.
      parameters:
      - description: |
          from the externel workflow reference we decide what is the the pending request that the are requesting.
        explode: false
        in: path
        name: externalWorkflowRef
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowInfo'
          description: |
            OK.
            Requested Workflow Pending is returned
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_workflow_view
      summary: |
        Get Pending Workflow Details by External Workflow Reference
      tags:
      - Workflows (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/workflows/c43a325c-260b-4302-81cb-768eafaa3aed"'
      x-accepts: application/json
  /workflows/update-workflow-status:
    post:
      description: |
        This operation can be used to approve or reject a workflow task.
      parameters:
      - description: |
          Workflow reference id
        explode: true
        in: query
        name: workflowReferenceId
        required: true
        schema:
          type: string
        style: form
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Workflow'
        description: |
          Workflow event that need to be updated
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workflow'
          description: |
            OK.
            Workflow request information is returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_workflow_approve
      summary: Update Workflow Status
      tags:
      - Workflows (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/workflows/update-workflow-status?workflowReferenceId=56e3a170-a7a7-45f8-b051-7e43a58a67e1"'
      x-contentType: application/json
      x-accepts: application/json
  /tenant-info/{username}:
    get:
      description: |
        This operation is to get tenant id of the provided user
      operationId: getTenantInfoByUsername
      parameters:
      - description: |
          The state represents the current state of the tenant. Supported states are [ active, inactive]
        explode: false
        in: path
        name: username
        required: true
        schema:
          default: john
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantInfo'
          description: |
            OK.
            Tenant id of the user retrieved.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tenantInfo
      summary: |
        Get Tenant Id of User
      tags:
      - Tenants
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/tenant-info/john"'
      x-accepts: application/json
  /custom-urls/{tenantDomain}:
    get:
      description: |
        This operation is to get custom-url information of the provided tenant-domain
      operationId: getCustomUrlInfoByTenantDomain
      parameters:
      - description: |
          The tenant domain name.
        explode: false
        in: path
        name: tenantDomain
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomUrlInfo'
          description: |
            OK.
            Custom url info of the tenant is retrieved.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tenantInfo
      summary: |
        Get Custom URL Info of a Tenant Domain
      tags:
      - Tenants
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/custom-urls/wso2.com"'
      x-accepts: application/json
  /api-categories:
    get:
      description: |
        Get all API categories
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APICategoryList'
          description: |
            OK.
            Categories returned
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Get all API Categories
      tags:
      - API Category (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/api-categories"'
      x-accepts: application/json
    post:
      description: |
        Add a new API category
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APICategory'
        description: |
          API Category object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APICategory'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Add API Category
      tags:
      - API Category (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/api-categories"'
      x-contentType: application/json
      x-accepts: application/json
  /api-categories/{apiCategoryId}:
    delete:
      description: |
        Delete an API Category by API Category Id
      parameters:
      - description: |
          API Category UUID
        explode: false
        in: path
        name: apiCategoryId
        required: true
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on ETag (Will be supported in future).
        explode: false
        in: header
        name: If-Match
        required: false
        schema:
          type: string
        style: simple
      - description: |
          Validator for conditional requests; based on Last Modified header (Will be supported in future).
        explode: false
        in: header
        name: If-Unmodified-Since
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            API Category successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Delete an API Category
      tags:
      - API Category (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/api-categories/d7cf8523-9180-4255-84fa-6cb171c1f779"'
      x-accepts: application/json
    put:
      description: |
        Update an API Category by category Id
      parameters:
      - description: |
          API Category UUID
        explode: false
        in: path
        name: apiCategoryId
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APICategory'
        description: |
          API Category object with updated information
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APICategory'
          description: |
            OK.
            Label updated.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Update an API Category
      tags:
      - API Category (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/api-categories/d7cf8523-9180-4255-84fa-6cb171c1f779"'
      x-contentType: application/json
      x-accepts: application/json
  /settings:
    get:
      description: |
        Retreive admin settings
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Settings'
          description: |
            OK.
            Settings returned
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_settings
      summary: Retreive Admin Settings
      tags:
      - Settings
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/settings"'
      x-accepts: application/json
  /alert-types:
    get:
      description: |
        This operation is used to get the list of supportd alert types for the apim admin dashboard
      operationId: getAdminAlertTypes
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertTypesList'
          description: |
            OK.
            The list of admin alert types are returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_alert_manage
      summary: |
        Get all Admin Alert Types
      tags:
      - Alerts
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/alert-types"'
      x-accepts: application/json
  /alert-subscriptions:
    delete:
      description: |
        This operation is used to unsubscribe the respective user from all the admin alert types.
      operationId: unsubscribeAllAlerts
      responses:
        "200":
          content: {}
          description: |
            OK.
            The user is unsubscribed from the alerts successfully.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_alert_manage
      summary: |
        Unsubscribe User from all Admin Alerts
      tags:
      - Alert Subscriptions
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/alert-subscriptions"'
      x-accepts: application/json
    get:
      description: |
        This operation is used to get the list of subscribed alert types by the user.
      operationId: getSubscribedAlertTypes
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertsSubscription'
          description: |
            OK.
            The list of subscribed alert types are returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_alert_manage
      summary: |
        Get Subscribed Alert Types
      tags:
      - Alert Subscriptions
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/alert-subscriptions"'
      x-accepts: application/json
    put:
      description: |
        This operation is used to subscribe to admin alerts
      operationId: subscribeToAlerts
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertsSubscription'
        description: The alerts list and the email list to subscribe.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertsSubscription'
          description: |
            OK.
            Successful response with the newly subscribed alerts.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_alert_manage
      summary: |
        Subscribe to an Admin Alert
      tags:
      - Alert Subscriptions
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/alert-subscriptions"'
      x-contentType: application/json
      x-accepts: application/json
  /alert-subscriptions/bot-detection:
    get:
      description: |
        Get the list of subscriptions which are subscribed to receive email alerts for bot detection
      operationId: getBotDetectionAlertSubscriptions
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotDetectionAlertSubscriptionList'
          description: |
            OK.
            The list of bot detection alert subscriptions are returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_alert_manage
      summary: |
        Get Subscriptions for Bot Detection
      tags:
      - Bot Detection Alert Subscriptions
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/alert-subscriptions/bot-detection"'
      x-accepts: application/json
    post:
      description: |
        Register a subscription for bot detection alerts
      operationId: subscribeForBotDetectionAlerts
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BotDetectionAlertSubscription'
        description: |
          The email to register to receive bot detection alerts
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotDetectionAlertSubscription'
          description: |
            OK.
            Bot detection alert subscription is registered successfully.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_alert_manage
      summary: Subscribe for Bot Detection Alerts
      tags:
      - Bot Detection Alert Subscriptions
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/alert-subscriptions/bot-detection"'
      x-contentType: application/json
      x-accepts: application/json
  /alert-subscriptions/bot-detection/{uuid}:
    delete:
      description: |
        Delete a Bot Detection Alert Subscription
      operationId: unsubscribeFromBotDetectionAlerts
      parameters:
      - description: uuid of the subscription
        explode: false
        in: path
        name: uuid
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Bot detection alert subscription is deleted successfully.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_alert_manage
      summary: Unsubscribe from bot detection alerts.
      tags:
      - Bot Detection Alert Subscriptions
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/alert-subscriptions/bot-detection"'
      x-accepts: application/json
  /system-scopes/{scopeName}:
    get:
      description: |
        This operation will return the scope list of particular user
        In order to get it, we need to pass the userId as a query parameter
      operationId: systemScopesScopeNameGet
      parameters:
      - explode: true
        in: query
        name: username
        required: false
        schema:
          type: string
        style: form
      - description: |
          scope name to be validated
        explode: false
        in: path
        name: scopeName
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScopeSettings'
          description: |
            OK.
            Particular scope exists for the given user.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:scope_manage
      summary: Retrieve Scopes for a Particular User
      tags:
      - System Scopes
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/system-scopes/YXBpbTpzdWJzY3JpYmU?username=john"'
      x-accepts: application/json
  /system-scopes:
    get:
      description: |
        This operation is used to get the list of role scope mapping from tenant-conf for the apim admin dashboard
      operationId: systemScopesGet
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScopeList'
          description: |
            OK.
            The list of role scope mappings are returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:scope_manage
        - apim:admin
      summary: |
        Get Role Scope Mappings
      tags:
      - System Scopes
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/system-scopes"'
      x-accepts: application/json
    put:
      description: |
        This operation is used to update the roles for all scopes
      operationId: updateRolesForScope
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScopeList'
        description: |
          Scope list object with updated scope to role mappings
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScopeList'
          description: |
            OK.
            Successful response with the newly added roles.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:scope_manage
      summary: |
        Update Roles For Scope
      tags:
      - System Scopes
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/system-scopes"'
      x-contentType: application/json
      x-accepts: application/json
  /system-scopes/role-aliases:
    get:
      description: |
        This operation can be used to retreive role alias mapping
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleAliasList'
          description: |
            OK.
            The list of role mappings are returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:scope_manage
      summary: Retrieve Role Alias Mappings
      tags:
      - System Scopes
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/system-scopes/role-aliases"'
      x-accepts: application/json
    put:
      description: |
        This operation can be used to add a new role alias mapping for system scope roles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleAliasList'
        description: role-alias mapping
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleAliasList'
          description: |
            OK.
            Role mapping alias returned
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:scope_manage
        - apim:admin
      summary: Add a New Role Alias
      tags:
      - System Scopes
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/system-scopes/role-aliases"'
      x-contentType: application/json
      x-accepts: application/json
  /tenant-theme:
    get:
      description: |
        This operation can be used to export a DevPortal tenant theme as a zip file.
      operationId: exportTenantTheme
      responses:
        "200":
          content:
            application/zip:
              schema:
                format: binary
                type: string
          description: |
            OK.
            Tenant Theme Exported Successfully.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tenant_theme_manage
      summary: Export a DevPortal Tenant Theme
      tags:
      - Tenant Theme
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/tenant-theme" > theme.zip'
      x-accepts: application/json
    put:
      description: |
        This operation can be used to import a DevPortal tenant theme.
      operationId: importTenantTheme
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    Zip archive consisting of tenant theme configuration
                  format: binary
                  type: string
              required:
              - file
        required: true
      responses:
        "200":
          content: {}
          description: |
            Ok.
            Tenant Theme Imported Successfully.
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "413":
          content:
            application/json:
              example:
                code: 413
                message: Payload Too Large
                description: Request entity is larger than limits defined by server
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Payload Too Large. Request entity is larger than limits defined
            by server.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:tenant_theme_manage
      summary: Import a DevPortal Tenant Theme
      tags:
      - Tenant Theme
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -F file=@theme.zip "https://127.0.0.1:9443/api/am/admin/v4/tenant-theme"'
      x-contentType: multipart/form-data
      x-accepts: application/json
  /tenant-config:
    get:
      description: |
        This operation can be used to export a tenant-config.json used in deployment.
      operationId: exportTenantConfig
      responses:
        "200":
          content:
            application/json:
              schema:
                type: string
          description: |
            OK.
            Tenant config Exported Successfully.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
      summary: Export a tenant-Config.
      tags:
      - Tenant Config
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/tenant-config" > tenant-config.json'
      x-accepts: application/json
    put:
      description: |
        This operation can be used to update tenant-config.
      operationId: updateTenantConfig
      requestBody:
        content:
          application/json:
            schema:
              type: object
        description: tenant-config
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
          description: |
            OK.
            Role mapping alias returned
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "413":
          content:
            application/json:
              example:
                code: 413
                message: Payload Too Large
                description: Request entity is larger than limits defined by server
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Payload Too Large. Request entity is larger than limits defined
            by server.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
      summary: Update a tenant-config.
      tags:
      - Tenant Config
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/tenant-config"'
      x-contentType: application/json
      x-accepts: application/json
  /tenant-config-schema:
    get:
      description: |
        This operation can be used to export a tenant-config-schema.json used in deployment.
      operationId: exportTenantConfigSchema
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
          description: |
            OK.
            Tenant config schema exported successfully.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "403":
          content:
            application/json:
              example:
                code: 403
                message: Forbidden
                description: The request must be conditional but no condition has
                  been specified
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden. The request must be conditional but no condition
            has been specified.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "500":
          content:
            application/json:
              example:
                code: 500
                message: Internal Server Error
                description: The server encountered an internal error. Please contact
                  administrator.
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error.
      security:
      - OAuth2Security:
        - apim:admin
      summary: Export a tenant-Config-Schema.
      tags:
      - Tenant Config Schema
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/tenant-config-schema" > tenant-config-schema.json'
      x-accepts: application/json
  /key-managers:
    get:
      description: |
        Get all Key managers
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyManagerList'
          description: |
            OK.
            KeyManagers returned
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Get all Key managers
      tags:
      - Key Manager (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/key-managers"'
      x-accepts: application/json
    post:
      description: |
        Add a new API Key Manager
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyManager'
        description: |
          Key Manager object that should to be added
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyManager'
          description: |
            Created.
            Successful response with the newly created object as entity in the body.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Add a new API Key Manager
      tags:
      - Key Manager (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/key-managers"'
      x-contentType: application/json
      x-accepts: application/json
  /key-managers/{keyManagerId}:
    delete:
      description: |
        Delete a Key Manager by keyManager id
      parameters:
      - description: |
          Key Manager UUID
        explode: false
        in: path
        name: keyManagerId
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          content: {}
          description: |
            OK.
            Key Manager successfully deleted.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Delete a Key Manager
      tags:
      - Key Manager (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X DELETE -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/key-managers/8d263942-a6df-4cc2-a804-7a2525501450"'
      x-accepts: application/json
    get:
      description: |
        Retrieve a single Key Manager Configuration. We should provide the Id of the KeyManager as a path parameter.
      parameters:
      - description: |
          Key Manager UUID
        explode: false
        in: path
        name: keyManagerId
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyManager'
          description: |
            OK.
            KeyManager Configuration returned
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Get a Key Manager Configuration
      tags:
      - Key Manager (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/admin/v4/key-managers/8d263942-a6df-4cc2-a804-7a2525501450"'
      x-accepts: application/json
    put:
      description: |
        Update a Key Manager by keyManager id
      parameters:
      - description: |
          Key Manager UUID
        explode: false
        in: path
        name: keyManagerId
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyManager'
        description: |
          Key Manager object with updated information
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyManager'
          description: |
            OK.
            Label updated.
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Update a Key Manager
      tags:
      - Key Manager (Individual)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" -d @data.json "https://127.0.0.1:9443/api/am/admin/v4/key-managers/8d263942-a6df-4cc2-a804-7a2525501450"'
      x-contentType: application/json
      x-accepts: application/json
  /key-managers/discover:
    post:
      description: |
        Retrieve well-known information from key manager's well-known endpoint
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                url:
                  description: Well-Known Endpoint
                  type: string
                type:
                  default: "false"
                  description: |
                    Key Manager Type
                  type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyManagerWellKnownResponse'
          description: |
            OK.
            KeyManagers returned
      security:
      - OAuth2Security:
        - apim:admin
        - apim:admin_operations
      summary: Retrieve Well-known information from Key Manager Well-known Endpoint
      tags:
      - Key Manager (Collection)
      x-code-samples:
      - lang: Shell
        source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -F "type=WSO2-IS" "https://127.0.0.1:9443/api/am/admin/v4/key-managers/discover"'
      x-contentType: multipart/form-data
      x-accepts: application/json
  /apis:
    get:
      description: |
        This operation provides you a list of available APIs qualifying under a given search condition.
        Each retrieved API is represented with a minimal amount of attributes. If you want to get complete details of an API, you need to use **Get details of an API** operation.
      operationId: getAllAPIs
      parameters:
      - description: |
          Maximum size of resource array to return.
        explode: true
        in: query
        name: limit
        required: false
        schema:
          default: 25
          type: integer
        style: form
      - description: |
          Starting point within the complete list of items qualified.
        explode: true
        in: query
        name: offset
        required: false
        schema:
          default: 0
          type: integer
        style: form
      - description: |
          **Search and get all apis in admin portal**.

          You can search by proving a keyword.
        explode: true
        in: query
        name: query
        required: false
        schema:
          type: string
        style: form
      - description: |
          Validator for conditional requests; based on the ETag of the formerly retrieved
          variant of the resource (Will be supported in future).
        explode: false
        in: header
        name: If-None-Match
        required: false
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultList'
          description: |
            OK.
            List of qualifying APIs is returned.
          headers:
            ETag:
              description: |
                Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future).
              explode: false
              schema:
                type: string
              style: simple
            Content-Type:
              description: The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "304":
          content: {}
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource (Will be supported in future).
        "406":
          content:
            application/json:
              example:
                code: 406
                message: Not Acceptable
                description: The requested media type is not supported
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Acceptable. The requested media type is not supported.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_provider_change
      summary: |
        Retrieve/Search APIs
      tags:
      - APIs
      x-code-samples:
      - lang: Curl
        source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          "https://127.0.0.1:9443/api/am/publisher/v4/apis"'
      x-accepts: application/json
  /apis/{apiId}/change-provider:
    post:
      description: |
        Update the api provider
      operationId: providerNamePost
      parameters:
      - explode: true
        in: query
        name: provider
        required: true
        schema:
          type: string
        style: form
      - description: |
          **API ID** consisting of the **UUID** of the API.
        explode: false
        in: path
        name: apiId
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          description: |
            OK.
            Api Provider updated.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              explode: false
              schema:
                type: string
              style: simple
        "400":
          content:
            application/json:
              example:
                code: 400
                message: Bad Request
                description: Invalid request or validation error
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request. Invalid request or validation error.
        "404":
          content:
            application/json:
              example:
                code: 404
                message: Not Found
                description: The specified resource does not exist
                moreInfo: ""
                error: []
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found. The specified resource does not exist.
      security:
      - OAuth2Security:
        - apim:admin
        - apim:api_provider_change
      summary: Update the api provider
      tags:
      - Api Provider Change
      x-code-samples:
      - lang: Curl
        source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
          -H "Content-Type: application/json" "https://127.0.0.1:9443/api/am/admin/v4/provider/admin/apis/33662a62-8db1-4d75-af08-afd63c6bd0b4"'
      x-accepts: application/json
components:
  parameters:
    username:
      description: |
        username of the new application owner
      explode: true
      in: query
      name: username
      required: true
      schema:
        type: string
      style: form
    scopeName:
      description: |
        scope name to be validated
      explode: false
      in: path
      name: scopeName
      required: true
      schema:
        type: string
      style: simple
    labelId:
      description: |
        Label UUID
      explode: false
      in: path
      name: labelId
      required: true
      schema:
        type: string
      style: simple
    environmentId:
      description: |
        Environment UUID (or Environment name defined in config)
      explode: false
      in: path
      name: environmentId
      required: true
      schema:
        type: string
      style: simple
    policyId:
      description: |
        Thorttle policy UUID
      explode: false
      in: path
      name: policyId
      required: true
      schema:
        type: string
      style: simple
    ruleId:
      description: |
        Custom rule UUID
      explode: false
      in: path
      name: ruleId
      required: true
      schema:
        type: string
      style: simple
    applicationId:
      description: |
        Application UUID
      explode: false
      in: path
      name: applicationId
      required: true
      schema:
        type: string
      style: simple
    conditionId:
      description: |
        Blocking condition identifier
      explode: false
      in: path
      name: conditionId
      required: true
      schema:
        type: string
      style: simple
    Accept:
      description: |
        Media types acceptable for the response. Default is application/json.
      explode: false
      in: header
      name: Accept
      required: false
      schema:
        default: application/json
        type: string
      style: simple
    Content-Type:
      description: |
        Media type of the entity in the body. Default is application/json.
      explode: false
      in: header
      name: Content-Type
      required: true
      schema:
        default: application/json
        type: string
      style: simple
    If-None-Match:
      description: |
        Validator for conditional requests; based on the ETag of the formerly retrieved
        variant of the resource (Will be supported in future).
      explode: false
      in: header
      name: If-None-Match
      required: false
      schema:
        type: string
      style: simple
    If-Modified-Since:
      description: |
        Validator for conditional requests; based on Last Modified header of the
        formerly retrieved variant of the resource (Will be supported in future).
      explode: false
      in: header
      name: If-Modified-Since
      required: false
      schema:
        type: string
      style: simple
    If-Match:
      description: |
        Validator for conditional requests; based on ETag (Will be supported in future).
      explode: false
      in: header
      name: If-Match
      required: false
      schema:
        type: string
      style: simple
    If-Unmodified-Since:
      description: |
        Validator for conditional requests; based on Last Modified header (Will be supported in future).
      explode: false
      in: header
      name: If-Unmodified-Since
      required: false
      schema:
        type: string
      style: simple
    limit:
      description: |
        Maximum size of resource array to return.
      explode: true
      in: query
      name: limit
      required: false
      schema:
        default: 25
        type: integer
      style: form
    offset:
      description: |
        Starting point within the complete list of items qualified.
      explode: true
      in: query
      name: offset
      required: false
      schema:
        default: 0
        type: integer
      style: form
    mediationPolicyId:
      description: |
        Mediation policy Id
      explode: false
      in: path
      name: mediationPolicyId
      required: true
      schema:
        type: string
      style: simple
    user:
      description: |
        username of the application creator
      explode: true
      in: query
      name: user
      required: false
      schema:
        type: string
      style: form
    workflowReferenceId-Q:
      description: |
        Workflow reference id
      explode: true
      in: query
      name: workflowReferenceId
      required: true
      schema:
        type: string
      style: form
    apiCategoryId:
      description: |
        API Category UUID
      explode: false
      in: path
      name: apiCategoryId
      required: true
      schema:
        type: string
      style: simple
    keyManagerId:
      description: |
        Key Manager UUID
      explode: false
      in: path
      name: keyManagerId
      required: true
      schema:
        type: string
      style: simple
    apiId:
      description: |
        **API ID** consisting of the **UUID** of the API.
      explode: false
      in: path
      name: apiId
      required: true
      schema:
        type: string
      style: simple
  responses:
    BadRequest:
      content:
        application/json:
          example:
            code: 400
            message: Bad Request
            description: Invalid request or validation error
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Bad Request. Invalid request or validation error.
    Conflict:
      content:
        application/json:
          example:
            code: 409
            message: Conflict
            description: Specified resource already exists
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Conflict. Specified resource already exists.
    Forbidden:
      content:
        application/json:
          example:
            code: 403
            message: Forbidden
            description: The request must be conditional but no condition has been
              specified
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Forbidden. The request must be conditional but no condition has
        been specified.
    InternalServerError:
      content:
        application/json:
          example:
            code: 500
            message: Internal Server Error
            description: The server encountered an internal error. Please contact
              administrator.
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error.
    NotAcceptable:
      content:
        application/json:
          example:
            code: 406
            message: Not Acceptable
            description: The requested media type is not supported
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Not Acceptable. The requested media type is not supported.
    NotFound:
      content:
        application/json:
          example:
            code: 404
            message: Not Found
            description: The specified resource does not exist
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Not Found. The specified resource does not exist.
    PayloadTooLarge:
      content:
        application/json:
          example:
            code: 413
            message: Payload Too Large
            description: Request entity is larger than limits defined by server
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Payload Too Large. Request entity is larger than limits defined
        by server.
    PreconditionFailed:
      content:
        application/json:
          example:
            code: 412
            message: Precondition Failed
            description: The request has not been performed because one of the preconditions
              is not met
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Precondition Failed. The request has not been performed because
        one of the preconditions is not met.
    Unauthorized:
      content:
        application/json:
          example:
            code: 401
            message: Unauthorized
            description: The user is not authorized
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Unauthorized. The user is not authorized.
    UnsupportedMediaType:
      content:
        application/json:
          example:
            code: 415
            message: Unsupported media type
            description: The entity of the request was not in a supported format
            moreInfo: ""
            error: []
          schema:
            $ref: '#/components/schemas/Error'
      description: Unsupported Media Type. The entity of the request was not in a
        supported format.
  schemas:
    Error:
      properties:
        code:
          description: Error code
          format: int64
          type: integer
        message:
          description: Error message.
          type: string
        description:
          description: |
            A detail description about the error message.
          type: string
        moreInfo:
          description: |
            Preferably an url with more details about the error.
          type: string
        error:
          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'
          type: array
      required:
      - code
      - message
      title: Error object returned with 4XX HTTP status
      type: object
    ErrorListItem:
      properties:
        code:
          description: Error code
          type: string
        message:
          description: |
            Description about individual errors occurred
          type: string
      required:
      - code
      - message
      title: Description of individual errors that may have occurred during a request.
      type: object
    ThrottlePolicyDetailsList:
      example:
        count: 1
        list:
        - policyId: 3
          policyName: 30PerMin
          displayName: 30PerMin
          isDeployed: false
          description: Allows 30 request per minute
          type: type
          uuid: 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93
        - policyId: 3
          policyName: 30PerMin
          displayName: 30PerMin
          isDeployed: false
          description: Allows 30 request per minute
          type: type
          uuid: 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93
      properties:
        count:
          description: |
            Number of Throttling Policies returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/ThrottlePolicyDetails'
          type: array
      title: Policy List
      type: object
    ThrottlePolicyDetails:
      example:
        policyId: 3
        policyName: 30PerMin
        displayName: 30PerMin
        isDeployed: false
        description: Allows 30 request per minute
        type: type
        uuid: 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93
      properties:
        policyId:
          description: Id of policy
          example: 3
          readOnly: true
          type: integer
        uuid:
          description: UUId of policy
          example: 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93
          readOnly: true
          type: string
        policyName:
          description: Name of policy
          example: 30PerMin
          maxLength: 60
          minLength: 1
          type: string
        displayName:
          description: Display name of the policy
          example: 30PerMin
          maxLength: 512
          type: string
        description:
          description: Description of the policy
          example: Allows 30 request per minute
          maxLength: 1024
          type: string
        isDeployed:
          default: false
          description: Indicates whether the policy is deployed successfully or not.
          type: boolean
        type:
          description: Indicates the type of throttle policy
          type: string
      required:
      - policyName
      title: Generic Policy
      type: object
    ThrottlePolicy:
      discriminator:
        propertyName: type
      properties:
        policyId:
          description: Id of policy
          example: 0c6439fd-9b16-3c2e-be6e-1086e0b9aa93
          readOnly: true
          type: string
        policyName:
          description: Name of policy
          example: 30PerMin
          maxLength: 60
          minLength: 1
          type: string
        displayName:
          description: Display name of the policy
          example: 30PerMin
          maxLength: 512
          type: string
        description:
          description: Description of the policy
          example: Allows 30 request per minute
          maxLength: 1024
          type: string
        isDeployed:
          default: false
          description: Indicates whether the policy is deployed successfully or not.
          type: boolean
        type:
          description: Indicates the type of throttle policy
          type: string
      required:
      - policyName
      title: Generic Throttling Policy
      type: object
    ExportThrottlePolicy:
      example:
        data: '{}'
        subtype: subtype
        type: type
        version: version
      properties:
        type:
          type: string
        subtype:
          type: string
        version:
          type: string
        data:
          type: object
      title: Export Throttling Policy
      type: object
    AdvancedThrottlePolicyInfo:
      allOf:
      - $ref: '#/components/schemas/ThrottlePolicy'
      - $ref: '#/components/schemas/AdvancedThrottlePolicyInfo_allOf'
      title: Advanced Throttling Policy
    AdvancedThrottlePolicy:
      allOf:
      - $ref: '#/components/schemas/ThrottlePolicy'
      - $ref: '#/components/schemas/AdvancedThrottlePolicy_allOf'
      title: Advanced Throttling Policy
    AdvancedThrottlePolicyList:
      example:
        count: 1
        list:
        - null
        - null
      properties:
        count:
          description: |
            Number of Advanced Throttling Policies returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/AdvancedThrottlePolicyInfo'
          type: array
      title: Advanced Throttling Policy List
      type: object
    ApplicationThrottlePolicy:
      allOf:
      - $ref: '#/components/schemas/ThrottlePolicy'
      - $ref: '#/components/schemas/ApplicationThrottlePolicy_allOf'
      title: Application Throttling Policy
    ApplicationThrottlePolicyList:
      example:
        count: 1
        list:
        - null
        - null
      properties:
        count:
          description: |
            Number of Application Throttling Policies returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/ApplicationThrottlePolicy'
          type: array
      title: Application Level Throttling Policy List
      type: object
    SubscriptionThrottlePolicy:
      allOf:
      - $ref: '#/components/schemas/ThrottlePolicy'
      - $ref: '#/components/schemas/GraphQLQuery'
      - $ref: '#/components/schemas/SubscriptionThrottlePolicy_allOf'
      title: Subscription Throttling Policy
    SubscriptionThrottlePolicyPermission:
      properties:
        permissionType:
          enum:
          - ALLOW
          - DENY
          example: deny
          type: string
        roles:
          example:
          - Internal/everyone
          items:
            type: string
          type: array
      required:
      - permissionType
      - roles
      title: SubscriptionThrottlePolicyPermission
      type: object
    GraphQLQuery:
      properties:
        graphQLMaxComplexity:
          description: Maximum Complexity of the GraphQL query
          example: 400
          type: integer
        graphQLMaxDepth:
          description: Maximum Depth of the GraphQL query
          example: 10
          type: integer
      title: GraphQL Query
      type: object
    SubscriptionThrottlePolicyList:
      example:
        count: 1
        list:
        - null
        - null
      properties:
        count:
          description: |
            Number of Subscription Throttling Policies returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/SubscriptionThrottlePolicy'
          type: array
      title: Subscription Level Throttling Policy List
      type: object
    CustomRule:
      allOf:
      - $ref: '#/components/schemas/ThrottlePolicy'
      - $ref: '#/components/schemas/CustomRule_allOf'
      title: Custom Rule
    CustomRuleList:
      example:
        count: 1
        list:
        - null
        - null
      properties:
        count:
          description: |
            Number of Custom Rules returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/CustomRule'
          type: array
      title: Custom Rule List
      type: object
    ConditionalGroup:
      properties:
        description:
          description: Description of the Conditional Group
          type: string
        conditions:
          description: |
            Individual throttling conditions. They can be defined as either HeaderCondition, IPCondition, JWTClaimsCondition, QueryParameterCondition
            Please see schemas of each of those throttling condition in Definitions section.
          example: |
            [
              {
                "type": "HEADERCONDITION",
                "invertCondition": false,
                "headerCondition":
                {
                  "headerName": "Host",
                  "headerValue": "10.100.7.77"
                }
              },
              {
                "type": "IPCONDITION",
                "invertCondition": false,
                "ipCondition":
                {
                  "ipConditionType": "IPSPECIFIC",
                  "specificIP": "10.100.1.22",
                  "startingIP": null,
                  "endingIP": null
                }
              },
              {
                "type": "QUERYPARAMETERCONDITION",
                "invertCondition": false,
                "queryParameterCondition":
                {
                  "parameterName": "name",
                  "parameterValue": "admin"
                }
              },
              {
                "type": "JWTCLAIMSCONDITION",
                "invertCondition": true,
                "jwtClaimsCondition":
                {
                  "claimUrl": "claimUrl0",
                  "attribute": "claimAttr0"
                }
              }
            ]
          items:
            $ref: '#/components/schemas/ThrottleCondition'
          type: array
        limit:
          $ref: '#/components/schemas/ThrottleLimit'
      required:
      - conditions
      - limit
      title: Conditional Groups for Throttling
      type: object
    ThrottleCondition:
      description: Conditions used for Throttling
      properties:
        type:
          description: |
            Type of the throttling condition. Allowed values are "HEADERCONDITION", "IPCONDITION", "JWTCLAIMSCONDITION"
            and "QUERYPARAMETERCONDITION".
          enum:
          - HEADERCONDITION
          - IPCONDITION
          - JWTCLAIMSCONDITION
          - QUERYPARAMETERCONDITION
          type: string
        invertCondition:
          default: false
          description: |
            Specifies whether inversion of the condition to be matched against the request.

            **Note:** When you add conditional groups for advanced throttling policies, this paramater should have the
            same value ('true' or 'false') for the same type of conditional group.
          type: boolean
        headerCondition:
          $ref: '#/components/schemas/HeaderCondition'
        ipCondition:
          $ref: '#/components/schemas/IPCondition'
        jwtClaimsCondition:
          $ref: '#/components/schemas/JWTClaimsCondition'
        queryParameterCondition:
          $ref: '#/components/schemas/QueryParameterCondition'
      required:
      - type
      title: Throttling Conditions
      type: object
    HeaderCondition:
      properties:
        headerName:
          description: Name of the header
          type: string
        headerValue:
          description: Value of the header
          type: string
      required:
      - headerName
      - headerValue
      title: HTTP Header based throttling condition
      type: object
    IPCondition:
      properties:
        ipConditionType:
          description: Type of the IP condition. Allowed values are "IPRANGE" and
            "IPSPECIFIC"
          enum:
          - IPRANGE
          - IPSPECIFIC
          type: string
        specificIP:
          description: Specific IP when "IPSPECIFIC" is used as the ipConditionType
          type: string
        startingIP:
          description: Staring IP when "IPRANGE" is used as the ipConditionType
          type: string
        endingIP:
          description: Ending IP when "IPRANGE" is used as the ipConditionType
          type: string
      required:
      - specificIP
      title: IP based throttling condition
      type: object
    JWTClaimsCondition:
      properties:
        claimUrl:
          description: JWT claim URL
          type: string
        attribute:
          description: Attribute to be matched
          type: string
      required:
      - attribute
      - claimUrl
      title: JWT claim attibute based throttling condition
      type: object
    QueryParameterCondition:
      properties:
        parameterName:
          description: Name of the query parameter
          type: string
        parameterValue:
          description: Value of the query parameter to be matched
          type: string
      required:
      - parameterName
      - parameterValue
      title: Query parameter based throttling condition
      type: object
    ThrottleLimitBase:
      properties:
        timeUnit:
          description: Unit of the time. Allowed values are "sec", "min", "hour",
            "day"
          example: min
          type: string
        unitTime:
          description: Time limit that the throttling limit applies.
          example: 10
          type: integer
      required:
      - timeUnit
      - unitTime
      title: Throttle Limit Base
      type: object
    ThrottleLimit:
      properties:
        type:
          description: |
            Type of the throttling limit. Allowed values are "REQUESTCOUNTLIMIT" and "BANDWIDTHLIMIT".
            Please see schemas of "RequestCountLimit" and "BandwidthLimit" throttling limit types in
            Definitions section.
          enum:
          - REQUESTCOUNTLIMIT
          - BANDWIDTHLIMIT
          - EVENTCOUNTLIMIT
          example: REQUESTCOUNTLIMIT
          type: string
        requestCount:
          $ref: '#/components/schemas/RequestCountLimit'
        bandwidth:
          $ref: '#/components/schemas/BandwidthLimit'
        eventCount:
          $ref: '#/components/schemas/EventCountLimit'
      required:
      - type
      title: Throttle Limit
      type: object
    BurstLimit:
      properties:
        rateLimitCount:
          description: Burst control request count
          example: 10
          type: integer
        rateLimitTimeUnit:
          description: Burst control time unit
          example: min
          type: string
      title: Burst Limit object
      type: object
    MonetizationInfo:
      properties:
        monetizationPlan:
          description: Flag to indicate the monetization plan
          enum:
          - FIXEDRATE
          - DYNAMICRATE
          example: FixedRate
          type: string
        properties:
          additionalProperties:
            type: string
          description: Map of custom properties related to each monetization plan
          type: object
      required:
      - monetizationPlan
      - properties
      title: API monetization details object
      type: object
    BandwidthLimit:
      allOf:
      - $ref: '#/components/schemas/ThrottleLimitBase'
      - $ref: '#/components/schemas/BandwidthLimit_allOf'
      title: Bandwidth Limit object
    RequestCountLimit:
      allOf:
      - $ref: '#/components/schemas/ThrottleLimitBase'
      - $ref: '#/components/schemas/RequestCountLimit_allOf'
      title: Request Count Limit object
    EventCountLimit:
      allOf:
      - $ref: '#/components/schemas/ThrottleLimitBase'
      - $ref: '#/components/schemas/EventCountLimit_allOf'
      title: Event Count Limit object
    BlockingCondition:
      description: Blocking Conditions
      example:
        conditionStatus: true
        conditionId: b513eb68-69e8-4c32-92cf-852c101363cf
        conditionValue:
          fixedIp: 192.168.1.1
          invert: false
        conditionType: IP
      properties:
        conditionId:
          description: Id of the blocking condition
          example: b513eb68-69e8-4c32-92cf-852c101363cf
          type: string
        conditionType:
          description: Type of the blocking condition
          enum:
          - API
          - APPLICATION
          - IP
          - IPRANGE
          - USER
          example: IP
          type: string
        conditionValue:
          description: Value of the blocking condition
          example:
            fixedIp: 192.168.1.1
            invert: false
          properties: {}
          type: object
        conditionStatus:
          description: Status of the blocking condition
          example: true
          type: boolean
      required:
      - conditionType
      - conditionValue
      title: Blocking Conditions
      type: object
    BlockingConditionList:
      example:
        count: 1
        list:
        - conditionStatus: true
          conditionId: b513eb68-69e8-4c32-92cf-852c101363cf
          conditionValue:
            fixedIp: 192.168.1.1
            invert: false
          conditionType: IP
        - conditionStatus: true
          conditionId: b513eb68-69e8-4c32-92cf-852c101363cf
          conditionValue:
            fixedIp: 192.168.1.1
            invert: false
          conditionType: IP
      properties:
        count:
          description: |
            Number of Blocking Conditions returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/BlockingCondition'
          type: array
      title: Blocking Conditions List
      type: object
    BlockingConditionStatus:
      description: Blocking Conditions Status
      properties:
        conditionId:
          description: Id of the blocking condition
          example: b513eb68-69e8-4c32-92cf-852c101363cf
          type: string
        conditionStatus:
          description: Status of the blocking condition
          example: true
          type: boolean
      required:
      - conditionStatus
      title: Blocking Conditions Status
      type: object
    CustomAttribute:
      properties:
        name:
          description: Name of the custom attribute
          example: customAttr1
          type: string
        value:
          description: Value of the custom attribute
          example: value1
          type: string
      required:
      - name
      - value
      title: Name-Value pair
      type: object
    mediationList:
      example:
        next: next
        previous: previous
        count: 1
        list:
        - name: json_fault.xml
          id: 01234567-0123-0123-0123-012345678901
          type: in
        - name: json_fault.xml
          id: 01234567-0123-0123-0123-012345678901
          type: in
      properties:
        count:
          description: |
            Number of mediation sequences returned.
          example: 1
          type: integer
        next:
          description: |
            Link to the next subset of sequences qualified.
            Empty if no more sequences are to be returned.
          type: string
        previous:
          description: |
            Link to the previous subset of sequences qualified.
            Empty if current subset is the first subset returned.
          type: string
        list:
          items:
            $ref: '#/components/schemas/MediationInfo'
          type: array
      title: Mediation List
      type: object
    MediationInfo:
      example:
        name: json_fault.xml
        id: 01234567-0123-0123-0123-012345678901
        type: in
      properties:
        name:
          example: json_fault.xml
          type: string
        id:
          example: 01234567-0123-0123-0123-012345678901
          type: string
        type:
          enum:
          - in
          - out
          - fault
          example: in
          type: string
      required:
      - id
      - name
      - type
      title: MediationInfo
      type: object
    Mediation:
      example:
        name: custom_log_in_message.xml
        id: 01234567-0123-0123-0123-012345678901
        type: IN
        config: <sequence xmlns="http://ws.apache.org/ns/synapse" name="custom_log_in_message">
          <log level="full"> <property name="IN_MESSAGE" value="IN_MESSAGE_21133232"/>
          </log> </sequence>
      properties:
        id:
          example: 01234567-0123-0123-0123-012345678901
          readOnly: true
          type: string
        name:
          example: custom_log_in_message.xml
          type: string
        type:
          enum:
          - IN
          - OUT
          - FAULT
          example: IN
          type: string
        config:
          example: <sequence xmlns="http://ws.apache.org/ns/synapse" name="custom_log_in_message">
            <log level="full"> <property name="IN_MESSAGE" value="IN_MESSAGE_21133232"/>
            </log> </sequence>
          type: string
      required:
      - config
      - name
      - type
      title: Mediation
      type: object
    ApplicationList:
      example:
        next: /applications?limit=1&offset=2&user=
        previous: /applications?limit=1&offset=0&user=
        count: 1
        list:
        - owner: admin
          groupId: groupId
          name: CalculatorApp
          applicationId: 01234567-0123-0123-0123-012345678901
          status: APPROVED
        - owner: admin
          groupId: groupId
          name: CalculatorApp
          applicationId: 01234567-0123-0123-0123-012345678901
          status: APPROVED
      properties:
        count:
          description: |
            Number of applications returned.
          example: 1
          type: integer
        next:
          description: |
            Link to the next subset of resources qualified.
            Empty if no more resources are to be returned.
          example: /applications?limit=1&offset=2&user=
          type: string
        previous:
          description: |
            Link to the previous subset of resources qualified.
            Empty if current subset is the first subset returned.
          example: /applications?limit=1&offset=0&user=
          type: string
        list:
          items:
            $ref: '#/components/schemas/ApplicationInfo'
          type: array
      title: Application List
      type: object
    ApplicationInfo:
      example:
        owner: admin
        groupId: groupId
        name: CalculatorApp
        applicationId: 01234567-0123-0123-0123-012345678901
        status: APPROVED
      properties:
        applicationId:
          example: 01234567-0123-0123-0123-012345678901
          type: string
        name:
          example: CalculatorApp
          type: string
        owner:
          example: admin
          type: string
        status:
          example: APPROVED
          type: string
        groupId:
          type: string
      title: Application info object with basic application details
      type: object
    APIInfoList:
      properties:
        count:
          description: |
            Number of API Info objects returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/APIInfo'
          type: array
      title: API Info List
      type: object
    APIInfo:
      properties:
        name:
          description: The name of the API.
          example: PizzaShackAPI
          type: string
        version:
          description: The version of the API
          example: 1.0.0
          type: string
        provider:
          description: The provider of the API
          example: admin
          type: string
      title: API info object with basic API details
      type: object
    Label:
      example:
        accessUrls:
        - http://localhost:9443/
        - http://localhost:9443/
        name: Public
        description: Label to use for public Gateway
        id: ece92bdc-e1e6-325c-b6f4-656208a041e9
      properties:
        id:
          example: ece92bdc-e1e6-325c-b6f4-656208a041e9
          readOnly: true
          type: string
        name:
          example: Public
          maxLength: 255
          minLength: 1
          type: string
        description:
          example: Label to use for public Gateway
          maxLength: 1024
          type: string
        accessUrls:
          items:
            example: http://localhost:9443/
            type: string
          type: array
      required:
      - name
      title: Label
      type: object
    LabelList:
      example:
        count: 1
        list:
        - accessUrls:
          - http://localhost:9443/
          - http://localhost:9443/
          name: Public
          description: Label to use for public Gateway
          id: ece92bdc-e1e6-325c-b6f4-656208a041e9
        - accessUrls:
          - http://localhost:9443/
          - http://localhost:9443/
          name: Public
          description: Label to use for public Gateway
          id: ece92bdc-e1e6-325c-b6f4-656208a041e9
      properties:
        count:
          description: |
            Number of Labels returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/Label'
          type: array
      title: Label List
      type: object
    Environment:
      example:
        endpointURIs:
        - protocol: default
          endpointURI: default
        - protocol: default
          endpointURI: default
        gatewayType: Regular
        isReadOnly: false
        provider: wso2
        displayName: US Region
        name: us-region
        description: Gateway environment in US Region
        id: ece92bdc-e1e6-325c-b6f4-656208a041e9
        additionalProperties:
        - value: wso2
          key: Organization
        - value: wso2
          key: Organization
        vhosts:
        - httpContext: pets
          wssPort: 8099
          httpPort: 80
          wsPort: 9099
          host: mg.wso2.com
          httpsPort: 443
        - httpContext: pets
          wssPort: 8099
          httpPort: 80
          wsPort: 9099
          host: mg.wso2.com
          httpsPort: 443
      properties:
        id:
          example: ece92bdc-e1e6-325c-b6f4-656208a041e9
          readOnly: true
          type: string
        name:
          example: us-region
          maxLength: 255
          minLength: 1
          pattern: (^[^~!@#;:%^*()+={}|\\<>"',&$\s+]*$)
          type: string
        displayName:
          example: US Region
          maxLength: 255
          minLength: 1
          type: string
        description:
          example: Gateway environment in US Region
          maxLength: 1023
          type: string
        provider:
          example: wso2
          type: string
        gatewayType:
          default: Regular
          example: Regular
          type: string
        isReadOnly:
          example: false
          readOnly: true
          type: boolean
        vhosts:
          items:
            $ref: '#/components/schemas/VHost'
          minItems: 1
          type: array
        endpointURIs:
          items:
            $ref: '#/components/schemas/GatewayEnvironmentProtocolURI'
          type: array
        additionalProperties:
          items:
            $ref: '#/components/schemas/AdditionalProperty'
          type: array
      required:
      - name
      - vhosts
      title: Environment
      type: object
    EnvironmentList:
      example:
        count: 1
        list:
        - endpointURIs:
          - protocol: default
            endpointURI: default
          - protocol: default
            endpointURI: default
          gatewayType: Regular
          isReadOnly: false
          provider: wso2
          displayName: US Region
          name: us-region
          description: Gateway environment in US Region
          id: ece92bdc-e1e6-325c-b6f4-656208a041e9
          additionalProperties:
          - value: wso2
            key: Organization
          - value: wso2
            key: Organization
          vhosts:
          - httpContext: pets
            wssPort: 8099
            httpPort: 80
            wsPort: 9099
            host: mg.wso2.com
            httpsPort: 443
          - httpContext: pets
            wssPort: 8099
            httpPort: 80
            wsPort: 9099
            host: mg.wso2.com
            httpsPort: 443
        - endpointURIs:
          - protocol: default
            endpointURI: default
          - protocol: default
            endpointURI: default
          gatewayType: Regular
          isReadOnly: false
          provider: wso2
          displayName: US Region
          name: us-region
          description: Gateway environment in US Region
          id: ece92bdc-e1e6-325c-b6f4-656208a041e9
          additionalProperties:
          - value: wso2
            key: Organization
          - value: wso2
            key: Organization
          vhosts:
          - httpContext: pets
            wssPort: 8099
            httpPort: 80
            wsPort: 9099
            host: mg.wso2.com
            httpsPort: 443
          - httpContext: pets
            wssPort: 8099
            httpPort: 80
            wsPort: 9099
            host: mg.wso2.com
            httpsPort: 443
      properties:
        count:
          description: |
            Number of Environments returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/Environment'
          type: array
      title: Environment List
      type: object
    VHost:
      example:
        httpContext: pets
        wssPort: 8099
        httpPort: 80
        wsPort: 9099
        host: mg.wso2.com
        httpsPort: 443
      properties:
        host:
          example: mg.wso2.com
          maxLength: 255
          minLength: 1
          pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$
          type: string
        httpContext:
          example: pets
          maxLength: 255
          minLength: 0
          pattern: ^\/?([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])*$
          type: string
        httpPort:
          example: 80
          type: integer
        httpsPort:
          example: 443
          type: integer
        wsPort:
          example: 9099
          type: integer
        wssPort:
          example: 8099
          type: integer
      required:
      - host
      title: Virtual Host
      type: object
    AdditionalProperty:
      example:
        value: wso2
        key: Organization
      properties:
        key:
          example: Organization
          type: string
        value:
          example: wso2
          type: string
      title: Additional Gateway Properties
      type: object
    GatewayEnvironmentProtocolURI:
      example:
        protocol: default
        endpointURI: default
      properties:
        protocol:
          example: default
          type: string
        endpointURI:
          example: default
          type: string
      required:
      - endpointURI
      - protocol
      title: Gateway Environment protocols and URIs
      type: object
    PublishStatus:
      example:
        message: Records published successfully
        status: successfull
      properties:
        status:
          description: Status of the usage publish request
          example: successfull
          type: string
        message:
          description: detailed message of the status
          example: Records published successfully
          type: string
      title: Usage publish status
      type: object
    MonetizationUsagePublishInfo:
      example:
        startedTime: "1599196134000"
        lastPublsihedTime: "1599196134000"
        state: RUNNING
        status: SUCCESSFULL
      properties:
        state:
          description: State of usage publish job
          example: RUNNING
          type: string
        status:
          description: Status of usage publish job
          example: SUCCESSFULL
          type: string
        startedTime:
          description: Timestamp of the started time of the Job
          example: "1599196134000"
          type: string
        lastPublsihedTime:
          description: Timestamp of the last published time
          example: "1599196134000"
          type: string
      title: Usage publish status
      type: object
    Workflow:
      example:
        description: Approve workflow request.
        attributes: {}
        status: APPROVED
      properties:
        status:
          description: |
            This attribute declares whether this workflow task is approved or rejected.
          enum:
          - APPROVED
          - REJECTED
          example: APPROVED
          type: string
        attributes:
          additionalProperties:
            type: string
          description: |
            Custom attributes to complete the workflow task
          example: {}
          type: object
        description:
          example: Approve workflow request.
          type: string
      required:
      - status
      title: workflow
      type: object
    TenantInfo:
      description: The tenant information of the user
      example:
        tenantId: -1234
        tenantDomain: carbon.super
        username: john
      properties:
        username:
          example: john
          type: string
        tenantDomain:
          example: carbon.super
          type: string
        tenantId:
          example: -1234
          type: integer
      title: Tenant information
      type: object
    CustomUrlInfo:
      description: The custom url information of the tenant domain
      example:
        devPortal:
          url: http://example.com
        tenantAdminUsername: john@foo.com
        tenantDomain: carbon.super
        enabled: true
      properties:
        tenantDomain:
          example: carbon.super
          type: string
        tenantAdminUsername:
          example: john@foo.com
          type: string
        enabled:
          example: true
          type: boolean
        devPortal:
          $ref: '#/components/schemas/CustomUrlInfo_devPortal'
      title: Custom url information
      type: object
    APICategory:
      example:
        numberOfAPIs: 1
        name: Finance
        description: Finance related APIs
        id: 01234567-0123-0123-0123-012345678901
      properties:
        id:
          example: 01234567-0123-0123-0123-012345678901
          readOnly: true
          type: string
        name:
          example: Finance
          maxLength: 255
          minLength: 1
          type: string
        description:
          example: Finance related APIs
          maxLength: 1024
          type: string
        numberOfAPIs:
          example: 1
          readOnly: true
          type: integer
      required:
      - name
      title: API Category
      type: object
    APICategoryList:
      example:
        count: 1
        list:
        - numberOfAPIs: 1
          name: Finance
          description: Finance related APIs
          id: 01234567-0123-0123-0123-012345678901
        - numberOfAPIs: 1
          name: Finance
          description: Finance related APIs
          id: 01234567-0123-0123-0123-012345678901
      properties:
        count:
          description: |
            Number of API categories returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/APICategory'
          type: array
      title: API Category List
      type: object
    FileInfo:
      properties:
        relativePath:
          description: relative location of the file (excluding the base context and
            host of the Admin API)
          example: api-categories/01234567-0123-0123-0123-012345678901/thumbnail
          type: string
        mediaType:
          description: media-type of the file
          example: image/jpeg
          type: string
      title: File Information including meta data
      type: object
    Settings:
      example:
        analyticsEnabled: false
        keyManagerConfiguration:
        - defaultConsumerKeyClaim: azp
          displayName: default
          configurations:
          - default: admin
            values:
            - '{}'
            - '{}'
            name: consumer_key
            multiple: true
            tooltip: Entet username to connect to key manager
            label: Consumer Key
            type: select
            required: true
            mask: true
          - default: admin
            values:
            - '{}'
            - '{}'
            name: consumer_key
            multiple: true
            tooltip: Entet username to connect to key manager
            label: Consumer Key
            type: select
            required: true
            mask: true
          defaultScopesClaim: scope
          type: default
        - defaultConsumerKeyClaim: azp
          displayName: default
          configurations:
          - default: admin
            values:
            - '{}'
            - '{}'
            name: consumer_key
            multiple: true
            tooltip: Entet username to connect to key manager
            label: Consumer Key
            type: select
            required: true
            mask: true
          - default: admin
            values:
            - '{}'
            - '{}'
            name: consumer_key
            multiple: true
            tooltip: Entet username to connect to key manager
            label: Consumer Key
            type: select
            required: true
            mask: true
          defaultScopesClaim: scope
          type: default
        gatewayTypes:
        - gatewayTypes
        - gatewayTypes
        scopes:
        - scopes
        - scopes
      properties:
        scopes:
          items:
            type: string
          type: array
        gatewayTypes:
          items:
            type: string
          type: array
        keyManagerConfiguration:
          items:
            $ref: '#/components/schemas/Settings_keyManagerConfiguration'
          type: array
        analyticsEnabled:
          description: To determine whether analytics is enabled or not
          example: false
          type: boolean
      title: Settings
      type: object
    ScopeList:
      example:
        count: 60
        list:
        - roles:
          - admin
          - Internal/publisher
          name: apim:api_publish
          description: Publish API
          tag: publisher
        - roles:
          - admin
          - Internal/publisher
          name: apim:api_publish
          description: Publish API
          tag: publisher
      properties:
        count:
          description: |
            Number of scopes available for tenant.
          example: 60
          readOnly: true
          type: integer
        list:
          items:
            $ref: '#/components/schemas/Scope'
          type: array
      title: Scope Role Mapping List
      type: object
    Scope:
      example:
        roles:
        - admin
        - Internal/publisher
        name: apim:api_publish
        description: Publish API
        tag: publisher
      properties:
        tag:
          description: |
            Portal name.
          example: publisher
          type: string
        name:
          description: |
            Scope name.
          example: apim:api_publish
          type: string
        description:
          description: |
            About scope.
          example: Publish API
          type: string
        roles:
          description: |
            Roles for the particular scope.
          example:
          - admin
          - Internal/publisher
          items:
            type: string
          type: array
      title: Scope Role
      type: object
    KeyManagerWellKnownResponse:
      example:
        valid: true
        value:
          clientRegistrationEndpoint: https://localhost:9444/keymanager-operations/dcr/register
          displayName: WSO2 Identity Server
          enableMapOAuthConsumerApps: false
          introspectionEndpoint: https://localhost:9444/oauth2/introspect
          scopeManagementEndpoint: https://wso2is.com:9444/api/identity/oauth2/v1.0/scopes
          description: This is a key manager for Developers
          type: WSO2-IS
          issuer: https://localhost:9444/services
          enabled: true
          tokenEndpoint: https://localhost:9444/oauth2/token
          consumerKeyClaim: azp
          scopesClaim: scp
          permissions:
            permissionType: ALLOW
            roles:
            - Internal/subscriber
            - Internal/subscriber
          alias: https://localhost:9443/oauth2/token
          id: 01234567-0123-0123-0123-012345678901
          userInfoEndpoint: https://localhost:9444/oauth2/userinfo?schema=openid
          displayTokenEndpoint: https://localhost:9444/oauth2/token
          displayRevokeEndpoint: https://localhost:9444/oauth2/revoke
          enableSelfValidationJWT: true
          enableTokenEncryption: false
          availableGrantTypes:
          - client_credentials
          - client_credentials
          claimMapping:
          - remoteClaim: http://idp.org/username
            localClaim: http://wso2.org/username
          - remoteClaim: http://idp.org/username
            localClaim: http://wso2.org/username
          revokeEndpoint: https://localhost:9444/oauth2/revoke
          certificates:
            type: JWKS
            value: value
          name: WSO2 Identity Server
          wellKnownEndpoint: wellKnownEndpoint
          authorizeEndpoint: https://localhost:9444/oauth2/authorize
          enableTokenHashing: false
          enableOAuthAppCreation: false
          additionalProperties:
            self_validate_jwt: true
            Username: admin
            Password: admin
          tokenValidation:
          - enable: false
            id: 0
            type: REFERENCE
            value: '{}'
          - enable: false
            id: 0
            type: REFERENCE
            value: '{}'
          tokenType: EXCHANGED
          enableTokenGeneration: true
      properties:
        valid:
          default: false
          example: true
          type: boolean
        value:
          $ref: '#/components/schemas/KeyManager'
      title: Key Manager Well-Known Response.
      type: object
    KeyManager:
      example:
        clientRegistrationEndpoint: https://localhost:9444/keymanager-operations/dcr/register
        displayName: WSO2 Identity Server
        enableMapOAuthConsumerApps: false
        introspectionEndpoint: https://localhost:9444/oauth2/introspect
        scopeManagementEndpoint: https://wso2is.com:9444/api/identity/oauth2/v1.0/scopes
        description: This is a key manager for Developers
        type: WSO2-IS
        issuer: https://localhost:9444/services
        enabled: true
        tokenEndpoint: https://localhost:9444/oauth2/token
        consumerKeyClaim: azp
        scopesClaim: scp
        permissions:
          permissionType: ALLOW
          roles:
          - Internal/subscriber
          - Internal/subscriber
        alias: https://localhost:9443/oauth2/token
        id: 01234567-0123-0123-0123-012345678901
        userInfoEndpoint: https://localhost:9444/oauth2/userinfo?schema=openid
        displayTokenEndpoint: https://localhost:9444/oauth2/token
        displayRevokeEndpoint: https://localhost:9444/oauth2/revoke
        enableSelfValidationJWT: true
        enableTokenEncryption: false
        availableGrantTypes:
        - client_credentials
        - client_credentials
        claimMapping:
        - remoteClaim: http://idp.org/username
          localClaim: http://wso2.org/username
        - remoteClaim: http://idp.org/username
          localClaim: http://wso2.org/username
        revokeEndpoint: https://localhost:9444/oauth2/revoke
        certificates:
          type: JWKS
          value: value
        name: WSO2 Identity Server
        wellKnownEndpoint: wellKnownEndpoint
        authorizeEndpoint: https://localhost:9444/oauth2/authorize
        enableTokenHashing: false
        enableOAuthAppCreation: false
        additionalProperties:
          self_validate_jwt: true
          Username: admin
          Password: admin
        tokenValidation:
        - enable: false
          id: 0
          type: REFERENCE
          value: '{}'
        - enable: false
          id: 0
          type: REFERENCE
          value: '{}'
        tokenType: EXCHANGED
        enableTokenGeneration: true
      properties:
        id:
          example: 01234567-0123-0123-0123-012345678901
          readOnly: true
          type: string
        name:
          example: WSO2 Identity Server
          maxLength: 100
          minLength: 1
          type: string
        displayName:
          description: |
            display name of Key Manager to  show in UI
          example: WSO2 Identity Server
          maxLength: 100
          type: string
        type:
          example: WSO2-IS
          maxLength: 45
          minLength: 1
          type: string
        description:
          example: This is a key manager for Developers
          maxLength: 256
          type: string
        wellKnownEndpoint:
          description: |
            Well-Known Endpoint of Identity Provider.
          type: string
        introspectionEndpoint:
          example: https://localhost:9444/oauth2/introspect
          type: string
        clientRegistrationEndpoint:
          example: https://localhost:9444/keymanager-operations/dcr/register
          type: string
        tokenEndpoint:
          example: https://localhost:9444/oauth2/token
          type: string
        displayTokenEndpoint:
          example: https://localhost:9444/oauth2/token
          type: string
        revokeEndpoint:
          example: https://localhost:9444/oauth2/revoke
          type: string
        displayRevokeEndpoint:
          example: https://localhost:9444/oauth2/revoke
          type: string
        userInfoEndpoint:
          example: https://localhost:9444/oauth2/userinfo?schema=openid
          type: string
        authorizeEndpoint:
          example: https://localhost:9444/oauth2/authorize
          type: string
        certificates:
          $ref: '#/components/schemas/KeyManager_certificates'
        issuer:
          example: https://localhost:9444/services
          type: string
        alias:
          description: |
            The alias of Identity Provider.
            If the tokenType is EXCHANGED, the alias value should be inclusive in the audience values of the JWT token
          example: https://localhost:9443/oauth2/token
          type: string
        scopeManagementEndpoint:
          example: https://wso2is.com:9444/api/identity/oauth2/v1.0/scopes
          type: string
        availableGrantTypes:
          items:
            example: client_credentials
            type: string
          type: array
        enableTokenGeneration:
          example: true
          type: boolean
        enableTokenEncryption:
          default: false
          example: false
          type: boolean
        enableTokenHashing:
          default: false
          example: false
          type: boolean
        enableMapOAuthConsumerApps:
          default: false
          example: false
          type: boolean
        enableOAuthAppCreation:
          default: false
          example: false
          type: boolean
        enableSelfValidationJWT:
          default: true
          example: true
          type: boolean
        claimMapping:
          items:
            $ref: '#/components/schemas/ClaimMappingEntry'
          type: array
        consumerKeyClaim:
          example: azp
          type: string
        scopesClaim:
          example: scp
          type: string
        tokenValidation:
          items:
            $ref: '#/components/schemas/TokenValidation'
          type: array
        enabled:
          example: true
          type: boolean
        additionalProperties:
          example:
            self_validate_jwt: true
            Username: admin
            Password: admin
          properties: {}
          type: object
        permissions:
          $ref: '#/components/schemas/KeyManager_permissions'
        tokenType:
          default: DIRECT
          description: The type of the tokens to be used (exchanged or without exchanged).
            Accepted values are EXCHANGED and DIRECT.
          enum:
          - EXCHANGED
          - DIRECT
          - BOTH
          example: EXCHANGED
          type: string
      required:
      - name
      - type
      title: Key Manager
      type: object
    KeyManagerInfo:
      example:
        name: WSO2 IS
        description: This is a key manager for Developers
        id: 01234567-0123-0123-0123-012345678901
        type: IS
        tokenType: EXCHANGED
        enabled: true
      properties:
        id:
          example: 01234567-0123-0123-0123-012345678901
          type: string
        name:
          example: WSO2 IS
          type: string
        type:
          example: IS
          type: string
        description:
          example: This is a key manager for Developers
          type: string
        enabled:
          example: true
          type: boolean
        tokenType:
          default: DIRECT
          description: The type of the tokens to be used (exchanged or without exchanged).
            Accepted values are EXCHANGED and DIRECT.
          enum:
          - EXCHANGED
          - DIRECT
          - BOTH
          example: EXCHANGED
          type: string
      required:
      - name
      - type
      title: Key Manager Info
      type: object
    KeyManagerConfiguration:
      example:
        default: admin
        values:
        - '{}'
        - '{}'
        name: consumer_key
        multiple: true
        tooltip: Entet username to connect to key manager
        label: Consumer Key
        type: select
        required: true
        mask: true
      properties:
        name:
          example: consumer_key
          type: string
        label:
          example: Consumer Key
          type: string
        type:
          example: select
          type: string
        required:
          example: true
          type: boolean
        mask:
          example: true
          type: boolean
        multiple:
          example: true
          type: boolean
        tooltip:
          example: Entet username to connect to key manager
          type: string
        default:
          example: admin
          properties: {}
          type: object
        values:
          items:
            properties: {}
            type: object
          type: array
      title: Key Manager Configuration
      type: object
    KeyManagerList:
      example:
        count: 1
        list:
        - name: WSO2 IS
          description: This is a key manager for Developers
          id: 01234567-0123-0123-0123-012345678901
          type: IS
          tokenType: EXCHANGED
          enabled: true
        - name: WSO2 IS
          description: This is a key manager for Developers
          id: 01234567-0123-0123-0123-012345678901
          type: IS
          tokenType: EXCHANGED
          enabled: true
      properties:
        count:
          description: |
            Number of Key managers returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/KeyManagerInfo'
          type: array
      title: Key Manager List
      type: object
    ClaimMappingEntry:
      example:
        remoteClaim: http://idp.org/username
        localClaim: http://wso2.org/username
      properties:
        remoteClaim:
          example: http://idp.org/username
          type: string
        localClaim:
          example: http://wso2.org/username
          type: string
      title: Claim Mapping Configuration
      type: object
    TokenValidation:
      example:
        enable: false
        id: 0
        type: REFERENCE
        value: '{}'
      properties:
        id:
          type: integer
        enable:
          default: true
          example: false
          type: boolean
        type:
          enum:
          - REFERENCE
          - JWT
          - CUSTOM
          type: string
        value:
          properties: {}
          type: object
      title: Token handling Configuration
      type: object
    ScopeSettings:
      example:
        name: apim:subscribe
      properties:
        name:
          example: apim:subscribe
          type: string
      title: Settings
      type: object
    AlertTypesList:
      example:
        alerts:
        - name: AbnormalResponseTime
          id: "1"
        - name: AbnormalResponseTime
          id: "1"
        count: 3
      properties:
        count:
          description: The number of alerts
          example: 3
          type: integer
        alerts:
          items:
            $ref: '#/components/schemas/AlertType'
          type: array
      title: Alert Types List
      type: object
    AlertType:
      example:
        name: AbnormalResponseTime
        id: "1"
      properties:
        id:
          description: The alert Id
          example: "1"
          type: string
        name:
          description: The name of the alert.
          example: AbnormalResponseTime
          type: string
      title: Alert Type
      type: object
    AlertsSubscription:
      example:
        alerts:
        - name: AbnormalResponseTime
          id: "1"
        - name: AbnormalResponseTime
          id: "1"
        emailList:
        - admin@wso2.com
        - admin@wso2.com
      properties:
        alerts:
          items:
            $ref: '#/components/schemas/AlertType'
          type: array
        emailList:
          items:
            example: admin@wso2.com
            format: email
            type: string
          type: array
      title: Alerts Subscription
      type: object
    BotDetectionAlertSubscriptionList:
      example:
        count: 3
        list:
        - uuid: urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65
          email: abc@gmail.com
        - uuid: urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65
          email: abc@gmail.com
      properties:
        count:
          description: |
            Number of Bot Detection Alert Subscriptions returned.
          example: 3
          type: integer
        list:
          items:
            $ref: '#/components/schemas/BotDetectionAlertSubscription'
          type: array
      title: Bot Detection Alert Subscription List
      type: object
    BotDetectionAlertSubscription:
      example:
        uuid: urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65
        email: abc@gmail.com
      properties:
        uuid:
          description: UUID of the subscription
          example: urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65
          type: string
        email:
          description: email
          example: abc@gmail.com
          type: string
      required:
      - email
      title: Bot Detection Alert Subscription
      type: object
    WorkflowList:
      example:
        next: /workflows?limit=1&offset=2&user=
        previous: /workflows?limit=1&offset=0&user=
        count: 1
        list:
        - updatedTime: 2020-02-10 10:10:19.704
          workflowStatus: APPROVED
          createdTime: 2020-02-10 10:10:19.704
          description: Approve application [APP1] creation request from application
            creator - admin with throttling tier - 10MinPer
          workflowType: APPLICATION_CREATION
          referenceId: 5871244b-d6f3-466e-8995-8accd1e64303
          properties: '{}'
        - updatedTime: 2020-02-10 10:10:19.704
          workflowStatus: APPROVED
          createdTime: 2020-02-10 10:10:19.704
          description: Approve application [APP1] creation request from application
            creator - admin with throttling tier - 10MinPer
          workflowType: APPLICATION_CREATION
          referenceId: 5871244b-d6f3-466e-8995-8accd1e64303
          properties: '{}'
      properties:
        count:
          description: |
            Number of workflow processes returned.
          example: 1
          type: integer
        next:
          description: |
            Link to the next subset of resources qualified.
            Empty if no more resources are to be returned.
          example: /workflows?limit=1&offset=2&user=
          type: string
        previous:
          description: |
            Link to the previous subset of resources qualified.
            Empty if current subset is the first subset returned.
          example: /workflows?limit=1&offset=0&user=
          type: string
        list:
          items:
            $ref: '#/components/schemas/WorkflowInfo'
          type: array
      title: WorkflowList
      type: object
    WorkflowInfo:
      example:
        updatedTime: 2020-02-10 10:10:19.704
        workflowStatus: APPROVED
        createdTime: 2020-02-10 10:10:19.704
        description: Approve application [APP1] creation request from application
          creator - admin with throttling tier - 10MinPer
        workflowType: APPLICATION_CREATION
        referenceId: 5871244b-d6f3-466e-8995-8accd1e64303
        properties: '{}'
      properties:
        workflowType:
          description: |
            Type of the Workflow Request. It shows which type of request is it.
          enum:
          - APPLICATION_CREATION
          - SUBSCRIPTION_CREATION
          - USER_SIGNUP
          - APPLICATION_REGISTRATION_PRODUCTION
          - APPLICATION_REGISTRATION_SANDBOX
          - APPLICATION_DELETION
          - API_STATE
          - SUBSCRIPTION_DELETION
          - SUBSCRIPTION_UPDATE
          - API_PRODUCT_STATE
          - REVISION_DEPLOYMENT
          example: APPLICATION_CREATION
          type: string
        workflowStatus:
          description: |
            Show the Status of the the workflow request whether it is approved or created.
          enum:
          - APPROVED
          - CREATED
          example: APPROVED
          type: string
        createdTime:
          description: |
            Time of the the workflow request created.
          example: 2020-02-10 10:10:19.704
          type: string
        updatedTime:
          description: |
            Time of the the workflow request updated.
          example: 2020-02-10 10:10:19.704
          type: string
        referenceId:
          description: |
            Workflow external reference is used to identify the workflow requests uniquely.
          example: 5871244b-d6f3-466e-8995-8accd1e64303
          type: string
        properties:
          properties: {}
          type: object
        description:
          description: |
            description is a message with basic details about the workflow request.
          example: Approve application [APP1] creation request from application creator
            - admin with throttling tier - 10MinPer
          type: string
      title: Workflow info object with basic workflow details
      type: object
    WorkflowResponse:
      properties:
        workflowStatus:
          description: |
            This attribute declares whether this workflow task is approved or rejected.
          enum:
          - CREATED
          - APPROVED
          - REJECTED
          - REGISTERED
          example: APPROVED
          type: string
        jsonPayload:
          description: |
            Attributes that returned after the workflow execution
          type: string
      required:
      - workflowStatus
      title: workflow Response
      type: object
    BotDetectionDataList:
      example:
        count: 1
        list:
        - apiMethod: GET
          messageBody: <soapenv:Body xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\"/>
          clientIp: 127.0.0.1
          messageID: urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65
          headerSet: '[Accept=*/*, Host=localhost:8243, User-Agent=curl/7.58.0]'
          recordedTime: 1591734138413
        - apiMethod: GET
          messageBody: <soapenv:Body xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\"/>
          clientIp: 127.0.0.1
          messageID: urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65
          headerSet: '[Accept=*/*, Host=localhost:8243, User-Agent=curl/7.58.0]'
          recordedTime: 1591734138413
      properties:
        count:
          description: |
            Number of Bot Detection Data returned.
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/BotDetectionData'
          type: array
      title: Bot Detection Data List
      type: object
    BotDetectionData:
      example:
        apiMethod: GET
        messageBody: <soapenv:Body xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\"/>
        clientIp: 127.0.0.1
        messageID: urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65
        headerSet: '[Accept=*/*, Host=localhost:8243, User-Agent=curl/7.58.0]'
        recordedTime: 1591734138413
      properties:
        recordedTime:
          description: The time of detection
          example: 1591734138413
          format: int64
          type: integer
        messageID:
          description: The message ID
          example: urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65
          type: string
        apiMethod:
          description: The api method
          example: GET
          type: string
        headerSet:
          description: The header set
          example: '[Accept=*/*, Host=localhost:8243, User-Agent=curl/7.58.0]'
          type: string
        messageBody:
          description: The content of the message body
          example: <soapenv:Body xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\"/>
          type: string
        clientIp:
          description: The IP of the client
          example: 127.0.0.1
          type: string
      title: Bot Detection Data
      type: object
    RoleAliasList:
      example:
        count: 1
        list:
        - role: Internal/subscriber
          aliases:
          - Subscriber
          - Internal/subscriber
        - role: Internal/subscriber
          aliases:
          - Subscriber
          - Internal/subscriber
      properties:
        count:
          description: The number of role aliases
          example: 1
          type: integer
        list:
          items:
            $ref: '#/components/schemas/RoleAlias'
          type: array
      title: Role alias list
      type: object
    RoleAlias:
      example:
        role: Internal/subscriber
        aliases:
        - Subscriber
        - Internal/subscriber
      properties:
        role:
          description: The original role
          example: Internal/subscriber
          type: string
        aliases:
          description: The role mapping for role alias
          example:
          - Subscriber
          - Internal/subscriber
          items:
            type: string
          type: array
      title: Role alias
      type: object
    SearchResultList:
      example:
        pagination:
          next: next
          total: 10
          offset: 0
          previous: previous
          limit: 1
        apis:
        - provider: provider
          name: name
          id: id
          version: version
        - provider: provider
          name: name
          id: id
          version: version
        count: 1
      properties:
        apis:
          items:
            $ref: '#/components/schemas/ApiResult'
          type: array
        count:
          description: |
            Number of results returned.
          example: 1
          type: integer
        pagination:
          $ref: '#/components/schemas/Pagination'
      title: Unified Search Result List
      type: object
    ApiResult:
      example:
        provider: provider
        name: name
        id: id
        version: version
      properties:
        provider:
          type: string
        name:
          type: string
        version:
          type: string
        id:
          type: string
      type: object
    Pagination:
      example:
        next: next
        total: 10
        offset: 0
        previous: previous
        limit: 1
      properties:
        offset:
          example: 0
          type: integer
        limit:
          example: 1
          type: integer
        total:
          example: 10
          type: integer
        next:
          description: |
            Link to the next subset of resources qualified.
            Empty if no more resources are to be returned.
            example: ""
          type: string
        previous:
          description: |
            Link to the previous subset of resources qualified.
            Empty if current subset is the first subset returned.
            example: ""
          type: string
      title: Pagination
      type: object
    AdvancedThrottlePolicyInfo_allOf:
      properties:
        defaultLimit:
          $ref: '#/components/schemas/ThrottleLimit'
    AdvancedThrottlePolicy_allOf:
      properties:
        defaultLimit:
          $ref: '#/components/schemas/ThrottleLimit'
        conditionalGroups:
          description: |
            Group of conditions which allow adding different parameter conditions to the throttling limit.
          items:
            $ref: '#/components/schemas/ConditionalGroup'
          type: array
      required:
      - defaultLimit
    ApplicationThrottlePolicy_allOf:
      properties:
        defaultLimit:
          $ref: '#/components/schemas/ThrottleLimit'
        burstLimit:
          $ref: '#/components/schemas/BurstLimit'
      required:
      - defaultLimit
    SubscriptionThrottlePolicy_allOf:
      properties:
        defaultLimit:
          $ref: '#/components/schemas/ThrottleLimit'
        monetization:
          $ref: '#/components/schemas/MonetizationInfo'
        rateLimitCount:
          description: Burst control request count
          example: 10
          type: integer
        rateLimitTimeUnit:
          description: Burst control time unit
          example: min
          type: string
        customAttributes:
          description: |
            Custom attributes added to the Subscription Throttling Policy
          example: []
          items:
            $ref: '#/components/schemas/CustomAttribute'
          type: array
        stopOnQuotaReach:
          default: false
          description: |
            This indicates the action to be taken when a user goes beyond the allocated quota. If checked, the user's requests will be dropped. If unchecked, the requests will be allowed to pass through.
          type: boolean
        billingPlan:
          description: |
            define whether this is Paid or a Free plan. Allowed values are FREE or COMMERCIAL.
          example: FREE
          type: string
        permissions:
          $ref: '#/components/schemas/SubscriptionThrottlePolicyPermission'
        subscriberCount:
          description: |
            Number of subscriptions allowed
          example: 10
          type: integer
      required:
      - defaultLimit
    CustomRule_allOf:
      properties:
        siddhiQuery:
          description: Siddhi query which represents the custom throttling policy
          example: |
            FROM RequestStream\nSELECT userId, ( userId == 'admin@carbon.super' ) AS isEligible , str:concat('admin@carbon.super','') as throttleKey\nINSERT INTO EligibilityStream; \n\nFROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) \nSELECT throttleKey, (count(userId) >= 10) as isThrottled, expiryTimeStamp group by throttleKey \nINSERT ALL EVENTS into ResultStream;
          type: string
        keyTemplate:
          description: The specific combination of attributes that are checked in
            the policy.
          example: $userId
          type: string
      required:
      - keyTemplate
      - siddhiQuery
    BandwidthLimit_allOf:
      properties:
        dataAmount:
          description: Amount of data allowed to be transfered
          example: 1000
          format: int64
          type: integer
        dataUnit:
          description: Unit of data allowed to be transfered. Allowed values are "KB",
            "MB" and "GB"
          example: KB
          type: string
      required:
      - dataAmount
      - dataUnit
    RequestCountLimit_allOf:
      properties:
        requestCount:
          description: Maximum number of requests allowed
          example: 30
          format: int64
          type: integer
      required:
      - requestCount
    EventCountLimit_allOf:
      properties:
        eventCount:
          description: Maximum number of events allowed
          example: 3000
          format: int64
          type: integer
      required:
      - eventCount
    CustomUrlInfo_devPortal:
      example:
        url: http://example.com
      properties:
        url:
          example: http://example.com
          type: string
    Settings_keyManagerConfiguration:
      example:
        defaultConsumerKeyClaim: azp
        displayName: default
        configurations:
        - default: admin
          values:
          - '{}'
          - '{}'
          name: consumer_key
          multiple: true
          tooltip: Entet username to connect to key manager
          label: Consumer Key
          type: select
          required: true
          mask: true
        - default: admin
          values:
          - '{}'
          - '{}'
          name: consumer_key
          multiple: true
          tooltip: Entet username to connect to key manager
          label: Consumer Key
          type: select
          required: true
          mask: true
        defaultScopesClaim: scope
        type: default
      properties:
        type:
          example: default
          type: string
        displayName:
          example: default
          type: string
        defaultConsumerKeyClaim:
          example: azp
          type: string
        defaultScopesClaim:
          example: scope
          type: string
        configurations:
          items:
            $ref: '#/components/schemas/KeyManagerConfiguration'
          type: array
    KeyManager_certificates:
      example:
        type: JWKS
        value: value
      properties:
        type:
          enum:
          - JWKS
          - PEM
          type: string
        value:
          type: string
    KeyManager_permissions:
      example:
        permissionType: ALLOW
        roles:
        - Internal/subscriber
        - Internal/subscriber
      properties:
        permissionType:
          default: PUBLIC
          enum:
          - PUBLIC
          - ALLOW
          - DENY
          example: ALLOW
          type: string
        roles:
          items:
            example: Internal/subscriber
            type: string
          type: array
  securitySchemes:
    OAuth2Security:
      flows:
        password:
          scopes:
            openid: Authorize access to user details
            apim:policies_import_export: Export and import policies related operations
            apim:admin: Manage all admin operations
            apim:tier_view: View throttling policies
            apim:tier_manage: Update and delete throttling policies
            apim:bl_view: View deny policies
            apim:bl_manage: Update and delete deny policies
            apim:mediation_policy_view: View mediation policies
            apim:mediation_policy_create: Create and update mediation policies
            apim:app_owner_change: Retrieve and manage applications
            apim:app_import_export: Import and export applications related operations
            apim:api_import_export: Import and export APIs related operations
            apim:api_product_import_export: Import and export API Products related
              operations
            apim:label_manage: Manage microgateway labels
            apim:label_read: Retrieve microgateway labels
            apim:environment_manage: Manage gateway environments
            apim:environment_read: Retrieve gateway environments
            apim:monetization_usage_publish: Retrieve and publish Monetization related
              usage records
            apim:api_workflow_approve: Manage workflows
            apim:bot_data: Retrieve bot detection data
            apim:tenantInfo: Retrieve tenant related information
            apim:tenant_theme_manage: Manage tenant themes
            apim:admin_operations: Manage API categories and Key Managers related
              operations
            apim:admin_settings: Retrieve admin settings
            apim:admin_alert_manage: Manage admin alerts
            apim:api_workflow_view: Retrive workflow requests
            apim:scope_manage: Manage system scopes
          tokenUrl: https://localhost:9443/oauth2/token
      type: oauth2

