openapi: 3.0.0
info:
  description: >
    This document specifies an **Application Management RESTful API** for WSO2
    Identity Server.
  version: v1
  title: Application Management Rest API
security:
  - OAuth2: []
  - BasicAuth: []
paths:
  /applications:
    get:
      tags:
        - Applications
      operationId: getAllApplications
      summary: |
        List applications
      description: >
        This API provides the capability to retrieve the list of
        applications.<br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - $ref: '#/components/parameters/limitQueryParam'
        - $ref: '#/components/parameters/offsetQueryParam'
        - $ref: '#/components/parameters/filterQueryParam'
        - $ref: '#/components/parameters/sortOrderQueryParam'
        - $ref: '#/components/parameters/sortByQueryParam'
        - $ref: '#/components/parameters/attributesQueryParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications?limit=30&offset=0'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='          
    post:
      tags:
        - Applications
      summary: |
        Add application
      operationId: createApplication
      description: >
        This API provides the capability to store the application information
        that is provided by users.<br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_create`
      parameters:
        - in: query
          name: template
          required: false
          description: |
            Pre-defined template to use when creating the application.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationModel'
        description: This represents the application to be created.
        required: true
      responses:
        '201':
          description: Successful response.
          headers:
            Location:
              description: This denotes the location of the newly-created application.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: |
            curl -X 'POST' \
            'https://localhost:9443/api/server/v1/applications' \
            -H 'accept: */*' \
            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
            -H 'Content-Type: application/json' \
            -d '{
            "name": "pickup",
            "description": "This is the configuration for Pickup application.",
            "imageUrl": "https://example.com/logo/my-logo.png",
            "accessUrl": "https://example.com/login",
            "logoutReturnUrl": "https://example.com/app/logout",
            "templateId": "980b8tester24c64a8a09a0d80abf8c337bd2555",
            "isManagementApp": false,
            "claimConfiguration": {
              "dialect": "LOCAL",
              "claimMappings": [
                {
                  "applicationClaim": "firstname",
                  "localClaim": {
                    "uri": "http://wso2.org/claims/username"
                  }
                }
              ],
              "requestedClaims": [
                {
                  "claim": {
                    "uri": "http://wso2.org/claims/username"
                  },
                  "mandatory": false
                }
              ],
              "subject": {
                "claim": {
                  "uri": "http://wso2.org/claims/username"
                },
                "includeUserDomain": false,
                "includeTenantDomain": false,
                "useMappedLocalSubject": false
              },
              "role": {
                "mappings": [
                  {
                    "localRole": "admin",
                    "applicationRole": "Administrator"
                  }
                ],
                "includeUserDomain": true,
                "claim": {
                  "uri": "http://wso2.org/claims/username"
                }
              }
            },
            "inboundProtocolConfiguration": {
              "saml": {
                "metadataFile": "Base64 encoded metadata file content",
                "metadataURL": "https://example.com/samlsso/meta",
                "manualConfiguration": {
                  "issuer": "string",
                  "serviceProviderQualifier": "string",
                  "assertionConsumerUrls": [
                    "string"
                  ],
                  "defaultAssertionConsumerUrl": "string",
                  "idpEntityIdAlias": "string",
                  "singleSignOnProfile": {
                    "bindings": [
                      "HTTP_POST"
                    ],
                    "enableSignatureValidationForArtifactBinding": false,
                    "enableIdpInitiatedSingleSignOn": false,
                    "assertion": {
                      "nameIdFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
                      "audiences": [
                        "https://app.example.com/saml"
                      ],
                      "recipients": [
                        "https://app.example.com/saml"
                      ],
                      "digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1",
                      "encryption": {
                        "enabled": false,
                        "assertionEncryptionAlgorithm": "http://www.w3.org/2001/04/xmlenc#aes256-cbc",
                        "keyEncryptionAlgorithm": "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
                      }
                    }
                  },
                  "attributeProfile": {
                    "enabled": false,
                    "alwaysIncludeAttributesInResponse": false
                  },
                  "singleLogoutProfile": {
                    "enabled": true,
                    "logoutRequestUrl": "string",
                    "logoutResponseUrl": "string",
                    "logoutMethod": "BACKCHANNEL",
                    "idpInitiatedSingleLogout": {
                      "enabled": false,
                      "returnToUrls": [
                        "string"
                      ]
                    }
                  },
                  "requestValidation": {
                    "enableSignatureValidation": true,
                    "signatureValidationCertAlias": "string"
                  },
                  "responseSigning": {
                    "enabled": true,
                    "signingAlgorithm": "string"
                  },
                  "enableAssertionQueryProfile": false
                }
              },
              "oidc": {
                "clientId": "string",
                "clientSecret": "string",
                "grantTypes": [
                  "authorization_code",
                  "password"
                ],
                "callbackURLs": [
                  "regexp=(https://app.example.com/callback1|https://app.example.com/callback2)"
                ],
                "allowedOrigins": [
                  "https://app.example.com"
                ],
                "publicClient": false,
                "pkce": {
                  "mandatory": false,
                  "supportPlainTransformAlgorithm": true
                },
                "accessToken": {
                  "type": "JWT",
                  "userAccessTokenExpiryInSeconds": 3600,
                  "applicationAccessTokenExpiryInSeconds": 3600,
                  "bindingType": "cookie",
                  "revokeTokensWhenIDPSessionTerminated": true,
                  "validateTokenBinding": true
                },
                "refreshToken": {
                  "expiryInSeconds": 86400,
                  "renewRefreshToken": true
                },
                "idToken": {
                  "expiryInSeconds": 3600,
                  "audience": [
                    "http://idp.xyz.com",
                    "http://idp.abc.com"
                  ],
                  "encryption": {
                    "enabled": false,
                    "algorithm": "RSA-OAEP",
                    "method": "A128CBC+HS256"
                  }
                },
                "logout": {
                  "backChannelLogoutUrl": "https://app.example.com/backchannel/callback",
                  "frontChannelLogoutUrl": "https://app.example.com/frontchannel/callback"
                },
                "validateRequestObjectSignature": false,
                "scopeValidators": [
                  "Role based scope validator",
                  "XACML Scope Validator"
                ]
              },
              "passiveSts": {
                "realm": "string",
                "replyTo": "string"
              },
              "wsTrust": {
                "audience": "https://wstrust.endpoint.com",
                "certificateAlias": "wso2carbon"
              },
              "custom": [
                {
                  "name": "cas",
                  "configName": "cas",
                  "properties": [
                    {
                      "key": "app-identifier",
                      "value": "http://app.wso2.com/employeeApp",
                      "friendlyName": "Application Identifier"
                    }
                  ]
                }
              ]
            },
            "authenticationSequence": {
              "type": "DEFAULT",
              "steps": [
                {
                  "id": 1,
                  "options": [
                    {
                      "idp": "LOCAL",
                      "authenticator": "basic"
                    }
                  ]
                }
              ],
              "requestPathAuthenticators": [
                "string"
              ],
              "script": "string",
              "subjectStepId": 1,
              "attributeStepId": 1
            },
            "advancedConfigurations": {
              "saas": false,
              "discoverableByEndUsers": false,
              "certificate": {
                "type": "string",
                "value": "string"
              },
              "skipLoginConsent": false,
              "skipLogoutConsent": false,
              "returnAuthenticatedIdpList": false,
              "enableAuthorization": true,
              "additionalSpProperties": [
                {
                  "name": "isInternalApp",
                  "value": "true",
                  "displayName": "Internal Application"
                }
              ]
            },
            "provisioningConfigurations": {
              "inboundProvisioning": {
                "proxyMode": false,
                "provisioningUserstoreDomain": "PRIMARY"
              },
              "outboundProvisioningIdps": [
                {
                  "idp": "Google",
                  "connector": "googleapps",
                  "blocking": false,
                  "rules": false,
                  "jit": false
                }
              ]
            }
            }'
  /applications/import:
    post:
      tags:
        - Applications
      summary: |
        Create application from an exported XML file
      operationId: importApplication
      description: >
        This API provides the capability to store the application information,
        provided as a file.<br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_create`
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileUpload'
        description: This represents the application to be created.
      responses:
        '201':
          description: Successfully created.
          headers:
            Location:
              description: Location of the newly created application.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: |
            curl -X 'POST' \
            'https://localhost:9443/api/server/v1/applications/import' \
            -H 'accept: */*' \
            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
            -H 'Content-Type: multipart/form-data' \
            -F 'file=@application.xml;type=text/xml'
    put:
      tags:
        - Applications
      summary: |
        Update application from an exported XML file
      operationId: importApplicationForUpdate
      description: >
        This API provides the capability to update an application from
        information that has been exported as an XML file.<br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileUpload'
        description: This represents the application to be updated.
      responses:
        '200':
          description: Successfully Updated.
          headers:
            Location:
              description: Location of the updated application.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: |
            curl -X 'PUT' \
            'https://localhost:9443/api/server/v1/applications/import' \
            -H 'accept: */*' \
            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
            -H 'Content-Type: multipart/form-data' \
            -F 'file=@application.xml;type=text/xml'
  /applications/{applicationId}:
    get:
      tags:
        - Applications
      summary: |
        Retrieve application by ID
      operationId: getApplication
      description: >
        This API provides the capability to retrieve the application information
        by ID. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    patch:
      tags:
        - Applications
      summary: |
        Partially update application by ID
      operationId: patchApplication
      description: >
        This API provides the capability to partially update an application by
        ID.<br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationPatchModel'
        description: This represents the application details to be updated.
        required: true
      responses:
        '200':
          description: Successfully Updated
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'PATCH' \

            'https://localhost:9443/api/server/v1/applications/{application-id}'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -H 'Content-Type: application/json' \

            -d '{

            "name": "pickup",

            "description": "This is the configuration for Pickup application.",

            "imageUrl": "https://example.com/logo/my-logo.png",

            "accessUrl": "https://example.com/login",

            "logoutReturnUrl": "https://example.com/app/logout",

            "templateId": "adwefi2429asdfdf94444rraf44",

            "claimConfiguration": {
              "dialect": "LOCAL",
              "claimMappings": [
                {
                  "applicationClaim": "firstname",
                  "localClaim": {
                    "uri": "http://wso2.org/claims/username"
                  }
                }
              ],
              "requestedClaims": [
                {
                  "claim": {
                    "uri": "http://wso2.org/claims/username"
                  },
                  "mandatory": false
                }
              ],
              "subject": {
                "claim": {
                  "uri": "http://wso2.org/claims/username"
                },
                "includeUserDomain": false,
                "includeTenantDomain": false,
                "useMappedLocalSubject": false
              },
              "role": {
                "mappings": [
                  {
                    "localRole": "admin",
                    "applicationRole": "Administrator"
                  }
                ],
                "includeUserDomain": true,
                "claim": {
                  "uri": "http://wso2.org/claims/username"
                }
              }
            },

            "authenticationSequence": {
              "type": "DEFAULT",
              "steps": [
                {
                  "id": 1,
                  "options": [
                    {
                      "idp": "LOCAL",
                      "authenticator": "basic"
                    }
                  ]
                }
              ],
              "requestPathAuthenticators": [
                "string"
              ],
              "script": "string",
              "subjectStepId": 1,
              "attributeStepId": 1
            },

            "advancedConfigurations": {
              "saas": false,
              "discoverableByEndUsers": false,
              "certificate": {
                "type": "string",
                "value": "string"
              },
              "skipLoginConsent": false,
              "skipLogoutConsent": false,
              "useExternalConsentPage": false,
              "returnAuthenticatedIdpList": false,
              "enableAuthorization": true,
              "additionalSpProperties": [
                {
                  "name": "isInternalApp",
                  "value": "true",
                  "displayName": "Internal Application"
                }
              ]
            },

            "provisioningConfigurations": {
              "inboundProvisioning": {
                "proxyMode": false,
                "provisioningUserstoreDomain": "PRIMARY"
              },
              "outboundProvisioningIdps": [
                {
                  "idp": "Google",
                  "connector": "googleapps",
                  "blocking": false,
                  "rules": false,
                  "jit": false
                }
              ]
            }

            }'
    delete:
      tags:
        - Applications
      summary: |
        Delete application by ID
      operationId: deleteApplication
      description: |
        This API provides the capability to delete an application by ID. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_delete`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successfully Deleted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'DELETE' \

            'https://localhost:9443/api/server/v1/applications/{application-id}'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/export:
    get:
      tags:
        - Applications
      operationId: exportApplication
      summary: |
        Export application as an XML file
      description: >
        This API provides the capability to retrieve the application as an XML
        file.<br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/exportSecretsQueryParam'
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                example: Sample application configuration xml as a string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/export?exportSecrets=false'
            \

            -H 'accept: application/octet-stream' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/owner:
    put:
      tags:
        - Applications
      operationId: changeApplicationOwner
      summary: |
        Change application owner
      description: |
        This API provides the capability to change the application owner.<br>
          <b>Scope(Permission) required:</b> `internal_organization_admin`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationOwner'
      responses:
        '200':
          description: Successfully Updated
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'PUT' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/owner'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -H 'Content-Type: application/json' \

            -d '{

            "id": "85e3f4b8-0d22-4181-b1e3-1651f71b88bd"

            }'
  /applications/{applicationId}/authenticators:
    get:
      tags:
        - Authenticators
      summary: |
        Get configured authenticators
      operationId: getConfiguredAuthenticators
      description: >
        This API provides the capability to retrieve the configured
        authenticators.

        <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConfiguredAuthenticatorsModal'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/authenticators'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/authorized-apis:
    get:
      tags:
        - Authorized APIs
      summary: |
        Get authorized APIs of the application.
      operationId: getAuthorizedAPIs
      description: >
        This API provides the capability to retrieve all the authorized APIs of
        the application.<br>

          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AuthorizedAPIResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location
            'https://localhost:9443/api/server/v1/applications/{application-id}/authorized-apis'
            \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    post:
      tags:
        - Authorized APIs
      summary: |
        Authorized an API to the application
      operationId: addAuthorizedAPI
      description: >
        This API provides the capability to authorized an API to the
        application.<br>

          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizedAPICreationModel'
      responses:
        '201':
          description: Created
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location
            'https://localhost:9443/api/server/v1/applications/{application-id}/authorized-apis'
            \

            -H 'Content-Type: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -d '{
                "id": "65b52595-9ca1-4539-aca2-56178643c58b",
                "policyIdentifier": "RBAC",
                "scopes": [
                    "bookings:read"
                ]
            }'
      x-codegen-request-body-name: body
  /applications/{applicationId}/authorized-apis/{apiId}:
    patch:
      tags:
        - Authorized APIs
      summary: |
        Update authorized API scopes
      operationId: patchAuthorizedAPI
      description: >
        This API provides the capability to update an authorized API of the
        application.<br>

          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
        - name: apiId
          in: path
          description: ID of the API resource.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizedAPIPatchModel'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location --request PATCH
            'https://localhost:9443/api/server/v1/applications/{application-id}/authorized-apis/{api-id}'
            \

            -H 'Content-Type: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -d '{
                "addedScopes": [
                    "bookings:write"
                ],
                "removedScopes": [
                    "bookings:read"
                ]
            }'
      x-codegen-request-body-name: body
    delete:
      tags:
        - Authorized APIs
      summary: |
        Remove API authorization from the application
      operationId: deleteAuthorizedAPI
      description: >
        This API provides the capability to delete an authorized API of the
        application.<br>

          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
        - name: apiId
          in: path
          description: ID of the API resource.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location --request DELETE
            'https://localhost:9443/api/server/v1/applications/{application-id}/authorized-apis/{api-id}'
            \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/resident:
    get:
      tags:
        - Resident Application
      summary: |
        Get Resident application
      operationId: getResidentApplication
      description: >
        This API provides the capability to retrieve the resident application
        information.

        <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResidentApplication'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: |
            curl -X 'GET' \
            'https://localhost:9443/api/server/v1/applications/resident' \
            -H 'accept: application/json' \
            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    put:
      tags:
        - Resident Application
      summary: |
        Update resident application
      operationId: updateResidentApplication
      description: >
        This API provides the capability to update the Resident Application
        Configuration. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      responses:
        '200':
          description: Successful
        '201':
          description: Successful response.
          headers:
            Location:
              description: >-
                Location of the provisioning configuration of the resident
                application.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: |
            curl -X 'PUT' \
            'https://localhost:9443/api/server/v1/applications/resident' \
            -H 'accept: */*' \
            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
            -H 'Content-Type: application/json' \
            -d '{
            "inboundProvisioning": {
              "proxyMode": false,
              "provisioningUserstoreDomain": "PRIMARY"
            },
            "outboundProvisioningIdps": [
              {
                "idp": "Google",
                "connector": "googleapps",
                "blocking": false,
                "rules": false,
                "jit": false
              }
            ]
            }'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProvisioningConfiguration'
        description: >-
          This represents the provisioning configuration of the resident
          application.
        required: true
  /applications/{applicationId}/inbound-protocols/:
    get:
      tags:
        - Inbound Protocols
      summary: |
        Retrieve inbound protocol configurations
      operationId: getInboundAuthenticationConfigurations
      description: >
        This API provides the capability to retrieve authentication protocol
        configurations of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboundProtocolsListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/inbound-protocols/saml:
    get:
      tags:
        - Inbound Protocols - SAML
      summary: |
        Retrieve SAML2 authentication protocol parameters
      operationId: getInboundSAMLConfiguration
      description: >
        This API provides the capability to retrieve SAML2 authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SAML2ServiceProvider'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/saml'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    put:
      tags:
        - Inbound Protocols - SAML
      summary: |
        Update SAML2 authentication protocol parameters
      operationId: updateInboundSAMLConfiguration
      description: >
        This API provides the capability to store SAML2 authentication protocol
        parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`

        - There are three methods to create/update SAML2 authentication protocol
        configuration.
            1. Metadata File (by sending the Base64 encoded content of the metadata file.)
            2. Metadata URL
            3. Manual configuration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful
        '201':
          description: Successful response.
          headers:
            Location:
              description: Location of the newly created SAML Inbound configuration.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'PUT' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/saml'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -H 'Content-Type: application/json' \

            -d '{

            "metadataFile": "Base64 encoded metadata file content",

            "metadataURL": "https://example.com/samlsso/meta",

            "manualConfiguration": {
              "issuer": "string",
              "serviceProviderQualifier": "string",
              "assertionConsumerUrls": [
                "string"
              ],
              "defaultAssertionConsumerUrl": "string",
              "idpEntityIdAlias": "string",
              "singleSignOnProfile": {
                "bindings": [
                  "HTTP_POST"
                ],
                "enableSignatureValidationForArtifactBinding": false,
                "enableIdpInitiatedSingleSignOn": false,
                "assertion": {
                  "nameIdFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
                  "audiences": [
                    "https://app.example.com/saml"
                  ],
                  "recipients": [
                    "https://app.example.com/saml"
                  ],
                  "digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1",
                  "encryption": {
                    "enabled": false,
                    "assertionEncryptionAlgorithm": "http://www.w3.org/2001/04/xmlenc#aes256-cbc",
                    "keyEncryptionAlgorithm": "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
                  }
                }
              },
              "attributeProfile": {
                "enabled": false,
                "alwaysIncludeAttributesInResponse": false
              },
              "singleLogoutProfile": {
                "enabled": true,
                "logoutRequestUrl": "string",
                "logoutResponseUrl": "string",
                "logoutMethod": "BACKCHANNEL",
                "idpInitiatedSingleLogout": {
                  "enabled": false,
                  "returnToUrls": [
                    "string"
                  ]
                }
              },
              "requestValidation": {
                "enableSignatureValidation": true,
                "signatureValidationCertAlias": "string"
              },
              "responseSigning": {
                "enabled": true,
                "signingAlgorithm": "string"
              },
              "enableAssertionQueryProfile": false
            }

            }'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SAML2Configuration'
        description: This represents the SAML2 protocol attributes of the application.
        required: true
    delete:
      tags:
        - Inbound Protocols - SAML
      summary: |
        Delete SAML2 authentication protocol parameters
      operationId: deleteInboundSAMLConfiguration
      description: >
        This API provides the capability to delete SAML2 authentication protocol
        parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_delete`
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Delete successful
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'DELETE' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/saml'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/inbound-protocols/oidc:
    get:
      tags:
        - Inbound Protocols - OAuth / OIDC
      summary: |
        Retrieve OIDC authentication protocol parameters
      description: >
        This API provides the capability to retrieve OIDC authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getInboundOAuthConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDConnectConfiguration'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/oidc'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    put:
      tags:
        - Inbound Protocols - OAuth / OIDC
      summary: |
        Update OIDC authentication protocol parameters
      description: >
        This API provides the capability to store OIDC authentication protocol
        parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      operationId: updateInboundOAuthConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful
        '201':
          description: Created
          headers:
            Location:
              description: >-
                This is the location of the newly created OIDC Authentication
                Configuration.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'PUT' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/oidc'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -H 'Content-Type: application/json' \

            -d '{

            "clientId": "string",

            "clientSecret": "string",

            "grantTypes": [
              "authorization_code",
              "password"
            ],

            "callbackURLs": [
              "regexp=(https://app.example.com/callback1|https://app.example.com/callback2)"
            ],

            "allowedOrigins": [
              "https://app.example.com"
            ],

            "publicClient": false,

            "pkce": {
              "mandatory": false,
              "supportPlainTransformAlgorithm": true
            },

            "accessToken": {
              "type": "JWT",
              "userAccessTokenExpiryInSeconds": 3600,
              "applicationAccessTokenExpiryInSeconds": 3600,
              "bindingType": "cookie",
              "revokeTokensWhenIDPSessionTerminated": true,
              "validateTokenBinding": true
            },

            "refreshToken": {
              "expiryInSeconds": 86400,
              "renewRefreshToken": true
            },

            "idToken": {
              "expiryInSeconds": 3600,
              "audience": [
                "http://idp.xyz.com",
                "http://idp.abc.com"
              ],
              "encryption": {
                "enabled": false,
                "algorithm": "RSA-OAEP",
                "method": "A128CBC+HS256"
              }
            },

            "logout": {
              "backChannelLogoutUrl": "https://app.example.com/backchannel/callback",
              "frontChannelLogoutUrl": "https://app.example.com/frontchannel/callback"
            },

            "validateRequestObjectSignature": false,

            "scopeValidators": [
              "Role based scope validator",
              "XACML Scope Validator"
            ]

            }'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenIDConnectConfiguration'
        description: >-
          This represents the OIDC authentication protocol parameters of an
          application.
        required: true
    delete:
      tags:
        - Inbound Protocols - OAuth / OIDC
      summary: |
        Delete OIDC authentication protocol parameters
      description: >
        This API provides the capability to delete OIDC authentication protocol
        parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_delete`
      operationId: deleteInboundOAuthConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Delete Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'DELETE' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/oidc'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/inbound-protocols/oidc/regenerate-secret:
    post:
      tags:
        - Inbound Protocols - OAuth / OIDC
      summary: |
        Regenerate the OAuth2/OIDC client secret
      description: |
        This API regenerates the OAuth2/OIDC client secret. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_create`
      operationId: regenerateOAuthClientSecret
      parameters:
        - name: applicationId
          in: path
          description: ID of the application
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenIDConnectConfiguration'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'POST' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/oidc/regenerate-secret'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -d ''
  /applications/{applicationId}/inbound-protocols/oidc/revoke:
    post:
      tags:
        - Inbound Protocols - OAuth / OIDC
      summary: |
        Revoke the OAuth2/OIDC client of application
      description: >
        This API revokes the OAuth2/OIDC client secret. To re-activate the
        client, the client secret needs to be regenerated. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_create`
      operationId: revokeOAuthClient
      parameters:
        - name: applicationId
          in: path
          description: ID of the application
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Application Revoked
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'POST' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/oidc/revoke'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -d ''
  /applications/{applicationId}/inbound-protocols/passive-sts:
    get:
      tags:
        - Inbound Protocols - Passive STS
      summary: |
        Retrieve Passive STS authentication protocol parameters
      description: >
        This API provides the capability to retrieve Passive STS authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getPassiveStsConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PassiveStsConfiguration'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/passive-sts'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    put:
      tags:
        - Inbound Protocols - Passive STS
      summary: |
        Update Passive STS authentication protocol parameters
      description: >
        This API provides the capability to store passive STS authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      operationId: updatePassiveStsConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful
        '201':
          description: Successful response.
          headers:
            Location:
              description: >-
                Location of the newly created Passive STS Authentication
                Configuration.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'PUT' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/passive-sts'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -H 'Content-Type: application/json' \

            -d '{

            "realm": "string",

            "replyTo": "string"

            }'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PassiveStsConfiguration'
        description: >-
          This represents the Passive STS authentication protocol parameters of
          an application.
        required: true
    delete:
      tags:
        - Inbound Protocols - Passive STS
      summary: |
        Delete Passive STS authentication protocol parameters
      description: >
        This API provides the capability to delete Passive STS authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_delete`
      operationId: deletePassiveStsConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Delete Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'DELETE' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/passive-sts'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/inbound-protocols/ws-trust:
    get:
      tags:
        - Inbound Protocols - WS Trust
      summary: |
        Retrieve WS Trust authentication protocol parameters
      description: >
        This API provides the capability to retrieve Passive STS authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getWSTrustConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WSTrustConfiguration'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/ws-trust'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    put:
      tags:
        - Inbound Protocols - WS Trust
      summary: |
        Update WS Trust authentication protocol parameters
      description: >
        This API provides the capability to store WS Trust authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      operationId: updateWSTrustConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful
        '201':
          description: Successful response.
          headers:
            Location:
              description: >-
                Location of the newly created WS Trust Authentication
                Configuration.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'PUT' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/ws-trust'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -H 'Content-Type: application/json' \

            -d '{

            "audience": "https://wstrust.endpoint.com",

            "certificateAlias": "wso2carbon"

            }'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WSTrustConfiguration'
        description: >-
          This represents the Passive STS authentication protocol parameters of
          an application.
        required: true
    delete:
      tags:
        - Inbound Protocols - WS Trust
      summary: |
        Delete WS Trust authentication protocol parameters
      description: >
        This API provides the capability to delete WS Trust authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_delete`
      operationId: deleteWSTrustConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Delete Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'DELETE' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/ws-trust'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/inbound-protocols/{inboundProtocolId}:
    get:
      tags:
        - Inbound Protocols - Custom
      summary: |
        Retrieve custom inbound authentication protocol parameters
      description: >
        This API provides the capability to retrieve custom inbound
        authentication protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getCustomInboundConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application
          required: true
          schema:
            type: string
        - name: inboundProtocolId
          in: path
          description: Inbound Authentication Protocol ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomInboundProtocolConfiguration'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/{inbound-protocol-id}'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    put:
      tags:
        - Inbound Protocols - Custom
      summary: |
        Update the custom inbound authentication protocol parameters
      description: >
        This API provides the capability to store custom inbound authentication
        protocol parameters of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      operationId: updateCustomInboundConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
        - name: inboundProtocolId
          in: path
          description: Inbound Authentication Protocol ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful
        '201':
          description: Successful response.
          headers:
            Location:
              description: >-
                Location of the newly created Custom Inbound authentication
                protocol Configuration.
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'PUT' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/{inbound-protocol-id}'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -H 'Content-Type: application/json' \

            -d '{

            "name": "cas",

            "configName": "cas",

            "properties": [
              {
                "key": "app-identifier",
                "value": "http://app.wso2.com/employeeApp",
                "friendlyName": "Application Identifier"
              }
            ]

            }'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomInboundProtocolConfiguration'
        description: >-
          This represents the Custom Inbound authentication protocol parameters
          of an application.
        required: true
    delete:
      tags:
        - Inbound Protocols - Custom
      summary: |
        Delete custom inbound authentication protocol parameters
      description: >
        This API provides the capability to delete custom inbound authentication
        protocol of an application. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_delete`
      operationId: deleteCustomInboundConfiguration
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
        - name: inboundProtocolId
          in: path
          description: Inbound Authentication Protocol ID
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Delete Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'DELETE' \

            'https://localhost:9443/api/server/v1/applications/{application-id}/inbound-protocols/{inbound-protocol-id}'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/meta/inbound-protocols:
    get:
      tags:
        - Application Metadata
      summary: |
        Retrieve the list of inbound authentication protocols available
      description: >
        This API provides the capability to retrieve the list of inbound
        authentication protocols available. If the query parameter 'customOnly'
        is set to true, only custom inbound protocols will be listed. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getInboundProtocols
      parameters:
        - $ref: '#/components/parameters/inboundProtocolsCustomOnly'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AuthProtocolMetadata'
                example:
                  - name: saml
                    displayName: SAML2 Web SSO Configuration
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/meta/inbound-protocols?customOnly=true'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/meta/inbound-protocols/saml:
    get:
      tags:
        - Application Metadata
      summary: |
        Retrieve all the metadata related to the auth protocol SAML
      description: >
        This API provides the capability to retrieve all the metadata related to
        the auth protocol SAML. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getSAMLMetadata
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SAMLMetaData'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/meta/inbound-protocols/saml'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/meta/inbound-protocols/oidc:
    get:
      tags:
        - Application Metadata
      summary: >
        Retrieve all the metadata related to the authentication protocol OAuth /
        OIDC
      description: >
        This API provides the capability to retrieve all the metadata related to
        the authentication protocol OAuth / OIDC. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getOIDCMetadata
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OIDCMetaData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/meta/inbound-protocols/oidc'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/meta/inbound-protocols/ws-trust:
    get:
      tags:
        - Application Metadata
      summary: |
        Retrieve all the metadata related to the auth protocol WS Trust
      description: >
        This API provides the capability to retrieve all the metadata related to
        the auth protocol WS_Trust. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getWSTrustMetadata
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WSTrustMetaData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/meta/inbound-protocols/ws-trust'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/meta/inbound-protocols/{inboundProtocolId}:
    get:
      tags:
        - Application Metadata
      summary: >
        Retrieve all the metadata related to the custom auth protocol identified
        by the inboundProtocolId
      description: >
        This API provides the capability to retrieve all the metadata related to
        the custom auth protocol identified by the inboundProtocolId. The URL
        encoded inbound protocol name is used as inboundProtocolId.<br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getCustomProtocolMetadata
      parameters:
        - name: inboundProtocolId
          in: path
          description: Inbound Authentication Protocol ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomInboundProtocolMetaData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/meta/inbound-protocols/{inbound-protocol-id}'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/meta/adaptive-auth-templates:
    get:
      tags:
        - Application Metadata
      summary: |
        Retrieve adaptive authentication sample templates
      description: >
        This API provides the capability to retrieve the sample adaptive
        authentication templates. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      operationId: getAdaptiveAuthTemplates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdaptiveAuthTemplates'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/meta/adaptive-auth-templates'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/templates:
    get:
      tags:
        - Application Templates
      operationId: getAllApplicationTemplates
      summary: |
        List application templates
      description: >
        This API provides the capability to retrieve the list of templates
        available. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - $ref: '#/components/parameters/limitWithoutDefaultQueryParam'
        - $ref: '#/components/parameters/offsetWithoutDefaultQueryParam'
        - $ref: '#/components/parameters/filterQueryParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationTemplatesList'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: |
            curl -X 'GET' \
            'https://localhost:9443/api/server/v1/applications/templates' \
            -H 'accept: application/json' \
            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    post:
      tags:
        - Application Templates
      summary: |
        Add application template
      operationId: createApplicationTemplate
      description: >
        This API provides the capability to store the application template
        provided by users. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_create`
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationTemplateModel'
        description: This represents the application template to be created.
        required: true
      responses:
        '201':
          description: Successful response.
          headers:
            Location:
              description: Location of the newly created application template.
              schema:
                type: string
                example: >-
                  /t/wso2.com/api/server/v1/applications/templates/85e3f4b8-0d22-4181-b1e3-1651f71b88bd
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: |
            curl -X 'POST' \
            'https://localhost:9443/api/server/v1/applications/templates' \
            -H 'accept: */*' \
            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
            -H 'Content-Type: application/json' \
            -d '{
            "name": "OIDC Protocol Template",
            "description": "Template to be used for Single Page Applications",
            "image": "https://example.com/logo/my-logo.png",
            "authenticationProtocol": "oidc",
            "types": [
              "react",
              "angular"
            ],
            "category": "DEFAULT",
            "templateGroup": "web-application",
            "displayOrder": 2,
            "application": {
              "name": "pickup",
              "description": "This is the configuration for Pickup application.",
              "imageUrl": "https://example.com/logo/my-logo.png",
              "accessUrl": "https://example.com/login",
              "templateId": "980b8tester24c64a8a09a0d80abf8c337bd2555",
              "isManagementApp": false,
              "claimConfiguration": {
                "dialect": "LOCAL",
                "claimMappings": [
                  {
                    "applicationClaim": "firstname",
                    "localClaim": {
                      "uri": "http://wso2.org/claims/username"
                    }
                  }
                ],
                "requestedClaims": [
                  {
                    "claim": {
                      "uri": "http://wso2.org/claims/username"
                    },
                    "mandatory": false
                  }
                ],
                "subject": {
                  "claim": {
                    "uri": "http://wso2.org/claims/username"
                  },
                  "includeUserDomain": false,
                  "includeTenantDomain": false,
                  "useMappedLocalSubject": false
                },
                "role": {
                  "mappings": [
                    {
                      "localRole": "admin",
                      "applicationRole": "Administrator"
                    }
                  ],
                  "includeUserDomain": true,
                  "claim": {
                    "uri": "http://wso2.org/claims/username"
                  }
                }
              },
              "inboundProtocolConfiguration": {
                "saml": {
                  "metadataFile": "Base64 encoded metadata file content",
                  "metadataURL": "https://example.com/samlsso/meta",
                  "manualConfiguration": {
                    "issuer": "string",
                    "serviceProviderQualifier": "string",
                    "assertionConsumerUrls": [
                      "string"
                    ],
                    "defaultAssertionConsumerUrl": "string",
                    "idpEntityIdAlias": "string",
                    "singleSignOnProfile": {
                      "bindings": [
                        "HTTP_POST"
                      ],
                      "enableSignatureValidationForArtifactBinding": false,
                      "enableIdpInitiatedSingleSignOn": false,
                      "assertion": {
                        "nameIdFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
                        "audiences": [
                          "https://app.example.com/saml"
                        ],
                        "recipients": [
                          "https://app.example.com/saml"
                        ],
                        "digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1",
                        "encryption": {
                          "enabled": false,
                          "assertionEncryptionAlgorithm": "http://www.w3.org/2001/04/xmlenc#aes256-cbc",
                          "keyEncryptionAlgorithm": "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
                        }
                      }
                    },
                    "attributeProfile": {
                      "enabled": false,
                      "alwaysIncludeAttributesInResponse": false
                    },
                    "singleLogoutProfile": {
                      "enabled": true,
                      "logoutRequestUrl": "string",
                      "logoutResponseUrl": "string",
                      "logoutMethod": "BACKCHANNEL",
                      "idpInitiatedSingleLogout": {
                        "enabled": false,
                        "returnToUrls": [
                          "string"
                        ]
                      }
                    },
                    "requestValidation": {
                      "enableSignatureValidation": true,
                      "signatureValidationCertAlias": "string"
                    },
                    "responseSigning": {
                      "enabled": true,
                      "signingAlgorithm": "string"
                    },
                    "enableAssertionQueryProfile": false
                  }
                },
                "oidc": {
                  "clientId": "string",
                  "clientSecret": "string",
                  "grantTypes": [
                    "authorization_code",
                    "password"
                  ],
                  "callbackURLs": [
                    "regexp=(https://app.example.com/callback1|https://app.example.com/callback2)"
                  ],
                  "allowedOrigins": [
                    "https://app.example.com"
                  ],
                  "publicClient": false,
                  "pkce": {
                    "mandatory": false,
                    "supportPlainTransformAlgorithm": true
                  },
                  "accessToken": {
                    "type": "JWT",
                    "userAccessTokenExpiryInSeconds": 3600,
                    "applicationAccessTokenExpiryInSeconds": 3600,
                    "bindingType": "cookie",
                    "revokeTokensWhenIDPSessionTerminated": true,
                    "validateTokenBinding": true
                  },
                  "refreshToken": {
                    "expiryInSeconds": 86400,
                    "renewRefreshToken": true
                  },
                  "idToken": {
                    "expiryInSeconds": 3600,
                    "audience": [
                      "http://idp.xyz.com",
                      "http://idp.abc.com"
                    ],
                    "encryption": {
                      "enabled": false,
                      "algorithm": "RSA-OAEP",
                      "method": "A128CBC+HS256"
                    }
                  },
                  "logout": {
                    "backChannelLogoutUrl": "https://app.example.com/backchannel/callback",
                    "frontChannelLogoutUrl": "https://app.example.com/frontchannel/callback"
                  },
                  "validateRequestObjectSignature": false,
                  "scopeValidators": [
                    "Role based scope validator",
                    "XACML Scope Validator"
                  ]
                },
                "passiveSts": {
                  "realm": "string",
                  "replyTo": "string"
                },
                "wsTrust": {
                  "audience": "https://wstrust.endpoint.com",
                  "certificateAlias": "wso2carbon"
                },
                "custom": [
                  {
                    "name": "cas",
                    "configName": "cas",
                    "properties": [
                      {
                        "key": "app-identifier",
                        "value": "http://app.wso2.com/employeeApp",
                        "friendlyName": "Application Identifier"
                      }
                    ]
                  }
                ]
              },
              "authenticationSequence": {
                "type": "DEFAULT",
                "steps": [
                  {
                    "id": 1,
                    "options": [
                      {
                        "idp": "LOCAL",
                        "authenticator": "basic"
                      }
                    ]
                  }
                ],
                "requestPathAuthenticators": [
                  "string"
                ],
                "script": "string",
                "subjectStepId": 1,
                "attributeStepId": 1
              },
              "advancedConfigurations": {
                "saas": false,
                "discoverableByEndUsers": false,
                "certificate": {
                  "type": "string",
                  "value": "string"
                },
                "skipLoginConsent": false,
                "skipLogoutConsent": false,
                "useExternalConsentPage": false,
                "returnAuthenticatedIdpList": false,
                "enableAuthorization": true,
                "additionalSpProperties": [
                  {
                    "name": "isInternalApp",
                    "value": "true",
                    "displayName": "Internal Application"
                  }
                ]
              },
              "provisioningConfigurations": {
                "inboundProvisioning": {
                  "proxyMode": false,
                  "provisioningUserstoreDomain": "PRIMARY"
                },
                "outboundProvisioningIdps": [
                  {
                    "idp": "Google",
                    "connector": "googleapps",
                    "blocking": false,
                    "rules": false,
                    "jit": false
                  }
                ]
              }
            }
            }'
  /applications/templates/{template-id}:
    get:
      tags:
        - Application Templates
      summary: |
        Retrieve application template by ID
      operationId: getApplicationTemplate
      description: >
        This API provides the capability to retrieve the application template
        from the template id. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_view`
      parameters:
        - $ref: '#/components/parameters/templateIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationTemplateModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'GET' \

            'https://localhost:9443/api/server/v1/applications/templates/{template-id}'
            \

            -H 'accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    put:
      tags:
        - Application Templates
      summary: |
        Update the application template by the template ID
      operationId: updateApplicationTemplate
      description: >
        This API provides the capability to update an application template by
        the template ID. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_update`
      parameters:
        - $ref: '#/components/parameters/templateIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationTemplateModel'
        description: This represents the new application template.
        required: true
      responses:
        '200':
          description: Successfully Updated
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'PUT' \

            'https://localhost:9443/api/server/v1/applications/templates/{template-id}'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -H 'Content-Type: application/json' \

            -d '{

            "name": "OIDC Protocol Template",

            "description": "Template to be used for Single Page Applications",

            "image": "https://example.com/logo/my-logo.png",

            "authenticationProtocol": "oidc",

            "types": [
              "react",
              "angular"
            ],

            "category": "DEFAULT",

            "templateGroup": "web-application",

            "displayOrder": 2,

            "application": {
              "name": "pickup",
              "description": "This is the configuration for Pickup application.",
              "imageUrl": "https://example.com/logo/my-logo.png",
              "accessUrl": "https://example.com/login",
              "templateId": "980b8tester24c64a8a09a0d80abf8c337bd2555",
              "isManagementApp": false,
              "claimConfiguration": {
                "dialect": "LOCAL",
                "claimMappings": [
                  {
                    "applicationClaim": "firstname",
                    "localClaim": {
                      "uri": "http://wso2.org/claims/username"
                    }
                  }
                ],
                "requestedClaims": [
                  {
                    "claim": {
                      "uri": "http://wso2.org/claims/username"
                    },
                    "mandatory": false
                  }
                ],
                "subject": {
                  "claim": {
                    "uri": "http://wso2.org/claims/username"
                  },
                  "includeUserDomain": false,
                  "includeTenantDomain": false,
                  "useMappedLocalSubject": false
                },
                "role": {
                  "mappings": [
                    {
                      "localRole": "admin",
                      "applicationRole": "Administrator"
                    }
                  ],
                  "includeUserDomain": true,
                  "claim": {
                    "uri": "http://wso2.org/claims/username"
                  }
                }
              },
              "inboundProtocolConfiguration": {
                "saml": {
                  "metadataFile": "Base64 encoded metadata file content",
                  "metadataURL": "https://example.com/samlsso/meta",
                  "manualConfiguration": {
                    "issuer": "string",
                    "serviceProviderQualifier": "string",
                    "assertionConsumerUrls": [
                      "string"
                    ],
                    "defaultAssertionConsumerUrl": "string",
                    "idpEntityIdAlias": "string",
                    "singleSignOnProfile": {
                      "bindings": [
                        "HTTP_POST"
                      ],
                      "enableSignatureValidationForArtifactBinding": false,
                      "enableIdpInitiatedSingleSignOn": false,
                      "assertion": {
                        "nameIdFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
                        "audiences": [
                          "https://app.example.com/saml"
                        ],
                        "recipients": [
                          "https://app.example.com/saml"
                        ],
                        "digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1",
                        "encryption": {
                          "enabled": false,
                          "assertionEncryptionAlgorithm": "http://www.w3.org/2001/04/xmlenc#aes256-cbc",
                          "keyEncryptionAlgorithm": "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
                        }
                      }
                    },
                    "attributeProfile": {
                      "enabled": false,
                      "alwaysIncludeAttributesInResponse": false
                    },
                    "singleLogoutProfile": {
                      "enabled": true,
                      "logoutRequestUrl": "string",
                      "logoutResponseUrl": "string",
                      "logoutMethod": "BACKCHANNEL",
                      "idpInitiatedSingleLogout": {
                        "enabled": false,
                        "returnToUrls": [
                          "string"
                        ]
                      }
                    },
                    "requestValidation": {
                      "enableSignatureValidation": true,
                      "signatureValidationCertAlias": "string"
                    },
                    "responseSigning": {
                      "enabled": true,
                      "signingAlgorithm": "string"
                    },
                    "enableAssertionQueryProfile": false
                  }
                },
                "oidc": {
                  "clientId": "string",
                  "clientSecret": "string",
                  "grantTypes": [
                    "authorization_code",
                    "password"
                  ],
                  "callbackURLs": [
                    "regexp=(https://app.example.com/callback1|https://app.example.com/callback2)"
                  ],
                  "allowedOrigins": [
                    "https://app.example.com"
                  ],
                  "publicClient": false,
                  "pkce": {
                    "mandatory": false,
                    "supportPlainTransformAlgorithm": true
                  },
                  "accessToken": {
                    "type": "JWT",
                    "userAccessTokenExpiryInSeconds": 3600,
                    "applicationAccessTokenExpiryInSeconds": 3600,
                    "bindingType": "cookie",
                    "revokeTokensWhenIDPSessionTerminated": true,
                    "validateTokenBinding": true
                  },
                  "refreshToken": {
                    "expiryInSeconds": 86400,
                    "renewRefreshToken": true
                  },
                  "idToken": {
                    "expiryInSeconds": 3600,
                    "audience": [
                      "http://idp.xyz.com",
                      "http://idp.abc.com"
                    ],
                    "encryption": {
                      "enabled": false,
                      "algorithm": "RSA-OAEP",
                      "method": "A128CBC+HS256"
                    }
                  },
                  "logout": {
                    "backChannelLogoutUrl": "https://app.example.com/backchannel/callback",
                    "frontChannelLogoutUrl": "https://app.example.com/frontchannel/callback"
                  },
                  "validateRequestObjectSignature": false,
                  "scopeValidators": [
                    "Role based scope validator",
                    "XACML Scope Validator"
                  ]
                },
                "passiveSts": {
                  "realm": "string",
                  "replyTo": "string"
                },
                "wsTrust": {
                  "audience": "https://wstrust.endpoint.com",
                  "certificateAlias": "wso2carbon"
                },
                "custom": [
                  {
                    "name": "cas",
                    "configName": "cas",
                    "properties": [
                      {
                        "key": "app-identifier",
                        "value": "http://app.wso2.com/employeeApp",
                        "friendlyName": "Application Identifier"
                      }
                    ]
                  }
                ]
              },
              "authenticationSequence": {
                "type": "DEFAULT",
                "steps": [
                  {
                    "id": 1,
                    "options": [
                      {
                        "idp": "LOCAL",
                        "authenticator": "basic"
                      }
                    ]
                  }
                ],
                "requestPathAuthenticators": [
                  "string"
                ],
                "script": "string",
                "subjectStepId": 1,
                "attributeStepId": 1
              },
              "advancedConfigurations": {
                "saas": false,
                "discoverableByEndUsers": false,
                "certificate": {
                  "type": "string",
                  "value": "string"
                },
                "skipLoginConsent": false,
                "skipLogoutConsent": false,
                "useExternalConsentPage": false,
                "returnAuthenticatedIdpList": false,
                "enableAuthorization": true,
                "additionalSpProperties": [
                  {
                    "name": "isInternalApp",
                    "value": "true",
                    "displayName": "Internal Application"
                  }
                ]
              },
              "provisioningConfigurations": {
                "inboundProvisioning": {
                  "proxyMode": false,
                  "provisioningUserstoreDomain": "PRIMARY"
                },
                "outboundProvisioningIdps": [
                  {
                    "idp": "Google",
                    "connector": "googleapps",
                    "blocking": false,
                    "rules": false,
                    "jit": false
                  }
                ]
              }
            }

            }'
    delete:
      tags:
        - Application Templates
      summary: |
        Delete application template by template ID
      operationId: deleteApplicationTemplate
      description: >
        This API provides the capability to delete an application template by
        template ID. <br>
          <b>Scope(Permission) required:</b> `internal_application_mgt_delete`
      parameters:
        - $ref: '#/components/parameters/templateIdPathParam'
      responses:
        '204':
          description: Successfully Deleted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: Curl
          source: >
            curl -X 'DELETE' \

            'https://localhost:9443/api/server/v1/applications/templates/{template-id}'
            \

            -H 'accept: */*' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/share:
    post:
      summary: >
        Share the application from the root organization to the given
        organization(s).
      description: >
        This API provides the capability to share an application with
        organizations.

        <br>


        <b>Scope(Permission) required:</b> `internal_shared_application_create`
      operationId: shareOrgApplication
      parameters:
        - name: applicationId
          in: path
          description: ID of the application which will be shared to organizations.
          required: true
          schema:
            type: string
            example: c75e27f9-98c7-4518-a968-c6cd59f0ac6b
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationSharePOSTRequest'
        required: true
      responses:
        '200':
          description: Ok
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
        - Application Sharing
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location
            'https://localhost:9443/api/server/v1/applications/{application-id}/share'
            \

            -H 'Content-Type: application/json' \

            -H 'Accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4=' \

            -d '{
              "shareWithAllChildren": false,
              "sharedOrganizations": [
                "682edf68-4835-4bb8-961f-0a16bc6cc866",
                "ghfbctgf-4318-46d4-8ee1-7t3s38e23098"
              ]
            }'
          x-codegen-request-body-name: body
    get:
      summary: |
        List of organizations that the application is shared to.
      description: >
        This API returns the list of organizations that the application is
        shared to.

        <br><br>


        <b>Scope(Permission) required:</b> `internal_shared_application_view`
      operationId: shareOrgApplicationGet
      parameters:
        - name: applicationId
          in: path
          description: ID of the application which is shared to organizations.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharedOrganizationsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
        - Application Sharing
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location
            'https://localhost:9443/api/server/v1/applications/{application-id}/share'
            \

            -H 'Accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/shared-apps:
    get:
      summary: |
        List of shared applications along with its organization.
      description: >
        This API returns the list of shared app ids along with the shared
        organization id.

        <br><br>


        <b>Scope(Permission) required:</b> `internal_shared_application_view`
      operationId: sharedApplicationsGet
      parameters:
        - name: applicationId
          in: path
          description: ID of the application which is shared to organizations.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharedApplicationsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
        - Application Sharing
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location
            'https://localhost:9443/api/server/v1/applications/{application-id}/shared-apps'
            \

            -H 'Accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
    delete:
      description: >
        This API provides the capability to stop sharing an application to all
        organizations the application is shared to.

        <br><br>


        <b>Scope(Permission) required:</b> `internal_shared_application_delete`
      summary: |
        Stop sharing an application with all organizations.
      operationId: sharedApplicationsAllDelete
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successfully deleted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
        - Application Sharing
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location --request DELETE
            'https://localhost:9443/api/server/v1/applications/{application-id}/shared-apps'
            \

            -H 'Accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
  /applications/{applicationId}/share/{shared-organization-id}:
    delete:
      description: >
        This API provides the capability to stop sharing an application to an
        organization by providing its ID.

        <br><br>


        <b>Scope(Permission) required:</b> `internal_shared_application_delete`
      summary: |
        Stop sharing an application to a organization.
      operationId: shareOrgApplicationDelete
      parameters:
        - name: applicationId
          in: path
          description: ID of the application.
          required: true
          schema:
            type: string
        - name: shared-organization-id
          in: path
          description: ID of the organization to stop sharing.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successfully deleted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
        - Application Sharing
      x-codeSamples:
        - lang: Curl
          source: >
            curl --location --request DELETE
            'https://localhost:9443/api/server/v1/applications/{application-id}/share/{shared-organization-id}'
            \

            -H 'Accept: application/json' \

            -H 'Authorization: Basic YWRtaW46YWRtaW4='
