WSO2 Developer Portal API

The WSO2 API Manager Developer Portal API handles API discovery, application management, subscriptions, and access token generation. It enables consumption workflows for developers to discover, explore, subscribe to, and consume APIs.

OpenAPI Specification

wso2-devportal-api.yaml Raw ↑
#   Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
################################################################################
openapi: 3.0.1
info:
  title: WSO2 API Manager - Developer Portal
  description: |
    This document specifies a **RESTful API** for WSO2 **API Manager** - **Developer Portal**.
    Please see [full OpenAPI Specification](https://raw.githubusercontent.com/wso2/carbon-apimgt/master/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml) of the API which is written using [OAS 3.0](http://swagger.io/) specification.

    # Authentication
    The Developer Portal REST API is protected using OAuth2 and access control is achieved through scopes. Before you start invoking
    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_devportal",
      "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 below 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_devportal",
    "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_devportal\"}",
    "jsonAppAttribute": "{}",
    "tokenType": null
    }
    ```
    Note that in a distributed deployment or IS as KM separated environment to invoke RESTful APIs (product APIs), users must generate tokens through API-M Control Plane's token endpoint.
    The tokens generated using third party key managers, are to manage end-user authentication when accessing APIs.
    
    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 devportal REST API can be viewed in **OAuth2 Security** section
    of this document and scope for each resource is given in **authorization** 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_password>&scope=<scopes separated by space>"
    \ -H "Authorization: Basic base64(cliet_id:client_secret)"
    \ https://<host>:<servlet_port>/oauth2/token
    ```
    **Sample request**
    ```
    curl https://localhost:9443/oauth2/token -k \
    -H "Authorization: Basic Zk9DaTR2Tko1OVBwSHVjQzJDQVlmWXVBRGRNYTphNEZ3SGxxMGlDSUtWczJNUElJRG5lcFpuWU1h" \
    -d "grant_type=password&username=admin&password=admin&scope=apim:subscribe apim:api_key"
    ```
    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:subscribe apim:api_key",
    "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/32294946-a8a1522b-31b8-4e27-8a31-6e13054bce4e)
  contact:
    name: WSO2
    url: https://wso2.com/api-manager/
    email: [email protected]
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: v3
servers:
  - url: https://apis.wso2.com/api/am/devportal/v3
