diff --git a/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/API.java b/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/API.java index 4360abb984c7..cc2489b9b635 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/API.java +++ b/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/API.java @@ -63,6 +63,7 @@ public class API implements Serializable { private String graphQLSchema; private String asyncApiDefinition; private String type; + private String subtype; private String context; private String contextTemplate; private String thumbnailUrl; @@ -1193,6 +1194,18 @@ public void setType(String type) { } } + public String getSubtype() { + return subtype; + } + + public void setSubtype(String subtype) { + if (StringUtils.isEmpty(subtype) || NULL_VALUE.equalsIgnoreCase(StringUtils.trim(subtype))) { + this.subtype = "DEFAULT"; + } else { + this.subtype = StringUtils.trim(subtype).toUpperCase(); + } + } + public String getCreatedTime() { return createdTime; } diff --git a/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/APIInfo.java b/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/APIInfo.java index 5d9e31e3b2a2..3b5ee24696b7 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/APIInfo.java +++ b/components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/APIInfo.java @@ -30,6 +30,7 @@ public class APIInfo { private String contextTemplate; private String apiTier; private String apiType; + private String apiSubtype; private String createdTime; private String createdBy; private String updatedTime; @@ -128,6 +129,16 @@ public void setApiType(String apiType) { this.apiType = apiType; } + public String getApiSubtype() { + + return apiSubtype; + } + + public void setApiSubtype(String apiSubtype) { + + this.apiSubtype = apiSubtype; + } + public String getCreatedTime() { return createdTime; @@ -226,6 +237,7 @@ public static class Builder { private String contextTemplate; private String apiTier; private String apiType; + private String apiSubtype; private String createdTime; private String createdBy; private String updatedTime; @@ -284,6 +296,12 @@ public Builder apiType(String apiType) { return this; } + public Builder apiSubtype(String apiSubtype) { + + this.apiSubtype = apiSubtype; + return this; + } + public Builder createdTime(String createdTime) { this.createdTime = createdTime; @@ -337,6 +355,7 @@ public APIInfo build() { apiInfo.contextTemplate = contextTemplate; apiInfo.apiTier = apiTier; apiInfo.apiType = apiType; + apiInfo.apiSubtype = apiSubtype; apiInfo.createdTime = createdTime; apiInfo.createdBy = createdBy; apiInfo.updatedTime = updatedTime; diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConstants.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConstants.java index fe3b60c7d8b1..56e6731bf5ac 100755 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConstants.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConstants.java @@ -2022,6 +2022,8 @@ public enum RegistryResourceTypesForUI { public static final String[] API_SUPPORTED_TYPE_LIST = {"HTTP", "WS", "SOAPTOREST", "GRAPHQL", "SOAP", "WEBSUB", "SSE", "ASYN" + "C"}; + public static final String API_SUBTYPE_DEFAULT = "DEFAULT"; + public static final String API_SUBTYPE_AI_API = "AIAPI"; public static final String API_PRODUCT_REVISION = "Current"; public static class AdvancedThrottleConstants { diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java index 526a19c6267e..6b4d9db2efca 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java @@ -3860,6 +3860,7 @@ public Map searchPaginatedAPIs(String searchQuery, String organi mappedAPI.setAvailableTiers(availableTiers); populateGatewayVendor(mappedAPI); populateEgressStatus(mappedAPI); + populateAPISubtype(mappedAPI); apiList.add(mappedAPI); } catch (APIManagementException e) { log.warn("Retrieving API details from DB failed for API: " + mappedAPI.getUuid() + " " + e); @@ -3908,6 +3909,7 @@ public ApiTypeWrapper getAPIorAPIProductByUUID(String uuid, String organization) populateAPIStatus(api); populateGatewayVendor(api); populateEgressStatus(api); + populateAPISubtype(api); api = addTiersToAPI(api, organization); return new ApiTypeWrapper(api); } @@ -4094,6 +4096,7 @@ private ApiTypeWrapper getAPIorAPIProductByUUIDWithoutPermissionCheck(String uui API api = APIMapper.INSTANCE.toApi(devPortalApi); populateDevPortalAPIInformation(uuid, organization, api); populateDefaultVersion(api); + populateAPISubtype(api); api = addTiersToAPI(api, organization); return new ApiTypeWrapper(api); } @@ -4691,4 +4694,17 @@ private void populateEgressStatus(APIProduct apiProduct) throws APIManagementExc apiProduct.setEgress(apiMgtDAO.checkForEgressAPIWithUUID(apiProduct.getUuid())); } } + + /** + * This method populates the subType in the API. + * @param api API that needs to be populated with the subtype + * @throws APIManagementException + */ + private void populateAPISubtype(API api) throws APIManagementException { + if (api.isRevision()) { + api.setSubtype(apiMgtDAO.retrieveAPISubtypeWithUUID(api.getRevisionedApiId())); + } else { + api.setSubtype(apiMgtDAO.retrieveAPISubtypeWithUUID(api.getUuid())); + } + } } diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java index 5d6de99d3370..4bd30dd121e8 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java @@ -5311,7 +5311,10 @@ public API getAPIbyUUID(String uuid, String organization) throws APIManagementEx populateRevisionInformation(api, uuid); populateAPIInformation(uuid, organization, api); populateAPILevelPolicies(api); - populateAiConfiguration(api); + populateAPISubtype(api); + if (APIConstants.API_SUBTYPE_AI_API.equals(api.getSubtype())) { + populateAiConfiguration(api); + } if (APIUtil.isSequenceDefined(api.getInSequence()) || APIUtil.isSequenceDefined(api.getOutSequence()) || APIUtil.isSequenceDefined(api.getFaultSequence())) { if (migrationEnabled == null) { @@ -5419,6 +5422,7 @@ public APISearchResult searchPaginatedAPIsByFQDN(String endpoint, String tenantD populateDefaultVersion(mappedAPI); populateGatewayVendor(mappedAPI); populateEgressStatus(mappedAPI); + populateAPISubtype(mappedAPI); apiList.add(mappedAPI); } result.setApis(apiList); @@ -5490,6 +5494,19 @@ private void populateEgressStatus(APIProduct apiProduct) throws APIManagementExc } } + /** + * This method populates the subtype in the API. + * @param api API that needs to be populated with the subtype + * @throws APIManagementException + */ + private void populateAPISubtype(API api) throws APIManagementException { + if (api.isRevision()) { + api.setSubtype(apiMgtDAO.retrieveAPISubtypeWithUUID(api.getRevisionedApiId())); + } else { + api.setSubtype(apiMgtDAO.retrieveAPISubtypeWithUUID(api.getUuid())); + } + } + public APIProduct getAPIProductbyUUID(String uuid, String organization) throws APIManagementException { try { Organization org = new Organization(organization); @@ -5548,6 +5565,7 @@ public Map searchPaginatedAPIs(String searchQuery, String organi populateDefaultVersion(mappedAPI); populateGatewayVendor(mappedAPI); populateEgressStatus(mappedAPI); + populateAPISubtype(mappedAPI); apiList.add(mappedAPI); } apiSet.addAll(apiList); diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java index d70734b79f01..91eac19f8dca 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java @@ -5592,6 +5592,7 @@ public int addAPI(API api, int tenantId, String organization) throws APIManageme prepStmt.setString(13, api.getGatewayVendor()); prepStmt.setString(14, api.getVersionTimestamp()); prepStmt.setInt(15, api.isEgress()); + prepStmt.setString(16, api.getSubtype()); prepStmt.execute(); rs = prepStmt.getGeneratedKeys(); @@ -10009,6 +10010,10 @@ public APIInfo getAPIInfoByUUID(String apiId) throws APIManagementException { String contextTemplate = resultSet.getString("CONTEXT_TEMPLATE"); String context = resultSet.getString("CONTEXT"); String apiType = resultSet.getString("API_TYPE"); + String apiSubtype = resultSet.getString("API_SUBTYPE"); + if (StringUtils.isEmpty(apiSubtype)) { + apiSubtype = APIConstants.API_SUBTYPE_DEFAULT; + } String version = resultSet.getString("API_VERSION"); if (APIConstants.API_PRODUCT.equalsIgnoreCase(apiType) && APIConstants.API_PRODUCT_VERSION_1_0_0.equals(version) @@ -10024,6 +10029,7 @@ public APIInfo getAPIInfoByUUID(String apiId) throws APIManagementException { .contextTemplate(contextTemplate) .status(APIUtil.getApiStatus(resultSet.getString("STATUS"))) .apiType(apiType) + .apiSubtype(apiSubtype) .createdBy(resultSet.getString("CREATED_BY")) .createdTime(resultSet.getString("CREATED_TIME")) .updatedBy(resultSet.getString("UPDATED_BY")) @@ -14747,9 +14753,9 @@ public LLMProvider getLLMProvider(String organization, String llmProviderId) thr public LLMProvider getLLMProvider(String organization, String name, String apiVersion) throws APIManagementException { String errorMessage = "Failed to get LLM Provider in tenant domain: " + organization; - try { - Connection connection = APIMgtDBUtil.getConnection(); - PreparedStatement preparedStatement = connection.prepareStatement(SQLConstants.GET_LLM_PROVIDER_BY_NAME_AND_VERSION_SQL); + try (Connection connection = APIMgtDBUtil.getConnection(); + PreparedStatement preparedStatement = connection.prepareStatement( + SQLConstants.GET_LLM_PROVIDER_BY_NAME_AND_VERSION_SQL)) { preparedStatement.setString(1, organization); preparedStatement.setString(2, name); preparedStatement.setString(3, apiVersion); @@ -22429,4 +22435,30 @@ public int checkForEgressAPIWithUUID(String uuid) throws APIManagementException } return 0; } + + /** + * This retrieves the API subtype for the given API UUID. + * + * @param uuid API UUID + * @return API subtype + * @throws APIManagementException + */ + public String retrieveAPISubtypeWithUUID(String uuid) throws APIManagementException { + + try (Connection connection = APIMgtDBUtil.getConnection()) { + try (PreparedStatement preparedStatement = connection.prepareStatement( + SQLConstants.RETRIEVE_API_SUBTYPE_WITH_UUID)) { + preparedStatement.setString(1, uuid); + try (ResultSet resultSet = preparedStatement.executeQuery()) { + if (resultSet.next()) { + return resultSet.getString("API_SUBTYPE"); + } + } + } + } catch (SQLException e) { + throw new APIManagementException("Error while retrieving apimgt connection", e, + ExceptionCodes.INTERNAL_ERROR); + } + return APIConstants.API_SUBTYPE_DEFAULT; + } } diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/constants/SQLConstants.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/constants/SQLConstants.java index 305ea1b62a55..c695042aecbb 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/constants/SQLConstants.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/constants/SQLConstants.java @@ -1471,8 +1471,8 @@ public class SQLConstants { public static final String ADD_API_SQL = " INSERT INTO AM_API (API_PROVIDER,API_NAME,API_VERSION,CONTEXT,CONTEXT_TEMPLATE,CREATED_BY," + "CREATED_TIME,API_TIER,API_TYPE,API_UUID,STATUS,ORGANIZATION,GATEWAY_VENDOR,VERSION_COMPARABLE," + - "IS_EGRESS)" + - " VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + "IS_EGRESS, API_SUBTYPE)" + + " VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; public static final String GET_GATEWAY_TYPE_SQL_BY_UUID = "SELECT API.GATEWAY_TYPE FROM AM_API API WHERE API.API_UUID = ?"; @@ -3108,9 +3108,10 @@ public class SQLConstants { public static final String UPDATE_API_STATUS = "UPDATE AM_API SET STATUS = ? WHERE API_ID = ?"; public static final String RETRIEVE_API_STATUS_FROM_UUID = "SELECT STATUS FROM AM_API WHERE API_UUID = ?"; public static final String CHECK_API_EGRESS_WITH_UUID = "SELECT IS_EGRESS FROM AM_API WHERE API_UUID = ?"; + public static final String RETRIEVE_API_SUBTYPE_WITH_UUID = "SELECT API_SUBTYPE FROM AM_API WHERE API_UUID = ?"; public static final String RETRIEVE_API_INFO_FROM_UUID = "SELECT API_UUID, API_PROVIDER, API_NAME, API_VERSION, " + "CONTEXT, CONTEXT_TEMPLATE, API_TIER, API_TYPE, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, " + - " ORGANIZATION, REVISIONS_CREATED, STATUS, IS_EGRESS FROM AM_API WHERE API_UUID = ?"; + " ORGANIZATION, REVISIONS_CREATED, STATUS, IS_EGRESS, API_SUBTYPE FROM AM_API WHERE API_UUID = ?"; public static final String RETRIEVE_DEFAULT_VERSION = "SELECT DEFAULT_API_VERSION,PUBLISHED_DEFAULT_API_VERSION " + "FROM AM_API_DEFAULT_VERSION WHERE API_NAME = ? AND API_PROVIDER =?"; diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/devportal-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/devportal-api.yaml index 263d59d98dfd..719eaeabc837 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/devportal-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/devportal-api.yaml @@ -3984,6 +3984,12 @@ components: description: Whether the API is Egress or not default: false example: true + subtype: + type: string + description: Subtype of the API. + default: DEFAULT + example: AIAPI + readOnly: true APIInfoList: title: API Info List type: object @@ -4265,6 +4271,12 @@ components: description: Whether the API is egress or not default: false example: true + subtype: + type: string + description: Subtype of the API. + default: DEFAULT + example: AIAPI + readOnly: true APIMonetizationInfo: title: API monetization object required: diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/publisher-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/publisher-api.yaml index 42449d993f6c..63aabdba288f 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/publisher-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/publisher-api.yaml @@ -9505,6 +9505,12 @@ components: type: type: string example: HTTP + subtype: + type: string + description: Subtype of the API. + default: DEFAULT + example: AIAPI + readOnly: true audience: type: string description: The audience of the API. Accepted values are PUBLIC, SINGLE @@ -9835,6 +9841,12 @@ components: - SSE - WEBHOOK - ASYNC + subtype: + type: string + description: Subtype of the API. + default: DEFAULT + example: AIAPI + readOnly: true audience: type: string description: The audience of the API. Accepted values are PUBLIC, SINGLE diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIDTO.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIDTO.java index e80161b24a15..81d415d20ffa 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIDTO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIDTO.java @@ -102,6 +102,7 @@ public static TypeEnum fromValue(String v) { } } private TypeEnum type = TypeEnum.HTTP; + private String subtype = "DEFAULT"; @XmlType(name="AudienceEnum") @XmlEnum(String.class) @@ -656,6 +657,24 @@ public void setType(TypeEnum type) { this.type = type; } + /** + * Subtype of the API. + **/ + public APIDTO subtype(String subtype) { + this.subtype = subtype; + return this; + } + + + @ApiModelProperty(example = "AIAPI", value = "Subtype of the API.") + @JsonProperty("subtype") + public String getSubtype() { + return subtype; + } + public void setSubtype(String subtype) { + this.subtype = subtype; + } + /** * The audience of the API. Accepted values are PUBLIC, SINGLE **/ @@ -1452,6 +1471,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(enableSchemaValidation, API.enableSchemaValidation) && Objects.equals(enableSubscriberVerification, API.enableSubscriberVerification) && Objects.equals(type, API.type) && + Objects.equals(subtype, API.subtype) && Objects.equals(audience, API.audience) && Objects.equals(audiences, API.audiences) && Objects.equals(transport, API.transport) && @@ -1499,7 +1519,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, context, version, provider, lifeCycleStatus, wsdlInfo, wsdlUrl, responseCachingEnabled, cacheTimeout, hasThumbnail, isDefaultVersion, isRevision, revisionedApiId, revisionId, enableSchemaValidation, enableSubscriberVerification, type, audience, audiences, transport, tags, policies, apiThrottlingPolicy, authorizationHeader, apiKeyHeader, securityScheme, maxTps, visibility, visibleRoles, visibleTenants, mediationPolicies, apiPolicies, subscriptionAvailability, subscriptionAvailableTenants, additionalProperties, additionalPropertiesMap, monetization, accessControl, accessControlRoles, businessInformation, corsConfiguration, websubSubscriptionConfiguration, workflowStatus, createdTime, lastUpdatedTimestamp, lastUpdatedTime, endpointConfig, endpointImplementationType, aiConfiguration, scopes, operations, threatProtectionPolicies, categories, keyManagers, serviceInfo, advertiseInfo, gatewayVendor, gatewayType, asyncTransportProtocols, egress); + return Objects.hash(id, name, description, context, version, provider, lifeCycleStatus, wsdlInfo, wsdlUrl, responseCachingEnabled, cacheTimeout, hasThumbnail, isDefaultVersion, isRevision, revisionedApiId, revisionId, enableSchemaValidation, enableSubscriberVerification, type, subtype, audience, audiences, transport, tags, policies, apiThrottlingPolicy, authorizationHeader, apiKeyHeader, securityScheme, maxTps, visibility, visibleRoles, visibleTenants, mediationPolicies, apiPolicies, subscriptionAvailability, subscriptionAvailableTenants, additionalProperties, additionalPropertiesMap, monetization, accessControl, accessControlRoles, businessInformation, corsConfiguration, websubSubscriptionConfiguration, workflowStatus, createdTime, lastUpdatedTimestamp, lastUpdatedTime, endpointConfig, endpointImplementationType, aiConfiguration, scopes, operations, threatProtectionPolicies, categories, keyManagers, serviceInfo, advertiseInfo, gatewayVendor, gatewayType, asyncTransportProtocols, egress); } @Override @@ -1526,6 +1546,7 @@ public String toString() { sb.append(" enableSchemaValidation: ").append(toIndentedString(enableSchemaValidation)).append("\n"); sb.append(" enableSubscriberVerification: ").append(toIndentedString(enableSubscriberVerification)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" subtype: ").append(toIndentedString(subtype)).append("\n"); sb.append(" audience: ").append(toIndentedString(audience)).append("\n"); sb.append(" audiences: ").append(toIndentedString(audiences)).append("\n"); sb.append(" transport: ").append(toIndentedString(transport)).append("\n"); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIInfoDTO.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIInfoDTO.java index a1cad740d2e8..0f31159eff04 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIInfoDTO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/dto/APIInfoDTO.java @@ -35,6 +35,7 @@ public class APIInfoDTO { private String version = null; private String provider = null; private String type = null; + private String subtype = "DEFAULT"; @XmlType(name="AudienceEnum") @XmlEnum(String.class) @@ -242,6 +243,24 @@ public void setType(String type) { this.type = type; } + /** + * Subtype of the API. + **/ + public APIInfoDTO subtype(String subtype) { + this.subtype = subtype; + return this; + } + + + @ApiModelProperty(example = "AIAPI", value = "Subtype of the API.") + @JsonProperty("subtype") + public String getSubtype() { + return subtype; + } + public void setSubtype(String subtype) { + this.subtype = subtype; + } + /** * The audience of the API. Accepted values are PUBLIC, SINGLE **/ @@ -571,6 +590,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(version, apIInfo.version) && Objects.equals(provider, apIInfo.provider) && Objects.equals(type, apIInfo.type) && + Objects.equals(subtype, apIInfo.subtype) && Objects.equals(audience, apIInfo.audience) && Objects.equals(audiences, apIInfo.audiences) && Objects.equals(lifeCycleStatus, apIInfo.lifeCycleStatus) && @@ -593,7 +613,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, context, additionalProperties, additionalPropertiesMap, version, provider, type, audience, audiences, lifeCycleStatus, workflowStatus, hasThumbnail, securityScheme, createdTime, updatedTime, updatedBy, gatewayVendor, gatewayType, advertiseOnly, monetizedInfo, businessOwner, businessOwnerEmail, technicalOwner, technicalOwnerEmail, egress); + return Objects.hash(id, name, description, context, additionalProperties, additionalPropertiesMap, version, provider, type, subtype, audience, audiences, lifeCycleStatus, workflowStatus, hasThumbnail, securityScheme, createdTime, updatedTime, updatedBy, gatewayVendor, gatewayType, advertiseOnly, monetizedInfo, businessOwner, businessOwnerEmail, technicalOwner, technicalOwnerEmail, egress); } @Override @@ -610,6 +630,7 @@ public String toString() { sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" subtype: ").append(toIndentedString(subtype)).append("\n"); sb.append(" audience: ").append(toIndentedString(audience)).append("\n"); sb.append(" audiences: ").append(toIndentedString(audiences)).append("\n"); sb.append(" lifeCycleStatus: ").append(toIndentedString(lifeCycleStatus)).append("\n"); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/TemplateBuilderUtil.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/TemplateBuilderUtil.java index c8fa7794f51c..bd35cd8fae60 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/TemplateBuilderUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/TemplateBuilderUtil.java @@ -300,27 +300,27 @@ public static APITemplateBuilderImpl getAPITemplateBuilder(API api, String tenan tokenBaseThrottlingCountHolder.isTokenBasedThrottlingEnabled().toString()); if (tokenBaseThrottlingCountHolder.getProductionMaxPromptTokenCount() != null) { properties.put("productionMaxPromptTokenCount", - tokenBaseThrottlingCountHolder.getProductionMaxPromptTokenCount().toString()); + tokenBaseThrottlingCountHolder.getProductionMaxPromptTokenCount()); } if (tokenBaseThrottlingCountHolder.getProductionMaxCompletionTokenCount() != null) { properties.put("productionMaxCompletionTokenCount", - tokenBaseThrottlingCountHolder.getProductionMaxCompletionTokenCount().toString()); + tokenBaseThrottlingCountHolder.getProductionMaxCompletionTokenCount()); } if (tokenBaseThrottlingCountHolder.getProductionMaxTotalTokenCount() != null) { properties.put("productionMaxTotalTokenCount", - tokenBaseThrottlingCountHolder.getProductionMaxTotalTokenCount().toString()); + tokenBaseThrottlingCountHolder.getProductionMaxTotalTokenCount()); } if (tokenBaseThrottlingCountHolder.getSandboxMaxPromptTokenCount() != null) { properties.put("sandboxMaxPromptTokenCount", - tokenBaseThrottlingCountHolder.getSandboxMaxPromptTokenCount().toString()); + tokenBaseThrottlingCountHolder.getSandboxMaxPromptTokenCount()); } if (tokenBaseThrottlingCountHolder.getSandboxMaxCompletionTokenCount() != null) { properties.put("sandboxMaxCompletionTokenCount", - tokenBaseThrottlingCountHolder.getSandboxMaxCompletionTokenCount().toString()); + tokenBaseThrottlingCountHolder.getSandboxMaxCompletionTokenCount()); } if (tokenBaseThrottlingCountHolder.getSandboxMaxTotalTokenCount() != null) { properties.put("sandboxMaxTotalTokenCount", - tokenBaseThrottlingCountHolder.getSandboxMaxTotalTokenCount().toString()); + tokenBaseThrottlingCountHolder.getSandboxMaxTotalTokenCount()); } } diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java index 22ea6ef0ca7d..fd28c70d51f3 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java @@ -744,6 +744,7 @@ public static APIInfoDTO fromAPIToInfoDTO(API api) { apiInfoDTO.setGatewayType(api.getGatewayType()); apiInfoDTO.setGatewayVendor(api.getGatewayVendor()); apiInfoDTO.setEgress(api.isEgress() == 1); // true -1, false - 0 + apiInfoDTO.setSubtype(api.getSubtype()); return apiInfoDTO; } @@ -1466,6 +1467,7 @@ public static APIDTO fromAPItoDTO(API model, boolean preserveCredentials, dto.setGatewayVendor(gatewayVendor); dto.setGatewayType(model.getGatewayType()); dto.setEgress(model.isEgress() == 1); //true - 1, false - 0 + dto.setSubtype(model.getSubtype()); if (model.getGatewayVendor() == null) { dto.setGatewayVendor(APIConstants.WSO2_GATEWAY_ENVIRONMENT); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java index 847c561d279a..0d813488e550 100755 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java @@ -1386,6 +1386,9 @@ public static API prepareToCreateAPIByDTO(APIDTO body, APIProvider apiProvider, apiToAdd.setGatewayType(body.getGatewayType()); if (body.getAiConfiguration() != null) { apiToAdd.setAiConfiguration(convertToAiConfiguration(body.getAiConfiguration())); + apiToAdd.setSubtype(APIConstants.API_SUBTYPE_AI_API); + } else { + apiToAdd.setSubtype(APIConstants.API_SUBTYPE_DEFAULT); } apiToAdd.setEgress(body.isEgress() ? 1 : 0); return apiToAdd; diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml index 42449d993f6c..63aabdba288f 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/resources/publisher-api.yaml @@ -9505,6 +9505,12 @@ components: type: type: string example: HTTP + subtype: + type: string + description: Subtype of the API. + default: DEFAULT + example: AIAPI + readOnly: true audience: type: string description: The audience of the API. Accepted values are PUBLIC, SINGLE @@ -9835,6 +9841,12 @@ components: - SSE - WEBHOOK - ASYNC + subtype: + type: string + description: Subtype of the API. + default: DEFAULT + example: AIAPI + readOnly: true audience: type: string description: The audience of the API. Accepted values are PUBLIC, SINGLE diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIDTO.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIDTO.java index 551d5d4a22f6..c5556b76967d 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIDTO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIDTO.java @@ -66,6 +66,7 @@ public class APIDTO { private String gatewayVendor = null; private List asyncTransportProtocols = new ArrayList(); private Boolean egress = false; + private String subtype = "DEFAULT"; /** * UUID of the api @@ -716,6 +717,24 @@ public void setEgress(Boolean egress) { this.egress = egress; } + /** + * Subtype of the API. + **/ + public APIDTO subtype(String subtype) { + this.subtype = subtype; + return this; + } + + + @ApiModelProperty(example = "AIAPI", value = "Subtype of the API.") + @JsonProperty("subtype") + public String getSubtype() { + return subtype; + } + public void setSubtype(String subtype) { + this.subtype = subtype; + } + @Override public boolean equals(java.lang.Object o) { @@ -761,12 +780,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(lastUpdatedTime, API.lastUpdatedTime) && Objects.equals(gatewayVendor, API.gatewayVendor) && Objects.equals(asyncTransportProtocols, API.asyncTransportProtocols) && - Objects.equals(egress, API.egress); + Objects.equals(egress, API.egress) && + Objects.equals(subtype, API.subtype); } @Override public int hashCode() { - return Objects.hash(id, name, description, context, version, provider, apiDefinition, wsdlUri, lifeCycleStatus, isDefaultVersion, type, transport, operations, authorizationHeader, apiKeyHeader, securityScheme, tags, tiers, hasThumbnail, additionalProperties, monetization, endpointURLs, businessInformation, environmentList, scopes, avgRating, subscriptions, advertiseInfo, isSubscriptionAvailable, categories, keyManagers, createdTime, lastUpdatedTime, gatewayVendor, asyncTransportProtocols, egress); + return Objects.hash(id, name, description, context, version, provider, apiDefinition, wsdlUri, lifeCycleStatus, isDefaultVersion, type, transport, operations, authorizationHeader, apiKeyHeader, securityScheme, tags, tiers, hasThumbnail, additionalProperties, monetization, endpointURLs, businessInformation, environmentList, scopes, avgRating, subscriptions, advertiseInfo, isSubscriptionAvailable, categories, keyManagers, createdTime, lastUpdatedTime, gatewayVendor, asyncTransportProtocols, egress, subtype); } @Override @@ -810,6 +830,7 @@ public String toString() { sb.append(" gatewayVendor: ").append(toIndentedString(gatewayVendor)).append("\n"); sb.append(" asyncTransportProtocols: ").append(toIndentedString(asyncTransportProtocols)).append("\n"); sb.append(" egress: ").append(toIndentedString(egress)).append("\n"); + sb.append(" subtype: ").append(toIndentedString(subtype)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIInfoDTO.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIInfoDTO.java index 8d0d7ab109e4..75be7e71ea77 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIInfoDTO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/v1/dto/APIInfoDTO.java @@ -45,6 +45,7 @@ public class APIInfoDTO { private List additionalProperties = new ArrayList(); private Boolean monetizedInfo = null; private Boolean egress = false; + private String subtype = "DEFAULT"; /** **/ @@ -394,6 +395,24 @@ public void setEgress(Boolean egress) { this.egress = egress; } + /** + * Subtype of the API. + **/ + public APIInfoDTO subtype(String subtype) { + this.subtype = subtype; + return this; + } + + + @ApiModelProperty(example = "AIAPI", value = "Subtype of the API.") + @JsonProperty("subtype") + public String getSubtype() { + return subtype; + } + public void setSubtype(String subtype) { + this.subtype = subtype; + } + @Override public boolean equals(java.lang.Object o) { @@ -423,12 +442,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(gatewayVendor, apIInfo.gatewayVendor) && Objects.equals(additionalProperties, apIInfo.additionalProperties) && Objects.equals(monetizedInfo, apIInfo.monetizedInfo) && - Objects.equals(egress, apIInfo.egress); + Objects.equals(egress, apIInfo.egress) && + Objects.equals(subtype, apIInfo.subtype); } @Override public int hashCode() { - return Objects.hash(id, name, description, context, version, type, createdTime, provider, lifeCycleStatus, thumbnailUri, avgRating, throttlingPolicies, advertiseInfo, businessInformation, isSubscriptionAvailable, monetizationLabel, gatewayVendor, additionalProperties, monetizedInfo, egress); + return Objects.hash(id, name, description, context, version, type, createdTime, provider, lifeCycleStatus, thumbnailUri, avgRating, throttlingPolicies, advertiseInfo, businessInformation, isSubscriptionAvailable, monetizationLabel, gatewayVendor, additionalProperties, monetizedInfo, egress, subtype); } @Override @@ -456,6 +476,7 @@ public String toString() { sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append(" monetizedInfo: ").append(toIndentedString(monetizedInfo)).append("\n"); sb.append(" egress: ").append(toIndentedString(egress)).append("\n"); + sb.append(" subtype: ").append(toIndentedString(subtype)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/APIMappingUtil.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/APIMappingUtil.java index 0d66a3939982..eac78f192d5c 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/APIMappingUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/APIMappingUtil.java @@ -95,6 +95,7 @@ public static APIDTO fromAPItoDTO(API model, String organization) throws APIMana dto.setIsDefaultVersion(model.isPublishedDefaultVersion()); dto.setLifeCycleStatus(model.getStatus()); dto.setType(model.getType()); + dto.setSubtype(model.getSubtype()); dto.setAvgRating(String.valueOf(model.getRating())); dto.setEgress(model.isEgress() == 1); @@ -851,6 +852,7 @@ static APIInfoDTO fromAPIToInfoDTO(API api) throws APIManagementException { apiInfoDTO.setProvider(apiId.getProviderName()); apiInfoDTO.setLifeCycleStatus(api.getStatus()); apiInfoDTO.setType(api.getType()); + apiInfoDTO.setSubtype(api.getSubtype()); apiInfoDTO.setAvgRating(String.valueOf(api.getRating())); String providerName = api.getId().getProviderName(); apiInfoDTO.setProvider(APIUtil.replaceEmailDomainBack(providerName)); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml index 263d59d98dfd..719eaeabc837 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/resources/devportal-api.yaml @@ -3984,6 +3984,12 @@ components: description: Whether the API is Egress or not default: false example: true + subtype: + type: string + description: Subtype of the API. + default: DEFAULT + example: AIAPI + readOnly: true APIInfoList: title: API Info List type: object @@ -4265,6 +4271,12 @@ components: description: Whether the API is egress or not default: false example: true + subtype: + type: string + description: Subtype of the API. + default: DEFAULT + example: AIAPI + readOnly: true APIMonetizationInfo: title: API monetization object required: diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql index 24ea27802cf5..837842051ad5 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql @@ -1478,6 +1478,7 @@ CREATE TABLE AM_API ( CONTEXT_TEMPLATE VARCHAR2(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR2(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql index 0af23b61c79c..ec7d98017533 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql @@ -1478,6 +1478,7 @@ CREATE TABLE AM_API ( CONTEXT_TEMPLATE VARCHAR2(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR2(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/Postgresql/apimgt/tables.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/Postgresql/apimgt/tables.sql index ea759d19d026..f3d456093d50 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/Postgresql/apimgt/tables.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/Postgresql/apimgt/tables.sql @@ -1842,6 +1842,7 @@ CREATE TABLE IF NOT EXISTS AM_API ( CONTEXT_TEMPLATE VARCHAR(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql index c3c4a1fd4a69..2afc4367dc24 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql @@ -1711,6 +1711,7 @@ CREATE TABLE AM_API ( CONTEXT_TEMPLATE VARCHAR(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/db2.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/db2.sql index 8c8366adeae5..78f1932daeb2 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/db2.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/db2.sql @@ -2321,6 +2321,7 @@ CREATE TABLE AM_API ( CONTEXT_TEMPLATE VARCHAR(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100) NOT NULL, GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/h2.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/h2.sql index 4eda1f4ec1b9..dedc65a03f51 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/h2.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/h2.sql @@ -1567,6 +1567,7 @@ CREATE TABLE IF NOT EXISTS AM_API ( CONTEXT_TEMPLATE VARCHAR(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', PRIMARY KEY(API_ID), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mssql.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mssql.sql index a55e511d93be..df031bd08186 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mssql.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mssql.sql @@ -1722,6 +1722,7 @@ CREATE TABLE AM_API ( CONTEXT_TEMPLATE VARCHAR(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mysql.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mysql.sql index 5c9e315c3b90..5204c3e8b077 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mysql.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mysql.sql @@ -1506,6 +1506,7 @@ CREATE TABLE IF NOT EXISTS AM_API ( CONTEXT_TEMPLATE VARCHAR(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mysql_cluster.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mysql_cluster.sql index 900582da5013..89b9d293f709 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mysql_cluster.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mysql_cluster.sql @@ -1691,6 +1691,7 @@ CREATE TABLE IF NOT EXISTS AM_API ( CONTEXT_TEMPLATE VARCHAR(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle.sql index ece87d7574f0..2c52981b4264 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle.sql @@ -2452,6 +2452,7 @@ CREATE TABLE AM_API ( CONTEXT_TEMPLATE VARCHAR2(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR2(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_23c.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_23c.sql index 385edd568c99..191035d20dfc 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_23c.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_23c.sql @@ -2452,6 +2452,7 @@ CREATE TABLE AM_API ( CONTEXT_TEMPLATE VARCHAR2(256), API_TIER VARCHAR(256), API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR2(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_rac.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_rac.sql index 46a584838b2b..946a660a2e96 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_rac.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_rac.sql @@ -2442,6 +2442,7 @@ CREATE TABLE AM_API ( CONTEXT_TEMPLATE VARCHAR2(256), API_TIER VARCHAR(256), API_TYPE VARCHAR2(10), + API_SUBTYPE VARCHAR2(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR2(100), diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/postgresql.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/postgresql.sql index 66b493e247f3..61fe41a36402 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/postgresql.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/postgresql.sql @@ -1841,7 +1841,7 @@ CREATE TABLE IF NOT EXISTS AM_API ( CONTEXT VARCHAR(256), CONTEXT_TEMPLATE VARCHAR(256), API_TIER VARCHAR(256), - API_TYPE VARCHAR(10), + API_SUBTYPE VARCHAR(10), ORGANIZATION VARCHAR(100), GATEWAY_VENDOR VARCHAR(100) DEFAULT 'wso2', CREATED_BY VARCHAR(100),