components:
  parameters:
    limitQueryParam:
      in: query
      name: limit
      required: false
      description: |
        Maximum number of records to return.
      schema:
        type: integer
        minimum: 1
        default: 30
    limitWithoutDefaultQueryParam:
      in: query
      name: limit
      required: false
      description: |
        Maximum number of records to return.
      schema:
        type: integer
    offsetQueryParam:
      in: query
      name: offset
      required: false
      description: |
        Number of records to skip for pagination.
      schema:
        type: integer
        default: 0
    offsetWithoutDefaultQueryParam:
      in: query
      name: offset
      required: false
      description: |
        Number of records to skip for pagination.
      schema:
        type: integer
    filterQueryParam:
      in: query
      name: filter
      required: false
      description: >
        Condition to filter the retrieval of records.

        Supports 'sw', 'co', 'ew', and 'eq' operations with 'and', 'or' logical
        operators.

        Note that 'and' and 'or' operators in filters follow the general
        precedence of logical operators.

        For example, A and B or C and D = (A and B) or (C and D)).

        Currently supports only filtering based on the 'name', the 'clientId',
        and the 'issuer' attributes.


        /applications?filter=name+eq+user_portal

        <br>

        /applications?filter=name+co+prod+or+clientId+co+123
      schema:
        type: string
    sortOrderQueryParam:
      in: query
      name: sortOrder
      required: false
      description: |
        Define the order in which the retrieved records should be sorted.
        _This parameter is not supported yet._
      schema:
        type: string
        enum:
          - ASC
          - DESC
    sortByQueryParam:
      in: query
      name: sortBy
      required: false
      description: |
        Attribute by which the retrieved records should be sorted.
        _This parameter is not supported yet._
      schema:
        type: string
    attributesQueryParam:
      in: query
      name: attributes
      required: false
      description: >
        Specifies the required parameters in the response.

        Only 'advancedConfigurations', 'templateId', 'clientId', and 'issuer'
        attributes are currently supported.


        /applications?attributes=advancedConfigurations,templateId,clientId,issuer
      schema:
        type: string
    exportSecretsQueryParam:
      in: query
      name: exportSecrets
      required: false
      description: |
        Specifies whether to export secrets when exporting an application.
      schema:
        type: boolean
        default: false
    inboundProtocolsCustomOnly:
      in: query
      name: customOnly
      required: false
      description: |
        Send only the custom inbound protocols.
      schema:
        type: boolean
        example: true
        default: false
    templateIdPathParam:
      in: path
      name: template-id
      required: true
      description: |
        Application template ID. This should be a valid locale.
      schema:
        type: string
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://localhost:9443/oauth2/authorize
          tokenUrl: http://localhost:9443/oauth2/token
          scopes: {}
  schemas:
    Link:
      type: object
      properties:
        href:
          type: string
          example: applications?offset=10&limit=10
        rel:
          type: string
          example: next
    ApplicationListResponse:
      type: object
      properties:
        totalResults:
          type: integer
          description: Number of results that match the listing operation.
          example: 1
        startIndex:
          type: integer
          description: >-
            Index of the first element of the page, which will be equal to
            offset + 1.
          example: 1
        count:
          type: integer
          description: Number of elements in the returned page.
          example: 10
        applications:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationListItem'
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
    ApplicationListItem:
      type: object
      properties:
        id:
          type: string
          example: 85e3f4b8-0d22-4181-b1e3-1651f71b88bd
        name:
          type: string
          example: user-portal
        description:
          type: string
          example: Application representing user portal
        image:
          type: string
          example: https://example.com/logo/my-logo.png
        accessUrl:
          type: string
          example: https://example.com/app/login
        clientId:
          type: string
          example: SmrrDNXRYf1lMmDlnleeHTuXx_Ea
        issuer:
          type: string
          example: http://idp.example.com/metadata.php
        access:
          type: string
          enum:
            - READ
            - WRITE
          default: READ
        self:
          type: string
          example: >-
            /t/wso2.com/api/server/v1/applications/85e3f4b8-0d22-4181-b1e3-1651f71b88bd
        advancedConfigurations:
          $ref: '#/components/schemas/AdvancedApplicationConfiguration'
        templateId:
          type: string
          example: 980b8tester24c64a8a09a0d80abf8c337bd2555
    ApplicationModel:
      type: object
      required:
        - name
      properties:
        id:
          type: string
          example: 394b8adcce24c64a8a09a0d80abf8c337bd253de
          readOnly: true
        name:
          type: string
          example: pickup
        description:
          type: string
          example: This is the configuration for Pickup application.
        imageUrl:
          type: string
          example: https://example.com/logo/my-logo.png
        accessUrl:
          type: string
          example: https://example.com/login
        logoutReturnUrl:
          type: string
          example: https://example.com/app/logout
        templateId:
          type: string
          example: 980b8tester24c64a8a09a0d80abf8c337bd2555
        isManagementApp:
          default: false
          type: boolean
          example: false
          description: Decides whether the application used to access System APIs
        claimConfiguration:
          $ref: '#/components/schemas/ClaimConfiguration'
        inboundProtocolConfiguration:
          $ref: '#/components/schemas/InboundProtocols'
        authenticationSequence:
          $ref: '#/components/schemas/AuthenticationSequence'
        advancedConfigurations:
          $ref: '#/components/schemas/AdvancedApplicationConfiguration'
        provisioningConfigurations:
          $ref: '#/components/schemas/ProvisioningConfiguration'
    ApplicationResponseModel:
      type: object
      required:
        - name
      properties:
        id:
          type: string
          example: 394b8adcce24c64a8a09a0d80abf8c337bd253de
          readOnly: true
        name:
          type: string
          example: pickup
        description:
          type: string
          example: This is the configuration for Pickup application.
        imageUrl:
          type: string
          example: https://example.com/logo/my-logo.png
        accessUrl:
          type: string
          example: https://example.com/login
        logoutReturnUrl:
          type: string
          example: https://example.com/app/logout
        clientId:
          type: string
          example: SmrrDNXRYf1lMmDlnleeHTuXx_Ea
        issuer:
          type: string
          example: http://idp.example.com/metadata.php
        templateId:
          type: string
          example: adwefi2429asdfdf94444rraf44
        isManagementApp:
          type: boolean
          example: false
          description: Decides whether the application used to access System APIs
        claimConfiguration:
          $ref: '#/components/schemas/ClaimConfiguration'
        inboundProtocols:
          $ref: '#/components/schemas/InboundProtocolsListResponse'
        authenticationSequence:
          $ref: '#/components/schemas/AuthenticationSequence'
        advancedConfigurations:
          $ref: '#/components/schemas/AdvancedApplicationConfiguration'
        provisioningConfigurations:
          $ref: '#/components/schemas/ProvisioningConfiguration'
        access:
          type: string
          enum:
            - READ
            - WRITE
          default: READ
    ApplicationPatchModel:
      type: object
      properties:
        name:
          type: string
          example: pickup
        description:
          type: string
          example: This is the configuration for Pickup application.
        imageUrl:
          type: string
          example: https://example.com/logo/my-logo.png
        accessUrl:
          type: string
          example: https://example.com/login
        logoutReturnUrl:
          type: string
          example: https://example.com/app/logout
        templateId:
          type: string
          example: adwefi2429asdfdf94444rraf44
        claimConfiguration:
          $ref: '#/components/schemas/ClaimConfiguration'
        authenticationSequence:
          $ref: '#/components/schemas/AuthenticationSequence'
        advancedConfigurations:
          $ref: '#/components/schemas/AdvancedApplicationConfiguration'
        provisioningConfigurations:
          $ref: '#/components/schemas/ProvisioningConfiguration'
    ResidentApplication:
      type: object
      properties:
        provisioningConfigurations:
          $ref: '#/components/schemas/ProvisioningConfiguration'
    ProvisioningConfiguration:
      type: object
      properties:
        inboundProvisioning:
          $ref: '#/components/schemas/InboundSCIMProvisioningConfiguration'
        outboundProvisioningIdps:
          type: array
          items:
            $ref: '#/components/schemas/OutboundProvisioningConfiguration'
    InboundSCIMProvisioningConfiguration:
      type: object
      properties:
        proxyMode:
          type: boolean
          example: false
        provisioningUserstoreDomain:
          type: string
          example: PRIMARY
          description: >-
            This property becomes only applicable if the proxy-mode config is
            set to false
    OutboundProvisioningConfiguration:
      type: object
      properties:
        idp:
          type: string
          example: Google
        connector:
          type: string
          example: googleapps
        blocking:
          type: boolean
          example: false
        rules:
          type: boolean
          example: false
        jit:
          type: boolean
          example: false
    ConfiguredAuthenticatorsModal:
      type: object
      properties:
        stepId:
          type: integer
          example: 1
        localAuthenticators:
          type: array
          items:
            $ref: '#/components/schemas/ConfiguredAuthenticator'
        federatedAuthenticators:
          type: array
          items:
            $ref: '#/components/schemas/ConfiguredAuthenticator'
    ConfiguredAuthenticator:
      type: object
      properties:
        name:
          type: string
          example: sampleIdP
        type:
          type: string
          example: SampleAuthenticator
    AdvancedApplicationConfiguration:
      type: object
      properties:
        saas:
          type: boolean
          example: false
          description: Decides whether the application is accessible across tenants.
        discoverableByEndUsers:
          type: boolean
          example: false
          description: Decides whether the application is visible for end users.
        certificate:
          $ref: '#/components/schemas/Certificate'
        skipLoginConsent:
          type: boolean
          example: false
          description: Decides whether user consent needs to be skipped during login flows.
        skipLogoutConsent:
          type: boolean
          example: false
          description: >-
            Decides whether user consent needs to be skipped during logout
            flows.
        useExternalConsentPage:
          type: boolean
          example: false
          description: >-
            Decides whether users should be presented with an external consent
            page.
        returnAuthenticatedIdpList:
          type: boolean
          example: false
          description: >-
            Decides whether the list of authenticated identity providers need to
            be returned in the authentication response.
        enableAuthorization:
          type: boolean
          description: >-
            Decides whether authorization policies needs to be engaged during
            authentication flows.
          example: true
        additionalSpProperties:
          $ref: '#/components/schemas/AdditionalProperties'
    AdditionalProperties:
      type: array
      description: >-
        Denotes additional properties of the application. It is only supported
        by getApplication and getAllApplications request.
      items:
        $ref: '#/components/schemas/AdditionalSpProperty'
    AdditionalSpProperty:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          example: isInternalApp
        value:
          type: string
          example: 'true'
        displayName:
          type: string
          example: Internal Application
    Certificate:
      type: object
      properties:
        type:
          type: string
          description: Certificate type. This should be either JWKS or PEM.
        value:
          type: string
          description: >-
            Certificate value. If type is JWKS, value should be jwks URL. If
            type is PEM, value should be the certificate in PEM format.
    InboundProtocols:
      type: object
      properties:
        saml:
          $ref: '#/components/schemas/SAML2Configuration'
        oidc:
          $ref: '#/components/schemas/OpenIDConnectConfiguration'
        passiveSts:
          $ref: '#/components/schemas/PassiveStsConfiguration'
        wsTrust:
          $ref: '#/components/schemas/WSTrustConfiguration'
        custom:
          type: array
          items:
            $ref: '#/components/schemas/CustomInboundProtocolConfiguration'
    InboundProtocolsListResponse:
      type: array
      items:
        $ref: '#/components/schemas/InboundProtocolListItem'
    InboundProtocolListItem:
      type: object
      required:
        - type
        - name
        - self
      properties:
        type:
          type: string
          example: samlsso
        name:
          type: string
          example: SAML2 Inbound
        self:
          type: string
          example: >-
            /api/server/v1/applications/29048810-1447-4ea0-a348-30d15ab65fa3/inbound-protocols/saml
    ClaimConfiguration:
      type: object
      properties:
        dialect:
          type: string
          enum:
            - CUSTOM
            - LOCAL
          default: LOCAL
        claimMappings:
          type: array
          items:
            $ref: '#/components/schemas/ClaimMappings'
        requestedClaims:
          type: array
          items:
            $ref: '#/components/schemas/RequestedClaimConfiguration'
        subject:
          $ref: '#/components/schemas/SubjectConfig'
        role:
          $ref: '#/components/schemas/RoleConfig'
    SubjectConfig:
      type: object
      properties:
        claim:
          $ref: '#/components/schemas/Claim'
        includeUserDomain:
          type: boolean
          example: false
        includeTenantDomain:
          type: boolean
          example: false
        useMappedLocalSubject:
          type: boolean
          example: false
    RoleConfig:
      type: object
      properties:
        mappings:
          type: array
          items:
            $ref: '#/components/schemas/RoleMapping'
        includeUserDomain:
          type: boolean
          example: true
        claim:
          $ref: '#/components/schemas/Claim'
    RoleMapping:
      type: object
      required:
        - localRole
        - applicationRole
      properties:
        localRole:
          type: string
          example: admin
        applicationRole:
          type: string
          example: Administrator
    RequestedClaimConfiguration:
      type: object
      required:
        - claim
      description: >-
        User claims that need to be sent back to the application. If the claim
        mappings are local, use local claim URIs. If the custom claim mappings
        are configured, use the mapped application claim URI
      properties:
        claim:
          $ref: '#/components/schemas/Claim'
        mandatory:
          type: boolean
          example: false
    ClaimMappings:
      type: object
      required:
        - applicationClaim
        - localClaim
      properties:
        applicationClaim:
          type: string
          description: Claim URI recieved by the application
          example: firstname
        localClaim:
          $ref: '#/components/schemas/Claim'
    Claim:
      type: object
      required:
        - uri
      properties:
        id:
          type: string
          example: aHR0cDovL3dzbzIub3JnL2NsYWltcy91c2VybmFtZQ
          readOnly: true
        uri:
          type: string
          example: http://wso2.org/claims/username
        displayName:
          type: string
          example: Username
          readOnly: true
    SAML2Configuration:
      type: object
      properties:
        metadataFile:
          type: string
          example: Base64 encoded metadata file content
        metadataURL:
          type: string
          example: https://example.com/samlsso/meta
        manualConfiguration:
          $ref: '#/components/schemas/SAML2ServiceProvider'
    SingleSignOnProfile:
      type: object
      properties:
        bindings:
          type: array
          items:
            type: string
            enum:
              - HTTP_POST
              - HTTP_REDIRECT
              - ARTIFACT
        enableSignatureValidationForArtifactBinding:
          type: boolean
          description: >-
            Enables Signature validation for SAML Artifact Binding. Applicable
            only if SAML Artifact binding is enabled through the bindings
            option.
          default: false
        attributeConsumingServiceIndex:
          type: string
          readOnly: true
        enableIdpInitiatedSingleSignOn:
          type: boolean
          default: false
        assertion:
          $ref: '#/components/schemas/SAMLAssertionConfiguration'
    SAMLAttributeProfile:
      type: object
      properties:
        enabled:
          type: boolean
          default: false
        alwaysIncludeAttributesInResponse:
          type: boolean
          default: false
    SingleLogoutProfile:
      type: object
      properties:
        enabled:
          type: boolean
          default: true
        logoutRequestUrl:
          type: string
          description: Single logout request accepting endpoint
        logoutResponseUrl:
          type: string
          description: Single logout response accepting endpoint
        logoutMethod:
          type: string
          enum:
            - BACKCHANNEL
            - FRONTCHANNEL_HTTP_REDIRECT
            - FRONTCHANNEL_HTTP_POST
        idpInitiatedSingleLogout:
          $ref: '#/components/schemas/IdpInitiatedSingleLogout'
    IdpInitiatedSingleLogout:
      type: object
      properties:
        enabled:
          type: boolean
          default: false
        returnToUrls:
          type: array
          items:
            type: string
    SAMLAssertionConfiguration:
      type: object
      properties:
        nameIdFormat:
          type: string
          default: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
          example: urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
        audiences:
          type: array
          description: Additional audience values to be added to the SAML Assertions
          example:
            - https://app.example.com/saml
          items:
            type: string
        recipients:
          type: array
          description: Additional recipient values to be added to the SAML Assertions
          example:
            - https://app.example.com/saml
          items:
            type: string
        digestAlgorithm:
          type: string
          default: http://www.w3.org/2000/09/xmldsig#sha1
          example: http://www.w3.org/2000/09/xmldsig#sha1
        encryption:
          $ref: '#/components/schemas/AssertionEncryptionConfiguration'
    AssertionEncryptionConfiguration:
      type: object
      properties:
        enabled:
          type: boolean
          default: false
        assertionEncryptionAlgorithm:
          type: string
          default: http://www.w3.org/2001/04/xmlenc#aes256-cbc
        keyEncryptionAlgorithm:
          type: string
          default: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
    SAMLRequestValidation:
      type: object
      properties:
        enableSignatureValidation:
          type: boolean
          default: true
        signatureValidationCertAlias:
          type: string
    SAMLResponseSigning:
      type: object
      properties:
        enabled:
          type: boolean
          default: true
        signingAlgorithm:
          type: string
    SAML2ServiceProvider:
      type: object
      required:
        - issuer
        - assertionConsumerUrls
      properties:
        issuer:
          type: string
        serviceProviderQualifier:
          type: string
        assertionConsumerUrls:
          type: array
          items:
            type: string
          minItems: 1
        defaultAssertionConsumerUrl:
          type: string
          description: >-
            If not provided, the first assertion consumer URL on the
            assertionConsumerUrls will be picked as the default assertion
            consumer URL.
        idpEntityIdAlias:
          type: string
          description: Default value is the IdP Entity ID value specified in Resident IdP.
        singleSignOnProfile:
          $ref: '#/components/schemas/SingleSignOnProfile'
        attributeProfile:
          $ref: '#/components/schemas/SAMLAttributeProfile'
        singleLogoutProfile:
          $ref: '#/components/schemas/SingleLogoutProfile'
        requestValidation:
          $ref: '#/components/schemas/SAMLRequestValidation'
        responseSigning:
          $ref: '#/components/schemas/SAMLResponseSigning'
        enableAssertionQueryProfile:
          type: boolean
          default: false
    OpenIDConnectConfiguration:
      type: object
      required:
        - grantTypes
      properties:
        clientId:
          type: string
        clientSecret:
          type: string
        state:
          type: string
          enum:
            - ACTIVE
            - REVOKED
          readOnly: true
          default: ACTIVE
        grantTypes:
          type: array
          example:
            - authorization_code
            - password
          items:
            type: string
          minItems: 1
        callbackURLs:
          type: array
          description: Authorized redirect URIs
          example:
            - >-
              regexp=(https://app.example.com/callback1|https://app.example.com/callback2)
          items:
            type: string
        allowedOrigins:
          type: array
          description: >-
            Authorized JavaScript origins. CORS requests will be allowed to
            these origins.
          example:
            - https://app.example.com
          items:
            type: string
        publicClient:
          type: boolean
          default: false
          description: >-
            Enabling this option will allow the client to authenticate without a
            client secret.
          example: false
        pkce:
          $ref: '#/components/schemas/OAuth2PKCEConfiguration'
        accessToken:
          $ref: '#/components/schemas/AccessTokenConfiguration'
        refreshToken:
          $ref: '#/components/schemas/RefreshTokenConfiguration'
        idToken:
          $ref: '#/components/schemas/IdTokenConfiguration'
        logout:
          $ref: '#/components/schemas/OIDCLogoutConfiguration'
        validateRequestObjectSignature:
          type: boolean
          default: false
          example: false
        scopeValidators:
          type: array
          example:
            - Role based scope validator
            - XACML Scope Validator
          items:
            type: string
    OAuth2PKCEConfiguration:
      type: object
      properties:
        mandatory:
          type: boolean
          example: false
        supportPlainTransformAlgorithm:
          type: boolean
          example: true
    AccessTokenConfiguration:
      type: object
      properties:
        type:
          type: string
          example: JWT
        userAccessTokenExpiryInSeconds:
          type: integer
          format: int64
          example: 3600
        applicationAccessTokenExpiryInSeconds:
          type: integer
          format: int64
          example: 3600
        bindingType:
          type: string
          description: >-
            OAuth2 access token and refresh token can be bound to an external
            attribute during the token generation so that it can be optionally
            validated during the API invocation.
          default: None
          example: cookie
        revokeTokensWhenIDPSessionTerminated:
          type: boolean
          description: >-
            If enabled, when the IDP session is terminated, all the access
            tokens bound to the session will get revoked.
        validateTokenBinding:
          type: boolean
          description: >-
            If enabled, both access token and the token binding needs to be
            present for a successful API invocation.
    RefreshTokenConfiguration:
      type: object
      properties:
        expiryInSeconds:
          type: integer
          format: int64
          example: 86400
        renewRefreshToken:
          description: >-
            Decides whether the refresh token needs to be renewed during refresh
            grant flow.
          type: boolean
          example: true
    IdTokenConfiguration:
      type: object
      properties:
        expiryInSeconds:
          type: integer
          format: int64
          example: 3600
        audience:
          type: array
          example:
            - http://idp.xyz.com
            - http://idp.abc.com
          items:
            type: string
        encryption:
          $ref: '#/components/schemas/IdTokenEncryptionConfiguration'
    IdTokenEncryptionConfiguration:
      type: object
      properties:
        enabled:
          type: boolean
          default: false
          example: false
        algorithm:
          type: string
          example: RSA-OAEP
        method:
          type: string
          example: A128CBC+HS256
    OIDCLogoutConfiguration:
      type: object
      properties:
        backChannelLogoutUrl:
          type: string
          example: https://app.example.com/backchannel/callback
        frontChannelLogoutUrl:
          type: string
          example: https://app.example.com/frontchannel/callback
    PassiveStsConfiguration:
      type: object
      required:
        - realm
        - replyTo
      properties:
        realm:
          type: string
        replyTo:
          type: string
    WSTrustConfiguration:
      type: object
      required:
        - audience
        - certificateAlias
      properties:
        audience:
          type: string
          description: Audience value of the trusted service
          example: https://wstrust.endpoint.com
        certificateAlias:
          type: string
          example: wso2carbon
    CustomInboundProtocolConfiguration:
      type: object
      required:
        - name
        - configName
      properties:
        name:
          type: string
          example: cas
        configName:
          type: string
          example: cas
        properties:
          type: array
          items:
            $ref: '#/components/schemas/PropertyModel'
    PropertyModel:
      type: object
      properties:
        key:
          type: string
          example: app-identifier
        value:
          type: string
          example: http://app.wso2.com/employeeApp
        friendlyName:
          type: string
          example: Application Identifier
    AuthenticationSequence:
      type: object
      properties:
        type:
          type: string
          description: >2-
             - DEFAULT type indicates that the application will use the default authentication sequence specified at the tenant level. When the DEFAULT type is used, the information given in the other fields of the AuthenticationSequence will be ignored and overriden with values defined at the tenant level.
            - USER_DEFINED type indicates that the application will use a
            user-defined authentication sequence.
          enum:
            - DEFAULT
            - USER_DEFINED
          default: DEFAULT
        steps:
          type: array
          items:
            $ref: '#/components/schemas/AuthenticationStepModel'
        requestPathAuthenticators:
          type: array
          items:
            type: string
        script:
          type: string
        subjectStepId:
          type: integer
          default: 1
          example: 1
        attributeStepId:
          type: integer
          default: 1
          example: 1
    AuthenticationStepModel:
      type: object
      required:
        - id
        - options
      properties:
        id:
          type: integer
          minimum: 1
          example: 1
        options:
          type: array
          items:
            $ref: '#/components/schemas/Authenticator'
          minItems: 1
    Authenticator:
      type: object
      required:
        - idp
        - authenticator
      properties:
        idp:
          type: string
          example: LOCAL
        authenticator:
          type: string
          example: basic
    AuthProtocolMetadata:
      type: object
      properties:
        name:
          type: string
        displayName:
          type: string
    MetadataProperty:
      type: object
      properties:
        options:
          type: array
          items:
            type: string
          example:
            - Option 1
            - Option 2
        defaultValue:
          type: string
          example: Option 1
    GrantTypeMetaData:
      type: object
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/GrantType'
    GrantType:
      type: object
      properties:
        name:
          type: string
          example: authorization_code
        displayName:
          type: string
          example: Code
    SAMLMetaData:
      type: object
      properties:
        defaultNameIdFormat:
          type: string
          example: urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
        certificateAlias:
          $ref: '#/components/schemas/MetadataProperty'
        responseSigningAlgorithm:
          $ref: '#/components/schemas/MetadataProperty'
        responseDigestAlgorithm:
          $ref: '#/components/schemas/MetadataProperty'
        assertionEncryptionAlgorithm:
          $ref: '#/components/schemas/MetadataProperty'
        keyEncryptionAlgorithm:
          $ref: '#/components/schemas/MetadataProperty'
    OIDCMetaData:
      type: object
      properties:
        allowedGrantTypes:
          $ref: '#/components/schemas/GrantTypeMetaData'
        defaultUserAccessTokenExpiryTime:
          type: string
          example: '3600'
        defaultApplicationAccessTokenExpiryTime:
          type: string
          example: '3600'
        defaultRefreshTokenExpiryTime:
          type: string
          example: '86400'
        defaultIdTokenExpiryTime:
          type: string
          example: '3600'
        idTokenEncryptionAlgorithm:
          $ref: '#/components/schemas/MetadataProperty'
        idTokenEncryptionMethod:
          $ref: '#/components/schemas/MetadataProperty'
        scopeValidators:
          $ref: '#/components/schemas/MetadataProperty'
        accessTokenType:
          $ref: '#/components/schemas/MetadataProperty'
        accessTokenBindingType:
          $ref: '#/components/schemas/MetadataProperty'
    WSTrustMetaData:
      type: object
      properties:
        certificateAlias:
          $ref: '#/components/schemas/MetadataProperty'
    CustomInboundProtocolMetaData:
      type: object
      properties:
        displayName:
          type: string
          example: My Custom Protocol
        configName:
          type: string
          example: Custom Protocol
        properties:
          type: array
          items:
            $ref: '#/components/schemas/CustomInboundProtocolProperty'
    CustomInboundProtocolProperty:
      type: object
      properties:
        name:
          type: string
          example: encryptionAlgorithm
        displayName:
          type: string
          example: Encryption Algorithm
        type:
          type: string
          enum:
            - STRING
            - BOOLEAN
            - INTEGER
          example: STRING
        required:
          type: boolean
          example: true
        availableValues:
          type: array
          items:
            type: string
            example:
              - http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
              - http://www.w3.org/2001/04/xmlenc#rsa-1_5
        defaultValue:
          type: string
          example: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
        validationRegex:
          type: string
          example: ^[a-b][A-B]*
        displayOrder:
          type: integer
          example: 1
        isConfidential:
          type: boolean
          default: false
    AdaptiveAuthTemplates:
      type: object
      properties:
        templatesJSON:
          type: string
          example: Adaptive Auth Templates JSON
    FileUpload:
      type: object
      properties:
        file:
          type: string
          format: binary
          description: file to upload
    ApplicationTemplatesList:
      type: object
      properties:
        templates:
          type: array
          items:
            $ref: '#/components/schemas/ApplicationTemplatesListItem'
    ApplicationTemplatesListItem:
      type: object
      properties:
        id:
          type: string
          example: 85e3f4b8-0d22-4181-b1e3-1651f71b88bd
        name:
          type: string
          example: OIDC Protocol Template
        description:
          type: string
          example: Template to be used for Single Page Applications
        image:
          type: string
          example: https://example.com/logo/my-logo.png
        authenticationProtocol:
          type: string
          example: oidc
        types:
          type: array
          items:
            type: string
            example:
              - react
              - angular
        category:
          type: string
          enum:
            - DEFAULT
            - VENDOR
          example: DEFAULT
        displayOrder:
          type: integer
          example: 2
        templateGroup:
          type: string
          example: web-application
        self:
          type: string
          example: >-
            /t/wso2.com/api/server/v1/applications/templates/85e3f4b8-0d22-4181-b1e3-1651f71b88bd
    ApplicationTemplateModel:
      type: object
      properties:
        id:
          type: string
          readOnly: true
          example: 85e3f4b8-0d22-4181-b1e3-1651f71b88bd
        name:
          type: string
          example: OIDC Protocol Template
        description:
          type: string
          example: Template to be used for Single Page Applications
        image:
          type: string
          example: https://example.com/logo/my-logo.png
        authenticationProtocol:
          type: string
          example: oidc
        types:
          type: array
          items:
            type: string
          example:
            - react
            - angular
        category:
          type: string
          enum:
            - DEFAULT
            - VENDOR
          example: DEFAULT
        templateGroup:
          type: string
          example: web-application
        displayOrder:
          type: integer
          example: 2
        application:
          $ref: '#/components/schemas/ApplicationModel'
      required:
        - name
        - application
    ApplicationOwner:
      type: object
      properties:
        id:
          type: string
          example: 85e3f4b8-0d22-4181-b1e3-1651f71b88bd
      required:
        - id
    AuthorizedAPIResponse:
      type: object
      properties:
        id:
          type: string
          example: 65b52595-9ca1-4539-aca2-56178643c58b
        identifier:
          type: string
          example: https://greetings.io/v1/greet
        displayName:
          type: string
          example: Greetings API
        policyId:
          type: string
          example: RBAC
        type:
          type: string
          example: BUSINESS
        authorizedScopes:
          type: array
          items:
            $ref: '#/components/schemas/AuthorizedScope'
    AuthorizedScope:
      type: object
      properties:
        id:
          type: string
          example: 65b52595-9ca1-4539-aca2-56178643c58b
        name:
          type: string
          example: bookings:read
        displayName:
          type: string
          example: Read Bookings
    AuthorizedAPICreationModel:
      type: object
      properties:
        id:
          type: string
          example: 65b52595-9ca1-4539-aca2-56178643c58b
        policyIdentifier:
          type: string
          example: RBAC
        scopes:
          type: array
          items:
            type: string
            example: bookings:read
    AuthorizedAPIPatchModel:
      type: object
      properties:
        addedScopes:
          type: array
          items:
            type: string
            example: bookings:write
        removedScopes:
          type: array
          items:
            type: string
            example: bookings:read
    Error:
      type: object
      properties:
        code:
          type: string
          example: AAA-00000
        message:
          type: string
          example: Some error message.
        description:
          type: string
          example: Some error description.
        traceId:
          type: string
          example: e0fbcfeb-3617-43c4-8dd0-7b7d38e13047
    ApplicationSharePOSTRequest:
      type: object
      properties:
        shareWithAllChildren:
          type: boolean
          default: false
        sharedOrganizations:
          type: array
          items:
            type: string
          example:
            - 682edf68-4835-4bb8-961f-0a16bc6cc866
            - ghfbctgf-4318-46d4-8ee1-7t3s38e23098
    SharedOrganizationsResponse:
      type: object
      properties:
        organizations:
          type: array
          items:
            $ref: '#/components/schemas/BasicOrganizationResponse'
    SharedApplicationsResponse:
      type: object
      properties:
        sharedApplications:
          type: array
          items:
            $ref: '#/components/schemas/SharedApplicationResponse'
    SharedApplicationResponse:
      type: object
      properties:
        applicationId:
          type: string
          description: Shared application's id.
          example: ca322554-fe79-4c04-9c94-492855ef92a3
        organizationId:
          type: string
          description: Shared application residing organization id.
          example: 682edf68-4835-4bb8-961f-0a16bc6cc866
    BasicOrganizationResponse:
      type: object
      required:
        - id
        - name
        - status
        - ref
      properties:
        id:
          type: string
          example: b4526d91-a8bf-43d2-8b14-c548cf73065b
        name:
          type: string
          example: ABC Builders
        status:
          type: string
          enum:
            - ACTIVE
            - DISABLED
          example: ACTIVE
        ref:
          type: string
          example: >-
            /t/wso2.com/api/server/v1/organizations/b4526d91-a8bf-43d2-8b14-c548cf73065b
servers:
  - url: https://{serverUrl}/t/{tenantDomain}/api/server/v1
    variables:
      serverUrl:
        default: localhost:9443
      tenantDomain:
        default: carbon.super