######################################################
# The "API Collection" resource APIs
######################################################
paths:
  /apis:
    get:
      tags:
        - APIs
      summary: |
        Retrieve/Search APIs
      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.

        This operation supports retrieving APIs of other tenants. The required tenant domain need to be specified as a header `X-WSO2-Tenant`. If not specified super tenant's APIs will be retrieved. If you used an Authorization header, the user's tenant associated with the access token will be used.

        **NOTE:**
        * By default, this operation retrieves Published APIs. In order to retrieve Prototyped APIs, you need to use **query** parameter and specify **status:PROTOTYPED**.
        * This operation does not require an Authorization header by default. But if it is provided, it will be validated and checked for permissions of the user, hence you may be able to see APIs which are restricted for special permissions/roles.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/requestedTenant'
        - name: query
          in: query
          description: |
            **Search condition**.

            You can search in attributes by using an **"<attribute>:"** modifier.

            Eg.
            "provider:wso2" will match an API if the provider of the API is exactly "wso2".

            Additionally you can use wildcards.

            Eg.
            "provider:wso2*" will match an API if the provider of the API starts with "wso2".

            Supported attribute modifiers are [**version, context, status,
            description, doc, provider, tag**]

            To search by API Properties provide the query in below format.

            **property_name:property_value**

            Eg.
            "environment:test" where environment is the property name and test is the propert value.

            If no advanced attribute modifier has been specified, search will match the
            given query string against API Name.
          schema:
            type: string
        - $ref: '#/components/parameters/If-None-Match'
      responses:
        200:
          description: |
            OK.
            List of qualifying APIs is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIList'
        406:
          $ref: '#/components/responses/NotAcceptable'
      security:
        - OAuth2Security: []
      x-code-samples:
        - lang: Curl
          source: curl -k "https://localhost:9443/api/am/devportal/v3/apis"

  /apis/{apiId}:
    get:
      tags:
        - APIs
      summary: |
        Get Details of an API
      description: |
        Using this operation, you can retrieve complete details of a single API. You need to provide the Id of the API to retrive it.

        `X-WSO2-Tenant` header can be used to retrieve an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used.

        **NOTE:**
        * This operation does not require an Authorization header by default. But if it is provided, it will be validated and checked for permissions of the user, hence you may be able to see APIs which are restricted for special permissions/roles. \n
      parameters:
        - $ref: '#/components/parameters/apiId'
        - $ref: '#/components/parameters/requestedTenant'
        - $ref: '#/components/parameters/If-None-Match'
      responses:
        200:
          description: |
            OK.
            Requested API is returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource. Used by caches, or in conditional requests.
              schema:
                type: string
            Last-Modified:
              description: |
                Date and time the resource has been modified the last time.
                Used by caches, or in conditional requests.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API'
        304:
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource.
          content: {}
        404:
          $ref: '#/components/responses/NotFound'
        406:
          $ref: '#/components/responses/NotAcceptable'
      security:
        - OAuth2Security: []
      x-code-samples:
        - lang: Curl
          source: curl -k "https://localhost:9443/api/am/devportal/v3/apis/c43a325c-260b-4302-81cb-768eafaa3aed"

  /apis/{apiId}/swagger:
    get:
      tags:
        - APIs
      summary: |
        Get Swagger Definition
      description: |
        You can use this operation to retrieve the swagger definition of an API.

         `X-WSO2-Tenant` header can be used to retrieve the swagger definition an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used.

        **NOTE:**
        * This operation does not require an Authorization header by default. But in order to see a restricted API's swagger definition, you need to provide Authorization header.
      parameters:
        - $ref: '#/components/parameters/apiId'
        - $ref: '#/components/parameters/environmentName'
        - $ref: '#/components/parameters/If-None-Match'
        - $ref: '#/components/parameters/requestedTenant'
        - $ref: '#/components/parameters/requestedTenant-Q'
        - name: query
          in: query
          description: |
            **Key Manager Specific Swagger Generation**.
            To retrieve an OpenAPI Specification (OAS) definition for a specific Key Manager, please specify the Key Manager's ID in your request. 
              
            For example, by passing the query parameter `kmId=65e30b46-85e4-4788-85b7-b1c3de06b2e0`, you will receive the OAS definition containing all relevant information for the Key Manager associated with that ID.
              
            **Important:** If you're using a client that does not automatically handle URL encoding (such as `curl`), please ensure that you encode the URL properly.
          schema:
            type: string
      responses:
        200:
          description: |
            OK.
            Requested swagger document of the API is returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource. Used by caches, or in conditional requests.
              schema:
                type: string
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: string
                example: '{ "swagger" : "2.0", "info" : { "version" : "1.0", "title"
                  : "PhoneVerification" }, "host" : "localhost:8243", "basePath" :
                  "/phoneverify/1.0", "schemes" : [ "https", "http" ], "security"
                  : [ { "default" : [ ] } ], "paths" : { "/*" : { "post" : { "consumes"
                  : [ "text/xml", "application/soap+xml" ], "parameters" : [ { "in"
                  : "body", "name" : "SOAP Request", "description" : "SOAP request.",
                  "required" : true, "schema" : { "type" : "string" } }, { "name"
                  : "SOAPAction", "in" : "header", "description" : "SOAPAction header
                  for soap 1.1", "required" : false, "type" : "string" } ], "responses"
                  : { "200" : { "description" : "OK" } }, "security" : [ { "default"
                  : [ ] } ], "x-auth-type" : "Application & Application User", "x-throttling-tier"
                  : "Unlimited" } } }, "securityDefinitions" : { "default" : { "type"
                  : "oauth2", "authorizationUrl" : "https://localhost:8243/authorize",
                  "flow" : "implicit" } } }'
        304:
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource.
          content: {}
        404:
          $ref: '#/components/responses/NotFound'
        406:
          $ref: '#/components/responses/NotAcceptable'
      security:
        - OAuth2Security: []
      x-code-samples:
        - lang: Curl
          source: curl -k "https://localhost:9443/api/am/devportal/v3/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger"

  /apis/{apiId}/async-api-specification:
    get:
      tags:
        - APIs
      summary: |
        Get async api specification definition
      description: |
        You can use this operation to retrieve the async api specification of an API.
        
         `X-WSO2-Tenant` header can be used to retrieve the async api specification an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used.
        
        **NOTE:**
        * This operation does not require an Authorization header by default. But in order to see a restricted API's swagger definition, you need to provide Authorization header.
      parameters:
        - $ref: '#/components/parameters/apiId'
        - $ref: '#/components/parameters/environmentName'
        - $ref: '#/components/parameters/If-None-Match'
        - $ref: '#/components/parameters/requestedTenant'
      responses:
        200:
          description: |
            OK.
            Requested async api specification document of the API is returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource. Used by caches, or in conditional requests.
              schema:
                type: string
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: string
                example: '{"asyncapi": "2.0.0","defaultContentType": "application/json","info": {"title": "Streetlights 
                API","version": "1.0.0","description": "The Smartylighting Streetlights API allows you to remotely manag
                e the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off\n* Dim 
                a specific streetlight\n* Receive real-time information about environmental lighting conditions\n","licen
                se": {"name": "Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0" }},"servers": {"productio
                n": {"url": "ws://localhost:8080","protocol": "ws"},"sandbox": {"url": "ws://localhost:8080","protocol":
                "ws"}},"channels": {"smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured": {"descrip
                tion": "The topic on which measured values may be produced and consumed.",“publish": {"operationId": "re
                ceiveLightMeasurement","summary": "Inform about environmental lighting conditions of a particular street
                light.","traits": [{"$ref": "#/components/operationTraits/kafka"}],"message": {"$ref": "#/components/mes
                sages/lightMeasured"}},"parameters": {"streetlightId": {"$ref": "#/components/parameters/streetlightId"}
                }},"smartylighting/streetlights/1/0/action/{streetlightId}/turn/on": {"subscribe": {"operationId": "turn
                On","traits": [{"$ref": "#/components/operationTraits/kafka"}],"message": {"$ref": "#/components/message
                s/turnOnOff"}},"parameters": {"streetlightId": {"$ref": "#/components/parameters/streetlightId"}}},"smar
                tylighting/streetlights/1/0/action/{streetlightId}/turn/off": {"subscribe": {"operationId": "turnOff","t
                raits": [{"$ref": "#/components/operationTraits/kafka"}],"message": {"$ref": "#/components/messages/turn
                OnOff"}},"parameters": {"streetlightId": {"$ref": "#/components/parameters/streetlightId"}}},"smartyligh
                ting/streetlights/1/0/action/{streetlightId}/dim": {"subscribe": {"operationId": "dimLight","traits": [{
                "$ref": "#/components/operationTraits/kafka"}],"message": {"$ref": "#/components/messages/dimLight"}},"p
                arameters": {"streetlightId": {"$ref": "#/components/parameters/streetlightId"}}}},"components": {"schem
                as": {"lightMeasuredPayload": {"type": "object","properties": {"lumens": {"description": "Light intensit
                y measured in lumens.","minimum": 0,"type": "integer"},"sentAt": {“$ref": "#/components/schemas/sentAt"}
                }},"turnOnOffPayload": {"type": "object","properties": {"command": {"description": "Whether to turn on o
                r off the light.","enum": [true,false],"type": "string"},"sentAt": {"$ref": "#/components/schemas/sentAt
                "}}},"dimLightPayload": {"type": "object","properties": {"percentage": {"description": "Percentage to wh
                ich the light should be dimmed to.","maximum": 100,"minimum": 0,"type": "integer"},"sentAt": {"$ref": "#
                /components/schemas/sentAt"}}},"sentAt": {"format": "date-time","description": "Date and time when the m
                essage was sent.","type": "string"}},"messages": {"lightMeasured": {"contentType": "application/json","n
                ame": "lightMeasured","title": "Light measured","summary": "Inform about environmental lighting conditio
                ns of a particular streetlight.","payload": {"$ref": "#/components/schemas/lightMeasuredPayload"},"trait
                s": [{"$ref": "#/components/messageTraits/commonHeaders"}]},"turnOnOff": {"name": "turnOnOff","title": "
                on/off","summary": "Command a particular streetlight to turn the lights on or off.","payload": {"$ref":"
                #/components/schemas/turnOnOffPayload"},"traits": [{"$ref": "#/components/messageTraits/commonHeaders"}]
                },"dimLight": {"name": "dimLight","title": "Dim light","summary": "Command a particular streetlight to d
                im the lights.","payload": {"$ref": "#/components/schemas/dimLightPayload"},"traits": [{"$ref":"#/compon
                ents/messageTraits/commonHeaders"}]}},"securitySchemes": {"apiKey": {"type": "apiKey","description": "Pr
                ovide your API key as the user and leave the password empty.","in": "user"},"supportedOauthFlows": {"typ
                e": "oauth2","description": "Flows to support OAuth 2.0","flows": {"implicit": {"authorizationUrl": "http
                s://authserver.example/auth","scopes": {"streetlights:on": "Ability to switch lights on","streetlights:o
                ff": "Ability to switch lights off","streetlights:dim": "Ability to dim the lights"}},"password": {"toke
                nUrl": "https://authserver.example/token","scopes": {"streetlights:on": "Ability to switch lights on","s
                treetlights:off": "Ability to switch lights off","streetlights:dim": "Ability to dim the lights"}},"clie
                ntCredentials": {"tokenUrl": "https://authserver.example/token","scopes": {"streetlights:on": "Ability t
                o switch lights on","streetlights:off": "Ability to switch lights off","streetlights:dim": "Ability to d
                im the lights"}},"authorizationCode": {"authorizationUrl": "https://authserver.example/auth","tokenUrl":
                "https://authserver.example/token","refreshUrl": "https://authserver.example/refresh","scopes": {"street
                lights:on": "Ability to switch lights on","streetlights:off": "Ability to switch lights off","streetligh
                ts:dim": "Ability to dim the lights"}}}},"openIdConnectWellKnown": {"type": "openIdConnect","openIdConne
                ctUrl": "https://authserver.example/.well-known"},"oauth2": {"type": "oauth2","flows": {"implicit": {"aut
                horizationUrl": "http://localhost:9999","scopes": {},"x-scopes-bindings": {}}}}},"parameters": {"streetl
                ightId": {"description": "The ID of the streetlight.","schema": {"type": "string"}}},"operationTraits": 
                {"kafka": {"bindings": {"kafka": {"clientId": "my-app-id"}}}},"messageTraits": {"commonHeaders": {"heade
                rs": {"type": "object","properties": {"my-app-header": {"type": "integer","minimum": 0,"maximum": 100}}}
                }}}}'
        304:
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource.
          content: { }
        404:
          $ref: '#/components/responses/NotFound'
        406:
          $ref: '#/components/responses/NotAcceptable'
      security:
        - OAuth2Security: [ ]
      x-code-samples:
        - lang: Curl
          source: curl -k "https://localhost:9443/api/am/devportal/v3/apis/c43a325c-260b-4302-81cb-768eafaa3aed/async-api-specification"

  /apis/{apiId}/graphql-schema:
    get:
      tags:
        - APIs
      summary: |
        Get GraphQL Definition
      description: |
        You can use this operation to retrieve the GraphQL schema definition of a GraphQL API.

         `X-WSO2-Tenant` header can be used to retrieve the swagger definition an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used.

        **NOTE:**
        * This operation does not require an Authorization header by default. But in order to see a restricted API's swagger definition, you need to provide Authorization header.
      parameters:
        - $ref: '#/components/parameters/apiId'
        - $ref: '#/components/parameters/If-None-Match'
        - $ref: '#/components/parameters/requestedTenant'
      responses:
        200:
          description: |
            OK.
            Requested swagger document of the API is returned
          headers:
            ETag:
              description: |
                Entity Tag of the response resource. Used by caches, or in conditional requests.
              schema:
                type: string
            Last-Modified:
              description: |
                Date and time the resource has been modifed the last time.
                Used by caches, or in conditional requests.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: string
                example: 'directive @cacheControl(
                    maxAge: Int
                    scope: CacheControlScope
                  ) on FIELD_DEFINITION | OBJECT | INTERFACE
                  enum CacheControlScope {
                    PUBLIC
                    PRIVATE
                  }

                  # A `Lift` is a chairlift, gondola, tram, funicular, pulley, rope tow, or other means of ascending a mountain.
                  type Lift {
                    # The unique identifier for a `Lift` (id: "panorama")
                    id: ID!
                    # The name of a `Lift`
                    name: String!
                    # The current status for a `Lift`: `OPEN`, `CLOSED`, `HOLD`
                    status: LiftStatus
                    # The number of people that a `Lift` can hold
                    capacity: Int!
                    # A boolean describing whether a `Lift` is open for night skiing
                    night: Boolean!
                    # The number of feet in elevation that a `Lift` ascends
                    elevationGain: Int!
                    # A list of trails that this `Lift` serves
                    trailAccess: [Trail!]!
                  }

                  # An enum describing the options for `LiftStatus`: `OPEN`, `CLOSED`, `HOLD`
                  enum LiftStatus {
                    OPEN
                    CLOSED
                    HOLD
                  }

                  type Mutation {
                    # Sets a `Lift` status by sending `id` and `status`
                    setLiftStatus(id: ID!, status: LiftStatus!): Lift!
                    # Sets a `Trail` status by sending `id` and `status`
                    setTrailStatus(id: ID!, status: TrailStatus!): Trail!
                  }

                  type Query {
                    # A list of all `Lift` objects
                    allLifts(status: LiftStatus): [Lift!]!
                    # A list of all `Trail` objects
                    allTrails(status: TrailStatus): [Trail!]!
                    # Returns a `Lift` by `id` (id: "panorama")
                    Lift(id: ID!): Lift!
                    # Returns a `Trail` by `id` (id: "old-witch")
                    Trail(id: ID!): Trail!
                    # Returns an `Int` of `Lift` objects with optional `LiftStatus` filter
                    liftCount(status: LiftStatus): Int!
                    # Returns an `Int` of `Trail` objects with optional `TrailStatus` filter
                    trailCount(status: TrailStatus): Int!
                    # Returns a list of `SearchResult` objects based on `term` or `status`
                    search(term: String, status: LiftStatus): [SearchResult!]!
                  }

                  union SearchResult = Lift | Trail
                  type Subscription {
                    # Listens for changes in lift status
                             liftStatusChange: Lift
                    # Listens for changes in trail status
                             trailStatusChange: Trail
                  }

                  # A `Trail` is a run at a ski resort
                  type Trail {
                    id: ID!
                    # The name of a `Trail`
                    name: String!
                    # The current status for a `Trail`: OPEN, CLOSED
                    status: TrailStatus
                    # The difficulty rating for a `Trail`
                    difficulty: String!
                    # A boolean describing whether or not a `Trail` is groomed
                    groomed: Boolean!
                    # A boolean describing whether or not a `Trail` has trees
                    trees: Boolean!
                    # A boolean describing whether or not a `Trail` is open for night skiing
                    night: Boolean!
                    # A list of Lifts that provide access to this `Trail`
                    accessedByLifts: [ Lift! ]!
                  }

                  # An enum describing the options for `TrailStatus`: `OPEN`, `CLOSED`
                  enum TrailStatus {
                  OPEN
                  CLOSED
                  }

                  # The `Upload` scalar type
                  represents a file upload.
                  scalar Upload'
        304:
          description: |
            Not Modified.
            Empty body because the client has already the latest version of the requested resource.
          content: {}
        404:
          $ref: '#/components/responses/NotFound'
        406:
          $ref: '#/components/responses/NotAcceptable'
      security:
        - OAuth2Security: []
      x-code-samples:
        - lang: Curl
          source: curl -k "https://localhost:9443/api/am/devportal/v3/apis/c43a325c-260b-4302-81cb-768eafaa3aed/graphql-schema"

  /apis/{apiId}/sdks/{language}:
    get:
      tags:
        - SDKs
      summary: |
        Generate a SDK for an API
      description: |
        This operation can be used to generate SDKs (System Development Kits), for the APIs available in the API Developer Portal, for a requested development language.
      parameters:
        - $ref: '#/components/parameters/apiId'
        - name: language
          in: path
          description: |
            Programming language of the SDK that is required.

            Languages supported by default are **Java**, **Javascript**, **Android** and **JMeter**.
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/requestedTenant'
      responses:
        200:
          description: |
            OK.
            SDK generated successfully.
          content:
            application/zip:
              schema:
                type: string
                format: byte
        400:
          $ref: '#/components/responses/BadRequest'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      security:
        - OAuth2Security:
            - apim:subscribe
      x-code-samples:
        - lang: Curl
          source: curl -k -H "Authorization:Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8"
            "https://localhost:9443/api/am/devportal/v3/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/sdks/java"
            > Petstore_java_1.0.0.zip

  /apis/{apiId}/wsdl:
    get:
      tags:
        - APIs
      summary: Get API WSDL definition
      description: |
        This operation can be used to retrieve the WSDL definition of an API.
      operationId: getWSDLOfAPI
      parameters:
        - $ref: '#/components/parameters/formatWsdl'
        - $ref: '#/components/parameters/apiId'
        - $ref: '#/components/parameters/environmentName'
        - $ref: '#/components/parameters/If-None-Match'
        - $ref: '#/components/parameters/requestedTenant'
        - $ref: '#/components/parameters/exp'
        - $ref: '#/components/parameters/sig'
        - $ref: '#/components/parameters/requestedTenant-Q'
      response

# --- truncated at 32 KB (297 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/wso2/refs/heads/main/openapi/wso2-devportal-api.yaml