From f01550b36e25580e6ff13919175da0a61eb21afd Mon Sep 17 00:00:00 2001 From: geethkokila Date: Mon, 12 Mar 2018 14:46:26 +0530 Subject: [PATCH 1/3] Update device-mgt component version to 3.1.0 --- .../org.wso2.carbon.apimgt.annotations/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.application.extension/pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.handlers/pom.xml | 6 +++--- .../org.wso2.carbon.apimgt.integration.client/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher/pom.xml | 4 ++-- components/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.v09.api/pom.xml | 2 +- components/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-mgt-extensions/pom.xml | 2 +- .../pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.common/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.core/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions/pom.xml | 2 +- components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.url.printer/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml | 2 +- components/device-mgt/pom.xml | 2 +- .../email-sender/org.wso2.carbon.email.sender.core/pom.xml | 2 +- components/email-sender/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.oauth.extensions/pom.xml | 4 ++-- .../pom.xml | 2 +- .../org.wso2.carbon.identity.jwt.client.extension/pom.xml | 2 +- components/identity-extensions/pom.xml | 2 +- .../org.wso2.carbon.complex.policy.decision.point/pom.xml | 4 ++-- .../org.wso2.carbon.policy.decision.point/pom.xml | 4 ++-- .../org.wso2.carbon.policy.information.point/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml | 4 ++-- components/policy-mgt/pom.xml | 4 ++-- components/test-coverage/pom.xml | 2 +- .../org.wso2.carbon.webapp.authenticator.framework/pom.xml | 4 ++-- components/webapp-authenticator-framework/pom.xml | 4 ++-- .../pom.xml | 6 +++--- .../org.wso2.carbon.apimgt.handler.server.feature/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml | 4 ++-- features/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.server.feature/pom.xml | 4 ++-- features/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/device-mgt-extensions/pom.xml | 2 +- .../pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.api.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.basics.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions.feature/pom.xml | 4 ++-- .../device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.server.feature/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.ui.feature/pom.xml | 2 +- features/device-mgt/pom.xml | 4 ++-- .../org.wso2.carbon.email.sender.feature/pom.xml | 4 ++-- features/email-sender/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/jwt-client/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/oauth-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.policy.mgt.server.feature/pom.xml | 4 ++-- features/policy-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/webapp-authenticator-framework/pom.xml | 4 ++-- pom.xml | 4 ++-- 79 files changed, 127 insertions(+), 127 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml index bf9198430bc..5cccf8e46b3 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml @@ -22,13 +22,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - API Management Annotations WSO2 Carbon - API Management Custom Annotation Module diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml index f4c98d07264..8b1200fa93e 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml @@ -21,12 +21,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT org.wso2.carbon.apimgt.application.extension.api war WSO2 Carbon - API Application Management API diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml index 05e7aa49c29..017de0a5b9d 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml @@ -22,12 +22,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT org.wso2.carbon.apimgt.application.extension bundle WSO2 Carbon - API Application Management diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml index b9555de00c1..bb799f2c351 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml @@ -21,13 +21,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handlers - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - API Security Handler Component WSO2 Carbon - API Management Security Handler Module @@ -140,4 +140,4 @@ - \ No newline at end of file + diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml index 92906261bd3..65d4a845625 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml @@ -13,13 +13,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.client - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - API Management Integration Client WSO2 Carbon - API Management Integration Client diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml index 1e6370218b6..8d73eeec9c1 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml @@ -13,13 +13,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.generated.client - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - API Management Integration Generated Client WSO2 Carbon - API Management Integration Client diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml index 0d2193284ca..8801468a677 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml @@ -22,13 +22,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - API Management Webapp Publisher WSO2 Carbon - API Management Webapp Publisher diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index 0e6f6677689..27663258103 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 apimgt-extensions - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - API Management Extensions Component http://wso2.org diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml index 9bfa5b7667a..d9608299749 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml index 249b2a57a12..228d3f1fe0f 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml index def719e48d5..de049acdedf 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml @@ -24,7 +24,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 37d9cedaf5b..c3cf108ac07 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -21,13 +21,13 @@ org.wso2.carbon.devicemgt certificate-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - Certificate Management Core WSO2 Carbon - Certificate Management Core diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.v09.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.v09.api/pom.xml index f23c686d5cf..f304c2c142a 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.v09.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.v09.api/pom.xml @@ -24,7 +24,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index 1bff5e24e0c..71cf3006863 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - Certificate Management Component http://wso2.org diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml index cbf22cd1cdb..fea16da8d04 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml index 1be77a91eb9..740aea82eec 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml index 0c735e2c08c..658b13f6cd5 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml index c50e4f4e97b..a2c8cf7be65 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index d6f4bd07576..2e28efd8014 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index 84c113bdf44..50f147e6433 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index ff2afea8ed9..4281f8da7e2 100644 --- a/components/device-mgt-extensions/pom.xml +++ b/components/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 3c717e0dd03..eaf042cc5d4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index 5a5b6d79014..b2fd91b379b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index 5843d845af6..f6ed0ecf735 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index d0e7f01e708..8ad2501b038 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index 74ba2d7f3d3..8f58b2e879d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml index fc70d633d41..391c8d6edfd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml index 42cf590fb39..d943be2e087 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml @@ -23,7 +23,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml index de47bb9043f..d7140a31d85 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index b87c911d289..b42c90fe411 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml index 505d4e187bc..b7e0884aae4 100644 --- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml +++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index 44e59f3d8b0..59cc37315f0 100644 --- a/components/email-sender/pom.xml +++ b/components/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml index bea8a827f49..6b97fab7062 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt identity-extensions - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - OAuth Extensions http://wso2.org diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml index 96c4bee3c6d..b2a672e6a99 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml @@ -21,7 +21,7 @@ identity-extensions org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT 4.0.0 diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml index 8ff3c0add84..1a1ff5d487e 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt identity-extensions - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index a5b6b7b417a..a2452a7faf4 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml index 87f4dde00b8..12eaf748385 100644 --- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - Policy Decision Point WSO2 Carbon - Policy Decision Point diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml index d2caf099bfa..bb2c3aa317c 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml @@ -3,14 +3,14 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.decision.point - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - Policy Decision Point WSO2 Carbon - Policy Decision Point diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml index c133acba41d..ebcd029ed3e 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - Policy Information Point WSO2 Carbon - Policy Information Point diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml index 7cb2f95ebfc..35ba876a3fd 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - Policy Management Common WSO2 Carbon - Policy Management Common diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml index 18daefd78bf..9ea93cd37ff 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index 502f8e5c1bd..8afad148d1e 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 policy-mgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - Policy Management Component http://wso2.org diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml index 11dd6194115..9951da9d29e 100644 --- a/components/test-coverage/pom.xml +++ b/components/test-coverage/pom.xml @@ -21,7 +21,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml index 3beba5fa96d..673e31c9288 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT bundle WSO2 Carbon - Web Application Authenticator Framework Bundle WSO2 Carbon - Web Application Authenticator Framework Bundle diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index 8c7645e6aa4..21329db7ec0 100644 --- a/components/webapp-authenticator-framework/pom.xml +++ b/components/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework http://wso2.org diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml index e588da79e5e..b11ac7ec7da 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - API Management Application Extension Feature http://wso2.org This feature contains an implementation of a api application registration, which takes care of subscription @@ -129,4 +129,4 @@ - \ No newline at end of file + diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml index b6bd4402da6..87eca3e348c 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handler.server.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Device Management - APIM handler Server Feature http://wso2.org This feature contains the handler for the api authentications diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml index d53a09ebeb1..51c49685418 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml @@ -21,13 +21,13 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.client.feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - APIM Integration Client Feature http://wso2.org diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml index e5bc6c03516..01a4b2a60df 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - API Management Webapp Publisher Feature http://wso2.org This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml index 7ca23455f9f..f0ce8059116 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - API Management Extensions Feature http://wso2.org diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml index f281d7ebec0..4371b55968d 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml index bb12c9f177c..1aa0b187902 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml index d962fb83b5d..6453f9f5e6f 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Certificate Management Server Feature http://wso2.org This feature contains the core bundles required for back-end Certificate Management functionality diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml index 13535a01e61..a6bbee87f04 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - Certificate Management Feature http://wso2.org diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml index 88ebc3405a7..4e4e0abf639 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Device Type Deployer Feature http://wso2.org WSO2 Carbon - Device Type Deployer Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml index 9df51b27663..1075ea562ac 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - FCM Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml index 375af164719..dfa210cd8b0 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - MQTT Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml index 3ac4dc19261..8c6b7a02f15 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - MQTT Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml index 385960ba025..58d426a747c 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - XMPP Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - XMPP Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml index a71aba72114..b462bd25065 100644 --- a/features/device-mgt-extensions/pom.xml +++ b/features/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml index 501786b0bcf..f9aa31f42f6 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.data.publisher.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains bundles related to device analytics data publisher diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml index 962d97159de..c2ca2715ffe 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml index 2e39c0ab4f3..3a1fe38bbd9 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml index 4069eb0900d..5e095ce3f57 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml @@ -4,14 +4,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Device Management Extensions Feature http://wso2.org This feature contains common extensions used by key device management functionalities diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml index b94ba602128..9321cdd33e4 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml index fe9f7932681..30fcf8d381d 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml index edf5fd65cd8..3954495d63f 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index 193864ade56..fa8c32e0ba7 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml @@ -42,4 +42,4 @@ org.wso2.carbon.device.mgt.analytics.data.publisher.feature - \ No newline at end of file + diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml index 1253af129b3..fb12b90ae0a 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml +++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt email-sender-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Email Sender Feature http://wso2.org This feature contains the core bundles required for email sender related functionality diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml index 10476afa8a2..cceef05133a 100644 --- a/features/email-sender/pom.xml +++ b/features/email-sender/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - Email Sender Feature http://wso2.org diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml index 3d0ff7fd4ff..de08fba9221 100644 --- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml +++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt jwt-client-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - JWT Client Feature http://wso2.org This feature contains jwt client implementation from which we can get a access token using the jwt diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml index 2b4d235df2b..51455185f84 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 jwt-client-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - JWT Client Extension Feature http://wso2.org diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml index 32c9f36d56c..d4e1b05ef9c 100644 --- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml +++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt oauth-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Device Mgt OAuth Extensions Feature http://wso2.org This feature contains devicemgt related OAuth extensions diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml index ca173b7cfbe..f054b42f543 100644 --- a/features/oauth-extensions/pom.xml +++ b/features/oauth-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - Device Management OAuth Extensions Feature http://wso2.org diff --git a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml index f014289c4f1..db77436e93b 100644 --- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml +++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt policy-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Policy Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml index f973b4357cb..d52a0cb7cd3 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - Policy Management Feature http://wso2.org diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml index f3997adb2fc..f0b863ec14b 100644 --- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml +++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Webapp Authenticator Framework Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml index 35eceb5af1f..20afed7ea8c 100644 --- a/features/webapp-authenticator-framework/pom.xml +++ b/features/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 8e2afa9d4d4..44c831e8b7f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1927,7 +1927,7 @@ 1.2.11.wso2v10 - 3.0.245-SNAPSHOT + 3.1.0-SNAPSHOT 4.6.21 From 7cb9685bc6a808550ea65a9436a877f65c761977 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Wed, 14 Mar 2018 14:13:04 +0530 Subject: [PATCH 2/3] Fix the api publisher and store update --- .../client/publisher/PublisherClient.java | 42 +- .../src/main/resources/publisher-api.yaml | 1430 ++++++++++++++--- .../src/main/resources/store-api.yaml | 630 ++++++-- .../publisher/APIPublisherServiceImpl.java | 4 +- .../publisher/APIPublisherServiceTest.java | 22 +- .../publisher/BaseAPIPublisherTest.java | 4 +- .../webapp/publisher/utils/MockApi.java | 21 +- 7 files changed, 1745 insertions(+), 408 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/PublisherClient.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/PublisherClient.java index 5ce49b7e83a..8b52380f1c3 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/PublisherClient.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/publisher/PublisherClient.java @@ -35,12 +35,13 @@ import org.wso2.carbon.core.util.Utils; public class PublisherClient { private static final Log log = LogFactory.getLog(PublisherClient.class); - private APIsApi api = null; - private APIDocumentApi document = null; - private ApplicationsApi application = null; - private EnvironmentsApi environments = null; - private SubscriptionsApi subscriptions = null; - private TiersApi tiers = null; + private APIIndividualApi api = null; + private APICollectionApi apis = null; + private DocumentIndividualApi document = null; + private ApplicationIndividualApi application = null; + private EnvironmentCollectionApi environments = null; + private SubscriptionCollectionApi subscriptions = null; + private ThrottlingTierCollectionApi tiers = null; /** @@ -54,35 +55,40 @@ public class PublisherClient { .requestInterceptor(requestInterceptor).encoder(new GsonEncoder()).decoder(new GsonDecoder()); String basePath = Utils.replaceSystemProperty(APIMConfigReader.getInstance().getConfig().getPublisherEndpoint()); - api = builder.target(APIsApi.class, basePath); - document = builder.target(APIDocumentApi.class, basePath); - application = builder.target(ApplicationsApi.class, basePath); - environments = builder.target(EnvironmentsApi.class, basePath); - subscriptions = builder.target(SubscriptionsApi.class, basePath); - tiers = builder.target(TiersApi.class, basePath); + api = builder.target(APIIndividualApi.class, basePath); + apis = builder.target(APICollectionApi.class, basePath); + document = builder.target(DocumentIndividualApi.class, basePath); + application = builder.target(ApplicationIndividualApi.class, basePath); + environments = builder.target(EnvironmentCollectionApi.class, basePath); + subscriptions = builder.target(SubscriptionCollectionApi.class, basePath); + tiers = builder.target(ThrottlingTierCollectionApi.class, basePath); } - public APIsApi getApi() { + public APIIndividualApi getApi() { return api; } - public APIDocumentApi getDocument() { + public APICollectionApi getApis() { + return apis; + } + + public DocumentIndividualApi getDocument() { return document; } - public ApplicationsApi getApplication() { + public ApplicationIndividualApi getApplication() { return application; } - public EnvironmentsApi getEnvironments() { + public EnvironmentCollectionApi getEnvironments() { return environments; } - public SubscriptionsApi getSubscriptions() { + public SubscriptionCollectionApi getSubscriptions() { return subscriptions; } - public TiersApi getTiers() { + public ThrottlingTierCollectionApi getTiers() { return tiers; } } diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/publisher-api.yaml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/publisher-api.yaml index f213bd66524..e23d7d28a0f 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/publisher-api.yaml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/publisher-api.yaml @@ -1,15 +1,15 @@ + swagger: '2.0' ###################################################### # Prolog ###################################################### info: - version: "0.10.0" + version: "0.12.0" title: "WSO2 API Manager - Publisher API" description: | - This document specifies a **RESTful API** for WSO2 **API Manager** - Publisher. - - It is written with [swagger 2](http://swagger.io/). + This specifies a **RESTful API** for WSO2 **API Manager** - Publisher. + Please see [full swagger definition](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.1.66/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/resources/publisher-api.yaml) of the API which is written using [swagger 2.0](http://swagger.io/) specification. contact: name: "WSO2" url: "http://wso2.com/products/api-manager/" @@ -33,7 +33,7 @@ host: apis.wso2.com # The base path of the API. # Will be prefixed to all paths. -basePath: /api/am/publisher/v0.10 +basePath: /api/am/publisher/v0.12 # The following media types can be passed as input in message bodies of the API. # The actual media type must be specified in the Content-Type header field of the request. @@ -84,6 +84,15 @@ x-wso2-security: roles: admin name: apim:subscription_block key: apim:subscription_block + - description: "" + roles: admin + name: apim:mediation_policy_view + key: apim:mediation_policy_view + - description: "" + roles: admin + name: apim:api_workflow + key: apim:api_workflow + ###################################################### # The "API Collection" resource APIs @@ -96,12 +105,17 @@ paths: #----------------------------------------------------- get: x-scope: apim:api_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://localhost:9443/api/am/publisher/v0.12/apis" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/apis + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"This sample API provides Account Status Validation\",\n \"name\": \"AccountVal\",\n \"context\": \"/account\",\n \"id\": \"2e81f147-c8a8-4f68-b4f0-69e0e7510b01\",\n \"status\": \"PUBLISHED\"\n },\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": null,\n \"name\": \"api1\",\n \"context\": \"/api1\",\n \"id\": \"3e22d2fb-277a-4e9e-8c7e-1c0f7f73960e\",\n \"status\": \"PUBLISHED\"\n }\n ],\n \"next\": \"\",\n \"count\": 2\n}" summary: | - Get all APIs + Retrieve/Search APIs description: | - Get a list of available APIs qualifying under a given search condition. + This operation provides you a list of available APIs qualifying under a given search condition. + + Each retrieved API is represented with a minimal amount of attributes. If you want to get complete details of an API, you need to use **Get details of an API** operation. parameters: - $ref : '#/parameters/limit' - $ref : '#/parameters/offset' @@ -110,20 +124,27 @@ paths: description: | **Search condition**. - You can search in attributes by using an **"attribute:"** modifier. + You can search in attributes by using an **":"** modifier. + + Eg. + "provider:wso2" will match an API if the provider of the API is exactly "wso2". + + Additionally you can use wildcards. - Eg. "provider:wso2" will match an API if the provider of the API contains "wso2". + Eg. + "provider:wso2*" will match an API if the provider of the API starts with "wso2". Supported attribute modifiers are [**version, context, status, description, subcontext, doc, provider**] - If no advanced attribute modifier has been specified, search will match the - given query string against API Name. + If no advanced attribute modifier has been specified, the API names containing + the search term will be returned as a result. + type: string - $ref : "#/parameters/Accept" - $ref : "#/parameters/If-None-Match" tags: - - APIs + - API (Collection) responses: 200: description: | @@ -137,12 +158,12 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests. + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 406: description: | Not Acceptable. @@ -151,16 +172,18 @@ paths: $ref: '#/definitions/Error' #----------------------------------------------------- -# Create a new API +# Create a new API -API (Individual) #----------------------------------------------------- post: x-scope: apim:api_create - x-wso2-curl: "curl -H \"Authorization: Bearer 40e486e50ce43407181fb4c570d2cac7\" -H \"Content-Type: application/json\" -X POST -d @data.json http://127.0.0.1:9763/api/am/publisher/v0.10/apis" - x-wso2-request: "{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": true,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"Verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\"\n}" - x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b\nContent-Type: application/json\n\n{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": true,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"Verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"890a4f4d-09eb-4877-a323-57f6ce2ed79b\",\n \"status\": \"CREATED\"\n}" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json https://localhost:9443/api/am/publisher/v0.12/apis" + x-wso2-request: "POST https://localhost:9443/api/am/publisher/v0.12/apis\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\r\n \"name\": \"PizzaShackAPI\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"context\": \"/pizzashack\",\r\n \"version\": \"1.0.0\",\r\n \"provider\": \"admin\",\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created.\\\"}}}},\\\"/menu\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Return a list of available menu items\\\",\\\"parameters\\\":[],\\\"responses\\\":{\\\"200\\\":{\\\"headers\\\":{},\\\"schema\\\":{\\\"title\\\":\\\"Menu\\\",\\\"properties\\\":{\\\"list\\\":{\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/MenuItem\\\"},\\\"type\\\":\\\"array\\\"}},\\\"type\\\":\\\"object\\\"},\\\"description\\\":\\\"OK.\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"MenuItem\\\":{\\\"title\\\":\\\"Pizza menu Item\\\",\\\"properties\\\":{\\\"price\\\":{\\\"type\\\":\\\"string\\\"},\\\"description\\\":{\\\"type\\\":\\\"string\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\"},\\\"image\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"name\\\"]},\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"status\": \"PUBLISHED\",\r\n \"responseCaching\": \"Disabled\",\r\n \"cacheTimeout\": 300,\r\n \"destinationStatsEnabled\": false,\r\n \"isDefaultVersion\": false,\r\n \"type\": \"HTTP\",\r\n \"transport\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"tags\": [\"pizza\"],\r\n \"tiers\": [\"Unlimited\"],\r\n \"maxTps\": {\r\n \"sandbox\": 5000,\r\n \"production\": 1000\r\n },\r\n \"visibility\": \"PUBLIC\",\r\n \"visibleRoles\": [],\\r\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"sandbox_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\r\n \"endpointSecurity\": {\r\n \"username\": \"user\",\r\n \"type\": \"basic\",\r\n \"password\": \"pass\"\r\n },\r\n \"gatewayEnvironments\": \"Production and Sandbox\",\r\n \"sequences\": [{\"name\":\"json_validator\",\"type\": \"in\"},{\"name\":\"log_out_message\",\"type\": \"out\"}],\r\n \"subscriptionAvailability\": null,\r\n \"subscriptionAvailableTenants\": [],\r\n \"businessInformation\": {\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"technicalOwner\": \"John Doe\",\r\n \"businessOwner\": \"Jane Roe\"\r\n },\r\n \"corsConfiguration\": {\r\n \"accessControlAllowOrigins\": [\"*\"],\r\n \"accessControlAllowHeaders\": [\r\n \"authorization\",\r\n \"Access-Control-Allow-Origin\",\r\n \"Content-Type\",\r\n \"SOAPAction\"\r\n ],\r\n \"accessControlAllowMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"POST\",\r\n \"DELETE\",\r\n \"PATCH\",\r\n \"OPTIONS\"\r\n ],\r\n \"accessControlAllowCredentials\": false,\r\n \"corsConfigurationEnabled\": false\r\n }\r\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/publisher/v0.12/apis/7a2298c4-c905-403f-8fac-38c73301631f\nContent-Type: application/json\n\n{\r\n \"id\": \"7a2298c4-c905-403f-8fac-38c73301631f\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"context\": \"/pizzashack\",\r\n \"version\": \"1.0.0\",\r\n \"provider\": \"admin\",\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created.\\\"}}}},\\\"/menu\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Return a list of available menu items\\\",\\\"parameters\\\":[],\\\"responses\\\":{\\\"200\\\":{\\\"headers\\\":{},\\\"schema\\\":{\\\"title\\\":\\\"Menu\\\",\\\"properties\\\":{\\\"list\\\":{\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/MenuItem\\\"},\\\"type\\\":\\\"array\\\"}},\\\"type\\\":\\\"object\\\"},\\\"description\\\":\\\"OK.\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"MenuItem\\\":{\\\"title\\\":\\\"Pizza menu Item\\\",\\\"properties\\\":{\\\"price\\\":{\\\"type\\\":\\\"string\\\"},\\\"description\\\":{\\\"type\\\":\\\"string\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\"},\\\"image\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"name\\\"]},\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"responseCaching\": \"Disabled\",\r\n \"cacheTimeout\": 300,\r\n \"destinationStatsEnabled\": null,\r\n \"isDefaultVersion\": false,\r\n \"type\": \"HTTP\",\r\n \"transport\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"tags\": [\"pizza\"],\r\n \"tiers\": [\"Unlimited\"],\r\n \"maxTps\": {\r\n \"sandbox\": 5000,\r\n \"production\": 1000\r\n },\r\n \"thumbnailUri\": null,\r\n \"visibility\": \"PUBLIC\",\r\n \"visibleRoles\": [],\\r\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"sandbox_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\r\n \"endpointSecurity\": {\r\n \"username\": \"user\",\r\n \"type\": \"basic\",\r\n \"password\": \"pass\"\r\n },\r\n \"gatewayEnvironments\": \"Production and Sandbox\",\r\n \"sequences\": [{\"name\":\"json_validator\",\"type\":\"in\",\"id\":\"142ece76-b208-4aab-b29a-f382045ed066\",\"shared\":false},{\"name\":\"log_out_message\",\"type\":\"out\",\"id\":\"b3527be8-95e6-41e0-8097-3276987b7d4b\",\"shared\":false}],\r\n \"subscriptionAvailability\": null,\r\n \"subscriptionAvailableTenants\": [],\r\n \"businessInformation\": {\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"technicalOwner\": \"John Doe\",\r\n \"businessOwner\": \"Jane Roe\"\r\n },\r\n \"corsConfiguration\": {\r\n \"accessControlAllowOrigins\": [\"*\"],\r\n \"accessControlAllowHeaders\": [\r\n \"authorization\",\r\n \"Access-Control-Allow-Origin\",\r\n \"Content-Type\",\r\n \"SOAPAction\"\r\n ],\r\n \"accessControlAllowMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"POST\",\r\n \"DELETE\",\r\n \"PATCH\",\r\n \"OPTIONS\"\r\n ],\r\n \"accessControlAllowCredentials\": false,\r\n \"corsConfigurationEnabled\": false\r\n }\r\n}" summary: Create a new API description: | - Create a new API + This operation can be used to create a new API specifying the details of the API in the payload. The new API will be in `CREATED` state. + + There is a special capability for a user who has `APIM Admin` permission such that he can create APIs on behalf of other users. For that he can to specify `"provider" : "some_other_user"` in the payload so that the API's creator will be shown as `some_other_user` in the UI. parameters: - in: body name: body @@ -170,8 +193,9 @@ paths: schema: $ref: '#/definitions/API' - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/Authorization' tags: - - APIs + - API (Individual) responses: 201: description: | @@ -189,9 +213,13 @@ paths: description: | The content type of the body. type: string + Authorization: + description: | + The brearer token. + type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional request + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -216,18 +244,21 @@ paths: #----------------------------------------------------- get: x-scope: apim:api_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b" - x-wso2-response: "HTTP/1.1 200 OK\nDate: Mon, 22 Feb 2016 13:27:08 GMT\nContent-Type: application/json\nTransfer-Encoding: chunked\nServer: WSO2 Carbon Server\n\n{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": false,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"Verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"890a4f4d-09eb-4877-a323-57f6ce2ed79b\",\n \"status\": \"PUBLISHED\"\n}" - summary: Get API details + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://localhost:9443/api/am/publisher/v0.12/apis/7a2298c4-c905-403f-8fac-38c73301631f" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/apis/7a2298c4-c905-403f-8fac-38c73301631f + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\r\n \"id\": \"7a2298c4-c905-403f-8fac-38c73301631f\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"context\": \"/pizzashack\",\r\n \"version\": \"1.0.0\",\r\n \"provider\": \"admin\",\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created.\\\"}}}},\\\"/menu\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Return a list of available menu items\\\",\\\"parameters\\\":[],\\\"responses\\\":{\\\"200\\\":{\\\"headers\\\":{},\\\"schema\\\":{\\\"title\\\":\\\"Menu\\\",\\\"properties\\\":{\\\"list\\\":{\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/MenuItem\\\"},\\\"type\\\":\\\"array\\\"}},\\\"type\\\":\\\"object\\\"},\\\"description\\\":\\\"OK.\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"MenuItem\\\":{\\\"title\\\":\\\"Pizza menu Item\\\",\\\"properties\\\":{\\\"price\\\":{\\\"type\\\":\\\"string\\\"},\\\"description\\\":{\\\"type\\\":\\\"string\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\"},\\\"image\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"name\\\"]},\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"status\": \"CREATED\",\r\n \"responseCaching\": \"Disabled\",\r\n \"cacheTimeout\": 300,\r\n \"destinationStatsEnabled\": null,\r\n \"isDefaultVersion\": false,\r\n \"type\": \"HTTP\",\r\n \"transport\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"tags\": [\"pizza\"],\r\n \"tiers\": [\"Unlimited\"],\r\n \"maxTps\": {\r\n \"sandbox\": 5000,\r\n \"production\": 1000\r\n },\r\n \"thumbnailUri\": null,\r\n \"visibility\": \"PUBLIC\",\r\n \"visibleRoles\": [],\\r\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"sandbox_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\r\n \"endpointSecurity\": {\r\n \"username\": \"user\",\r\n \"type\": \"basic\",\r\n \"password\": \"pass\"\r\n },\r\n \"gatewayEnvironments\": \"Production and Sandbox\",\r\n \"sequences\": [],\r\n \"subscriptionAvailability\": null,\r\n \"subscriptionAvailableTenants\": [],\r\n \"businessInformation\": {\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"technicalOwner\": \"John Doe\",\r\n \"businessOwner\": \"Jane Roe\"\r\n },\r\n \"corsConfiguration\": {\r\n \"accessControlAllowOrigins\": [\"*\"],\r\n \"accessControlAllowHeaders\": [\r\n \"authorization\",\r\n \"Access-Control-Allow-Origin\",\r\n \"Content-Type\",\r\n \"SOAPAction\"\r\n ],\r\n \"accessControlAllowMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"POST\",\r\n \"DELETE\",\r\n \"PATCH\",\r\n \"OPTIONS\"\r\n ],\r\n \"accessControlAllowCredentials\": false,\r\n \"corsConfigurationEnabled\": false\r\n }\r\n}" + summary: Get details of an API description: | - Get details of an API + Using this operation, you can retrieve complete details of a single API. You need to provide the Id of the API to retrive it. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - - APIs + - API (Individual) responses: 200: description: | @@ -240,19 +271,19 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests. + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string schema: $ref: '#/definitions/API' 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. @@ -271,12 +302,13 @@ paths: #----------------------------------------------------- put: x-scope: apim:api_create - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X PUT -d @data.json http://127.0.0.1:9763/api/am/publisher/v0.10/apis/6fb74674-4ab8-4b52-9886-f9a376985060" - x-wso2-request: "{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"2.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": false,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"verification\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"2.0.0\",\n \"description\": \"Use this API to verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"6fb74674-4ab8-4b52-9886-f9a376985060\",\n \"status\": \"CREATED\"\n}" - x-wso2-response: "HTTP/1.1 200 OK\nDate: Mon, 22 Feb 2016 13:31:35 GMT\nContent-Type: application/json\nTransfer-Encoding: chunked\nServer: WSO2 Carbon Server\n\n{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"2.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": false,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"verification\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"2.0.0\",\n \"description\": \"Use this API to verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"6fb74674-4ab8-4b52-9886-f9a376985060\",\n \"status\": \"CREATED\"\n}" - summary: Update an existing API + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X PUT -d @data.json https://localhost:9443/api/am/publisher/v0.12/apis/7a2298c4-c905-403f-8fac-38c73301631f" + x-wso2-request: "PUT https://localhost:9443/api/am/publisher/v0.12/apis/7a2298c4-c905-403f-8fac-38c73301631f\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\nContent-Type: application/json\n\n{\r\n \"id\": \"7a2298c4-c905-403f-8fac-38c73301631f\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"context\": \"/pizzashack\",\r\n \"version\": \"1.0.0\",\r\n \"provider\": \"admin\",\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created.\\\"}}}},\\\"/menu\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Return a list of available menu items\\\",\\\"parameters\\\":[],\\\"responses\\\":{\\\"200\\\":{\\\"headers\\\":{},\\\"schema\\\":{\\\"title\\\":\\\"Menu\\\",\\\"properties\\\":{\\\"list\\\":{\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/MenuItem\\\"},\\\"type\\\":\\\"array\\\"}},\\\"type\\\":\\\"object\\\"},\\\"description\\\":\\\"OK.\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"MenuItem\\\":{\\\"title\\\":\\\"Pizza menu Item\\\",\\\"properties\\\":{\\\"price\\\":{\\\"type\\\":\\\"string\\\"},\\\"description\\\":{\\\"type\\\":\\\"string\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\"},\\\"image\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"name\\\"]},\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"status\": \"CREATED\",\r\n \"responseCaching\": \"Disabled\",\r\n \"cacheTimeout\": 300,\r\n \"destinationStatsEnabled\": null,\r\n \"isDefaultVersion\": false,\r\n \"type\": \"HTTP\",\r\n \"transport\": [\r\n \"https\"\r\n ],\r\n \"tags\": [\"pizza\",\"chicken\"],\r\n \"tiers\": [\"Unlimited\"],\r\n \"maxTps\": {\r\n \"sandbox\": 500,\r\n \"production\": 100\r\n },\r\n \"thumbnailUri\": null,\r\n \"visibility\": \"PUBLIC\",\r\n \"visibleRoles\": [],\\r\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"sandbox_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\r\n \"endpointSecurity\": {\r\n \"username\": \"user\",\r\n \"type\": \"basic\",\r\n \"password\": \"pass\"\r\n },\r\n \"gatewayEnvironments\": \"Production and Sandbox\",\r\n \"sequences\": [{\"name\":\"json_validator\",\"type\": \"in\"},{\"name\":\"log_out_message\",\"type\": \"out\"}],\r\n \"subscriptionAvailability\": null,\r\n \"subscriptionAvailableTenants\": [],\r\n \"businessInformation\": {\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"technicalOwner\": \"John Doe\",\r\n \"businessOwner\": \"Jane Roe\"\r\n },\r\n \"corsConfiguration\": {\r\n \"accessControlAllowOrigins\": [\"*\"],\r\n \"accessControlAllowHeaders\": [\r\n \"authorization\",\r\n \"Access-Control-Allow-Origin\",\r\n \"Content-Type\",\r\n \"SOAPAction\"\r\n ],\r\n \"accessControlAllowMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"POST\",\r\n \"DELETE\",\r\n \"PATCH\",\r\n \"OPTIONS\"\r\n ],\r\n \"accessControlAllowCredentials\": false,\r\n \"corsConfigurationEnabled\": false\r\n }\r\n}" + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\r\n \"id\": \"7a2298c4-c905-403f-8fac-38c73301631f\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"context\": \"/pizzashack\",\r\n \"version\": \"1.0.0\",\r\n \"provider\": \"admin\",\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created.\\\"}}}},\\\"/menu\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Return a list of available menu items\\\",\\\"parameters\\\":[],\\\"responses\\\":{\\\"200\\\":{\\\"headers\\\":{},\\\"schema\\\":{\\\"title\\\":\\\"Menu\\\",\\\"properties\\\":{\\\"list\\\":{\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/MenuItem\\\"},\\\"type\\\":\\\"array\\\"}},\\\"type\\\":\\\"object\\\"},\\\"description\\\":\\\"OK.\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"MenuItem\\\":{\\\"title\\\":\\\"Pizza menu Item\\\",\\\"properties\\\":{\\\"price\\\":{\\\"type\\\":\\\"string\\\"},\\\"description\\\":{\\\"type\\\":\\\"string\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\"},\\\"image\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"name\\\"]},\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"status\": \"CREATED\",\r\n \"responseCaching\": \"Disabled\",\r\n \"cacheTimeout\": 300,\r\n \"destinationStatsEnabled\": null,\r\n \"isDefaultVersion\": false,\r\n \"type\": \"HTTP\",\r\n \"transport\": [\"https\"],\r\n \"tags\": [\r\n \"chicken\",\r\n \"pizza\"\r\n ],\r\n \"tiers\": [\"Unlimited\"],\r\n \"maxTps\": {\r\n \"sandbox\": 500,\r\n \"production\": 100\r\n },\r\n \"thumbnailUri\": null,\r\n \"visibility\": \"PUBLIC\",\r\n \"visibleRoles\": [],\\r\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"sandbox_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\r\n \"endpointSecurity\": {\r\n \"username\": \"user\",\r\n \"type\": \"basic\",\r\n \"password\": \"pass\"\r\n },\r\n \"gatewayEnvironments\": \"Production and Sandbox\",\r\n \"sequences\": [{\"name\":\"json_validator\",\"type\":\"in\",\"id\":\"142ece76-b208-4aab-b29a-f382045ed066\",\"shared\":false},{\"name\":\"log_out_message\",\"type\":\"out\",\"id\":\"b3527be8-95e6-41e0-8097-3276987b7d4b\",\"shared\":false}],\r\n \"subscriptionAvailability\": null,\r\n \"subscriptionAvailableTenants\": [],\r\n \"businessInformation\": {\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"technicalOwner\": \"John Doe\",\r\n \"businessOwner\": \"Jane Roe\"\r\n },\r\n \"corsConfiguration\": {\r\n \"accessControlAllowOrigins\": [\"*\"],\r\n \"accessControlAllowHeaders\": [\r\n \"authorization\",\r\n \"Access-Control-Allow-Origin\",\r\n \"Content-Type\",\r\n \"SOAPAction\"\r\n ],\r\n \"accessControlAllowMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"POST\",\r\n \"DELETE\",\r\n \"PATCH\",\r\n \"OPTIONS\"\r\n ],\r\n \"accessControlAllowCredentials\": false,\r\n \"corsConfigurationEnabled\": false\r\n }\r\n}" + summary: Update an API description: | - Update an existing API + This operation can be used to update an existing API. + But the properties `name`, `version`, `context`, `provider`, `state` will not be changed by this operation. parameters: - $ref: '#/parameters/apiId' - in: body @@ -290,7 +322,7 @@ paths: - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - APIs + - API (Individual) responses: 200: description: | @@ -309,12 +341,12 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional request. + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -346,17 +378,20 @@ paths: #----------------------------------------------------- delete: x-scope: apim:api_create - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X DELETE http://127.0.0.1:9763/api/am/publisher/v0.10/apis/6fb74674-4ab8-4b52-9886-f9a376985060" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE https://localhost:9443/api/am/publisher/v0.12/apis/6fb74674-4ab8-4b52-9886-f9a376985060" + x-wso2-request: | + DELETE https://localhost:9443/api/am/publisher/v0.12/apis/6fb74674-4ab8-4b52-9886-f9a376985060 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK" - summary: Delete API + summary: Delete an API description: | - Delete an existing API + This operation can be used to delete an existing API proving the Id of the API. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - APIs + - API (Individual) responses: 200: description: | @@ -391,18 +426,21 @@ paths: #----------------------------------------------------- get: x-scope: apim:api_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/swagger" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/swagger" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/swagger + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\nContent-Length: 329\n\n{\n \"paths\": {\"/*\": {\"get\": {\n \"x-auth-type\": \"Application\",\n \"x-throttling-tier\": \"Unlimited\",\n \"responses\": {\"200\": {\"description\": \"OK\"}}\n }}},\n \"x-wso2-security\": {\"apim\": {\"x-wso2-scopes\": []}},\n \"swagger\": \"2.0\",\n \"info\": {\n \"title\": \"PhoneVerification\",\n \"description\": \"Verify a phone number\",\n \"contact\": {\n \"email\": \"xx@ee.com\",\n \"name\": \"xx\"\n },\n \"version\": \"1.0.0\"\n }\n}" - summary: Get API Definition + summary: Get swagger definition description: | - Get the swagger of an API + This operation can be used to retrieve the swagger definition of an API. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - - APIs + - API (Individual) responses: 200: description: | @@ -415,17 +453,17 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests. + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. @@ -446,12 +484,22 @@ paths: consumes: - multipart/form-data x-scope: apim:api_create - x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -F apiDefinition=\"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\" -X PUT \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/swagger\"" - x-wso2-request: "{\n \"paths\": {\n \"\\/*\": {\n \"get\": {\n \"x-auth-type\": \"Application\",\n \"x-throttling-tier\": \"Unlimited\",\n \"responses\": {\n \"200\": {\n \"description\": \"OK\"\n }\n }\n }\n }\n },\n \"x-wso2-security\": {\n \"apim\": {\n \"x-wso2-scopes\": []\n }\n },\n \"swagger\": \"2.0\",\n \"info\": {\n \"title\": \"PhoneVerification\",\n \"description\": \"Verify a phone number\",\n \"contact\": {\n \"email\": \"xx@ee.com\",\n \"name\": \"xx\"\n },\n \"version\": \"1.0.0\"\n }\n}" + x-wso2-curl: "curl -k -H \"Authorization:Bearer 5311eca3-8ac8-354e-ab36-7e2fdd6a4013\" -F apiDefinition=\"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\" -X PUT \"https://localhost:9443/api/am/publisher/v0.12/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/swagger\"" + x-wso2-request: | + PUT https://localhost:9443/api/am/publisher/v0.12/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/swagger + Authorization:Bearer 5311eca3-8ac8-354e-ab36-7e2fdd6a4013 + Content-Length: 477 + Content-Type: multipart/form-data; boundary=------------------------4f51e636c0003d99 + + --------------------------4f51e636c0003d99 + Content-Disposition: form-data; name="apiDefinition" + + {"paths":{"\/*":{"get":{"x-auth-type":"Application","x-throttling-tier":"Unlimited","responses":{"200":{"description":"OK"}}}}},"x-wso2-security":{"apim":{"x-wso2-scopes":[]}},"swagger":"2.0","info":{"title":"PhoneVerification","description":"Verify a phone number","contact":{"email":"xx@ee.com","name":"xx"},"version":"1.0.0"}} + --------------------------4f51e636c0003d99-- x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"paths\": {\"/*\": {\"get\": {\n \"x-auth-type\": \"Application\",\n \"x-throttling-tier\": \"Unlimited\",\n \"responses\": {\"200\": {\"description\": \"OK\"}}\n }}},\n \"x-wso2-security\": {\"apim\": {\"x-wso2-scopes\": []}},\n \"swagger\": \"2.0\",\n \"info\": {\n \"title\": \"PhoneVerification\",\n \"description\": \"Verify a phone number\",\n \"contact\": {\n \"email\": \"xx@ee.com\",\n \"name\": \"xx\"\n },\n \"version\": \"1.0.0\"\n }\n}" - summary: Update API Definition + summary: Update swagger definition description: | - Update an existing swagger definition of an API + This operation can be used to update the swagger definition of an existing API. Swagger definition to be updated is passed as a form data parameter `apiDefinition`. parameters: - $ref: '#/parameters/apiId' - in: formData @@ -463,7 +511,7 @@ paths: - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - APIs + - API (Individual) responses: 200: description: | @@ -480,12 +528,12 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional request. + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -522,18 +570,21 @@ paths: #------------------------------------------------------------------------------------------------- get: x-scope: apim:api_view - x-wso2-curl: "curl -H \"Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail > image.jpg" + x-wso2-curl: "curl -k -H \"Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9\" https://localhost:9443/api/am/publisher/v0.12/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail > image.jpg" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail + Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9 x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: image/jpeg\r\n\r\n[image content]" - summary: Get the thumbnail image + summary: Get thumbnail image description: | - Downloads a thumbnail image of an API + This operation can be used to download a thumbnail image of an API. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - - APIs + - API (Individual) responses: 200: description: | @@ -547,17 +598,17 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. @@ -578,11 +629,24 @@ paths: consumes: - multipart/form-data x-scope: apim:api_create - x-wso2-curl: "curl -X POST -H \"Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9\" http://127.0.0.1:9763/api/am/publisher/v0.10/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail -F file=@image.jpg" - x-wso2-response: "HTTP/1.1 201 Created\r\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail\r\nContent-Type: application/json\r\n\r\n{\r\n \"relativePath\": \"/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail\",\r\n \"mediaType\": \"image/jpeg\"\r\n}" + x-wso2-curl: "curl -X POST -H \"Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9\" https://localhost:9443/api/am/publisher/v0.12/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail -F file=@image.jpg" + x-wso2-request: | + POST https://localhost:9443/api/am/publisher/v0.12/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/thumbnail + Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9 + Content-Type: multipart/form-data; boundary=------------------------5e542e0e5b50e1e4 + Content-Length: 18333 + + --------------------------5e542e0e5b50e1e4 + Content-Disposition: form-data; name="file"; filename="image.jpg" + Content-Type: image/jpeg + + [image content] + + --------------------------5e542e0e5b50e1e4-- + x-wso2-response: "HTTP/1.1 201 Created\r\nLocation: https://localhost:9443/api/am/publisher/v0.12/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/thumbnail\r\nContent-Type: application/json\r\n\r\n{\r\n \"relativePath\": \"/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/thumbnail\",\r\n \"mediaType\": \"image/jpeg\"\r\n}" summary: Upload a thumbnail image description: | - Upload a thumbnail image to an API. + This operation can be used to upload a thumbnail image of an API. The thumbnail to be uploaded should be given as a form data parameter `file`. parameters: - $ref: '#/parameters/apiId' - in: formData @@ -594,7 +658,7 @@ paths: - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - APIs + - API (Individual) responses: 200: description: | @@ -614,12 +678,12 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional request. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -650,11 +714,14 @@ paths: #----------------------------------------------------- post: x-scope: apim:api_create - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/copy-api?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&newVersion=2.0.0\"" - x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/6fb74674-4ab8-4b52-9886-f9a376985060\nContent-Type: application/json\n\n{\n \"sequences\": [],\n \"tiers\": [\n \"Bronze\",\n \"Gold\"\n ],\n \"thumbnailUrl\": null,\n \"visibility\": \"PUBLIC\",\n \"visibleRoles\": [],\n \"visibleTenants\": [],\n \"cacheTimeout\": 300,\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\" http://ws.cdyne.com/phoneverify/phoneverify.asmx\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\n \"subscriptionAvailability\": null,\n \"subscriptionAvailableTenants\": [],\n \"destinationStatsEnabled\": \"Disabled\",\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\/*\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"responses\\\":{\\\"200\\\":{\\\"description\\\":\\\"OK\\\"}}}}},\\\"x-wso2-security\\\":{\\\"apim\\\":{\\\"x-wso2-scopes\\\":[]}},\\\"swagger\\\":\\\"2.0\\\",\\\"info\\\":{\\\"title\\\":\\\"PhoneVerification\\\",\\\"description\\\":\\\"Verify a phone number\\\",\\\"contact\\\":{\\\"email\\\":\\\"xx@ee.com\\\",\\\"name\\\":\\\"xx\\\"},\\\"version\\\":\\\"2.0.0\\\"}}\",\n \"responseCaching\": \"Disabled\",\n \"isDefaultVersion\": true,\n \"gatewayEnvironments\": \"Production and Sandbox\",\n \"businessInformation\": {\n \"technicalOwner\": \"xx\",\n \"technicalOwnerEmail\": \"ggg@ww.com\",\n \"businessOwner\": \"xx\",\n \"businessOwnerEmail\": \"xx@ee.com\"\n },\n \"transport\": [\n \"http\",\n \"https\"\n ],\n \"tags\": [\n \"phone\",\n \"multimedia\",\n \"mobile\"\n ],\n \"provider\": \"admin\",\n \"version\": \"2.0.0\",\n \"description\": \"Verify a phone number\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify\",\n \"id\": \"6fb74674-4ab8-4b52-9886-f9a376985060\",\n \"status\": \"CREATED\"\n}" - summary: Copy API + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X POST \"https://localhost:9443/api/am/publisher/v0.12/apis/copy-api?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&newVersion=2.0.0\"" + x-wso2-request: | + POST https://localhost:9443/api/am/publisher/v0.12/apis/copy-api?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&newVersion=2.0.0 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/publisher/v0.12/apis/25a84fc9-38c0-4578-95e8-29fb6b1c4771\nContent-Type: application/json\n\n{\r\n \"id\": \"25a84fc9-38c0-4578-95e8-29fb6b1c4771\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"context\": \"/pizzashack\",\r\n \"version\": \"2.0.0\",\r\n \"provider\": \"admin\",\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"\\\\/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#\\\\/definitions\\\\/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"schema\\\":{\\\"$ref\\\":\\\"#\\\\/definitions\\\\/Order\\\"},\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"}},\\\"description\\\":\\\"Created.\\\"}}}},\\\"\\\\/menu\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Return a list of available menu items\\\",\\\"parameters\\\":[],\\\"responses\\\":{\\\"200\\\":{\\\"schema\\\":{\\\"title\\\":\\\"Menu\\\",\\\"properties\\\":{\\\"list\\\":{\\\"items\\\":{\\\"$ref\\\":\\\"#\\\\/definitions\\\\/MenuItem\\\"},\\\"type\\\":\\\"array\\\"}},\\\"type\\\":\\\"object\\\"},\\\"headers\\\":{},\\\"description\\\":\\\"OK.\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application\\\\/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"MenuItem\\\":{\\\"title\\\":\\\"Pizza menu Item\\\",\\\"properties\\\":{\\\"price\\\":{\\\"type\\\":\\\"string\\\"},\\\"description\\\":{\\\"type\\\":\\\"string\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\"},\\\"image\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"name\\\"]},\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application\\\\/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http:\\\\/\\\\/www.apache.org\\\\/licenses\\\\/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http:\\\\/\\\\/www.pizzashack.com\\\"},\\\"version\\\":\\\"2.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"status\": \"CREATED\",\r\n \"responseCaching\": \"Disabled\",\r\n \"cacheTimeout\": 300,\r\n \"destinationStatsEnabled\": null,\r\n \"isDefaultVersion\": false,\r\n \"type\": \"HTTP\",\r\n \"transport\": [\"https\"],\r\n \"tags\": [\r\n \"chicken\",\r\n \"pizza\"\r\n ],\r\n \"tiers\": [\"Unlimited\"],\r\n \"maxTps\": {\r\n \"sandbox\": 500,\r\n \"production\": 100\r\n },\r\n \"thumbnailUri\": null,\r\n \"visibility\": \"PUBLIC\",\r\n \"visibleRoles\": [],\\r\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"sandbox_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\r\n \"endpointSecurity\": {\r\n \"username\": \"user\",\r\n \"type\": \"basic\",\r\n \"password\": \"pass\"\r\n },\r\n \"gatewayEnvironments\": \"Production and Sandbox\",\r\n \"sequences\": [],\r\n \"subscriptionAvailability\": null,\r\n \"subscriptionAvailableTenants\": [],\r\n \"businessInformation\": {\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"technicalOwner\": \"John Doe\",\r\n \"businessOwner\": \"Jane Roe\"\r\n },\r\n \"corsConfiguration\": {\r\n \"accessControlAllowOrigins\": [\"*\"],\r\n \"accessControlAllowHeaders\": [\r\n \"authorization\",\r\n \"Access-Control-Allow-Origin\",\r\n \"Content-Type\",\r\n \"SOAPAction\"\r\n ],\r\n \"accessControlAllowMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"POST\",\r\n \"DELETE\",\r\n \"PATCH\",\r\n \"OPTIONS\"\r\n ],\r\n \"accessControlAllowCredentials\": false,\r\n \"corsConfigurationEnabled\": false\r\n }\r\n}" + summary: Create a new API version description: | - Create a new API by copying an existing API + This operation can be used to create a new version of an existing API. The new version is specified as `newVersion` query parameter. New API will be in `CREATED` state. parameters: - name: newVersion description: Version of the new API. @@ -663,7 +730,7 @@ paths: required: true - $ref: '#/parameters/apiId-Q' tags: - - APIs + - API (Individual) responses: 201: description: | @@ -684,6 +751,9 @@ paths: description: | Not Found. API to copy does not exist. + 401: + description: | + Unauthenticated request. schema: $ref: '#/definitions/Error' @@ -697,11 +767,18 @@ paths: #----------------------------------------------------- post: x-scope: apim:api_publish - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X POST \"https://localhost:9443/api/am/publisher/v0.12/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish\"" + x-wso2-request: | + POST https://localhost:9443/api/am/publisher/v0.12/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK" summary: Change API Status description: | - Change the lifecycle of an API + This operation is used to change the lifecycle of an API. Eg: Publish an API which is in `CREATED` state. In order to change the lifecycle, we need to provide the lifecycle `action` as a query parameter. + + For example, to Publish an API, `action` should be `Publish`. Note that the `Re-publish` action is available only after calling `Block`. + + Some actions supports providing additional paramters which should be provided as `lifecycleChecklist` parameter. Please see parameters table for more information. parameters: - name: action description: | @@ -724,23 +801,23 @@ paths: - name: lifecycleChecklist description: | - You can specify additional checklist items by using an **"attribute:"** modifier. - - Eg: "Deprecate Old Versions:true" will deprecate older versions of a particular API when it is promoted to - Published state from Created state. Multiple checklist items can be given in "attribute1:true, attribute2:false" - format. - Supported checklist items are as follows. 1. **Deprecate Old Versions**: Setting this to true will deprecate older versions of a particular API when it is promoted to Published state from Created state. 2. **Require Re-Subscription**: If you set this to true, users need to re subscribe to the API although they may have subscribed to an older version. + You can specify additional checklist items by using an **"attribute:"** modifier. + + Eg: "Deprecate Old Versions:true" will deprecate older versions of a particular API when it is promoted to Published state from Created state. Multiple checklist items can be given in "attribute1:true, attribute2:false" format. + + **Sample CURL :** curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X POST "https://localhost:9443/api/am/publisher/v0.12/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish&lifecycleChecklist=Deprecate Old Versions:true,Require Re-Subscription:true" + type: string in: query - $ref: '#/parameters/apiId-Q' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - APIs + - API (Individual) responses: 200: description: | @@ -749,12 +826,12 @@ paths: headers: ETag: description: | - Entity Tag of the changed API. Used by caches, or in conditional request. + Entity Tag of the changed API. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the API lifecycle has been modified the last time. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -785,11 +862,14 @@ paths: #----------------------------------------------------- get: x-scope: apim:api_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents\"" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n },\n {\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"URL\",\n \"sourceUrl\": \"http://wiki.cdyne.com/index.php/Phone_Verification\",\n \"otherTypeName\": null,\n \"documentId\": \"4145df31-04f1-440c-8d08-68952874622c\",\n \"summary\": \"This is the URL for online documentation\",\n \"name\": \"Online Documentation\",\n \"type\": \"SAMPLES\"\n }\n ],\n \"next\": \"\",\n \"count\": 2\n}" - summary: Get API Documents + summary: Get a list of documents of an API description: | - Get a list of documents belonging to an API. + This operation can be used to retrive a list of documents belonging to an API by providing the id of the API. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/limit' @@ -797,7 +877,7 @@ paths: - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' tags: - - API Document + - Document (Collection) responses: 200: description: | @@ -812,12 +892,12 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests. + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. @@ -836,12 +916,12 @@ paths: #----------------------------------------------------- post: x-scope: apim:api_create - x-wso2-curl: "curl -H \"Authorization: Bearer cdcc8cf6016ed10620edf3a1d3c5ef2b\" -H \"Content-Type: application/json\" -X POST -d @data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents\"" - x-wso2-request: "{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"summary\": \"This is a sample documentation\",\n \"name\": \"Introduction to PhoneVerification API\",\n \"type\": \"HOWTO\"\n}" - x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058\",\n \"summary\": \"This is a sample documentation\",\n \"name\": \"Introduction to PhoneVerification API\",\n \"type\": \"HOWTO\"\n}" - summary: Add a new document + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/publisher/v0.12/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents\"" + x-wso2-request: "POST https://localhost:9443/api/am/publisher/v0.12/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"summary\": \"This is a sample documentation\",\n \"name\": \"Introduction to PhoneVerification API\",\n \"type\": \"HOWTO\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058\",\n \"summary\": \"This is a sample documentation\",\n \"name\": \"Introduction to PhoneVerification API\",\n \"type\": \"HOWTO\"\n}" + summary: Add a new document to an API description: | - Add a new document to an API + This operation can be used to add a new documentation to an API. This operation only adds the metadata of a document. To add the actual content we need to use **Upload the content of an API document ** API once we obtain a document Id by this operation. parameters: - $ref: '#/parameters/apiId' - in: body @@ -853,7 +933,7 @@ paths: $ref: '#/definitions/Document' - $ref: '#/parameters/Content-Type' tags: - - API Document + - Document (Collection) responses: 201: description: | @@ -874,7 +954,7 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional request. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -897,11 +977,14 @@ paths: #----------------------------------------------------- get: x-scope: apim:api_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\"" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" - summary: Get an API Document + summary: Get a document of an API description: | - Get a particular document associated with an API. + This operation can be used to retrieve a particular document's metadata associated with an API. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/documentId' @@ -909,7 +992,7 @@ paths: - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - - API Document + - Document (Individual) responses: 200: description: | @@ -925,17 +1008,17 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. @@ -954,12 +1037,12 @@ paths: #----------------------------------------------------- put: x-scope: apim:api_create - x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X PUT -d data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\"" - x-wso2-request: "{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" + x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X PUT -d data.json \"https://localhost:9443/api/am/publisher/v0.12/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\"" + x-wso2-request: "PUT https://localhost:9443/api/am/publisher/v0.12/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\nAuthorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" - summary: Update an API Document + summary: Update a document of an API description: | - Update document details. + This operation can be used to update metadata of an API's document. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/documentId' @@ -974,7 +1057,7 @@ paths: - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - API Document + - Document (Individual) responses: 200: description: | @@ -994,12 +1077,12 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional request. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -1025,18 +1108,21 @@ paths: #----------------------------------------------------- delete: x-scope: apim:api_create - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X DELETE http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058" + x-wso2-request: | + DELETE https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK" - summary: Delete an API Document + summary: Delete a document of an API description: | - Delete a document of an API + This operation can be used to delete a document associated with an API. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/documentId' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - API Document + - Document (Individual) responses: 200: description: | @@ -1066,11 +1152,25 @@ paths: #------------------------------------------------------------------------------------------------- get: x-scope: apim:api_view - x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content\" > sample.pdf" + x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content\" > sample.pdf" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content + Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a x-wso2-response: "HTTP/1.1 200 OK\nContent-Disposition: attachment; filename=\"sample.pdf\"\nContent-Type: application/octet-stream\nContent-Length: 7802\n\n%PDF-1.4\n%äüöß\n2 0 obj\n<>\nstream\n..\n>>\nstartxref\n7279\n%%EOF" - summary: Get document content + summary: Get the content of an API document description: | - Downloads a FILE type document/get the inline content or source url of a certain document. + This operation can be used to retrive the content of an API's document. + + The document can be of 3 types. In each cases responses are different. + + 1. **Inline type**: + The content of the document will be retrieved in `text/plain` content type + + _Sample cURL_ : `curl -k -H "Authorization:Bearer 579f0af4-37be-35c7-81a4-f1f1e9ee7c51" -F inlineContent=@"docs.txt" -X POST "https://localhost:9443/api/am/publisher/v0.12/apis/995a4972-3178-4b17-a374-756e0e19127c/documents/43c2bcce-60e7-405f-bc36-e39c0c5e189e/content` + 2. **FILE type**: + The file will be downloaded with the related content type (eg. `application/pdf`) + 3. **URL type**: + The client will recieve the URL of the document as the Location header with the response with - `303 See Other` parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/documentId' @@ -1078,7 +1178,7 @@ paths: - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - - API Document + - Document (Individual) responses: 200: description: | @@ -1092,12 +1192,12 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 303: description: | @@ -1111,7 +1211,7 @@ paths: 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. @@ -1132,16 +1232,29 @@ paths: consumes: - multipart/form-data x-scope: apim:api_create - x-wso2-curl: "curl -k -H \"Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -F file=@\"sample.pdf\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content\"" - x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content\nContent-Type: application/json\n\n{\n \"visibility\":\"API_LEVEL\",\n \"sourceType\":\"FILE\",\n \"sourceUrl\":null,\n \"otherTypeName\":null,\n \"documentId\":\"daf732d3-bda2-46da-b381-2c39d901ea61\",\n \"summary\":\"This is a sample documentation pdf\",\n \"name\":\"Introduction to PhoneVerification API PDF\",\n \"type\":\"HOWTO\"\n}" - summary: Update API document content. + x-wso2-curl: "curl -k -H \"Authorization:Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -F file=@\"sample.pdf\" -X POST \"https://localhost:9443/api/am/publisher/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content\"" + x-wso2-request: | + POST https://localhost:9443/api/am/publisher/v0.12/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/documents/b3a79270-02bb-4e39-9ac1-90ce8f6c84af/content + Authorization:Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + Content-Length: 8004 + Content-Type: multipart/form-data; boundary=------------------------7b9a53f1ffa452b9 + + --------------------------7b9a53f1ffa452b9 + Content-Disposition: form-data; name="file"; filename="sample.pdf" + Content-Type: application/octet-stream + + [file content] + + --------------------------7b9a53f1ffa452b9-- + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/publisher/v0.12/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/documents/b3a79270-02bb-4e39-9ac1-90ce8f6c84af/content\nContent-Type: application/json\n\n{\n \"visibility\":\"API_LEVEL\",\n \"sourceType\":\"FILE\",\n \"sourceUrl\":null,\n \"otherTypeName\":null,\n \"documentId\":\"daf732d3-bda2-46da-b381-2c39d901ea61\",\n \"summary\":\"This is a sample documentation pdf\",\n \"name\":\"Introduction to PhoneVerification API PDF\",\n \"type\":\"HOWTO\"\n}" + summary: Upload the content of an API document description: | - Upload a file to a document or add inline content to the document. + Thid operation can be used to upload a file or add inline content to an API document. - Document's source type should be **FILE** in order to upload a file to the document using **file** parameter. - Document's source type should be **INLINE** in order to add inline content to the document using **inlineContent** parameter. - - Only one of **file** or **inlineContent** can be specified at one time. + **IMPORTANT:** + * Either **file** or **inlineContent** form data parameters should be specified at one time. + * Document's source type should be **FILE** in order to upload a file to the document using **file** parameter. + * Document's source type should be **INLINE** in order to add inline content to the document using **inlineContent** parameter. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/documentId' @@ -1159,7 +1272,7 @@ paths: - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - API Document + - Document (Individual) responses: 200: description: | @@ -1179,12 +1292,137 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional request. + Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + + ##pp +###################################################### +# The "specific mediation policy" resource APIs +###################################################### + '/apis/{apiId}/policies/mediation': + + #----------------------------------------------------------------------------------------- + # Retrieving the list of all API specific mediation sequences under a given search condition + #----------------------------------------------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -k -H \"Authorization: Bearer fb2a0784-f60c-3276-8fde-5b0f70e61ecc\" https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation" + x-wso2-request: "GET https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation\r\nAuthorization: Bearer fb2a0784-f60c-3276-8fde-5b0f70e61ecc" + x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n\r\n{\r\n \"count\": 1,\r\n \"next\": null,\r\n \"previous\": null,\r\n \"list\": [ {\r\n \"name\": \"add_custom_header_fault\",\r\n \"id\": \"6460d7e6-4272-4e3a-9879-437228d83123\",\r\n \"type\": \"fault\"\r\n }]\r\n}" + summary: | + Get all mediation policies of an API + description: | + This operation provides you a list of available mediation policies of an API. + parameters: + - $ref: '#/parameters/apiId' + - $ref : '#/parameters/limit' + - $ref : '#/parameters/offset' + - name : query + in: query + description: "-Not supported yet-" + type: string + - $ref : "#/parameters/Accept" + - $ref : "#/parameters/If-None-Match" + tags: + - Mediation Policy (Collection) + responses: + 200: + description: | + OK. + List of qualifying APIs is returned. + schema: + $ref: '#/definitions/mediationList' + headers: + Content-Type: + description: The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#---------------------------------------------------------------------------- +# Upload an API specific mediation policy +#---------------------------------------------------------------------------- + post: + x-scope: apim:api_create + x-wso2-curl: "curl -k -H \"Authorization: Bearer 6cea3696-0151-3282-bf79-a0c4db6f308a\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation\"" + x-wso2-request: "POST https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation\r\nContent-Type: application/json\r\nAuthorization: Bearer 6cea3696-0151-3282-bf79-a0c4db6f308a\r\n\r\n{\r\n \"name\": \"add_custom_header_fault\",\r\n \"type\": \"fault\",\r\n \"config\": \"\\n \\n<\\/sequence>\\n\"\r\n}" + x-wso2-response: "HTTP/1.1 201 Created\r\nLocation: https://localhost:9443/api/am/publisher/v0.12/registry/resource/_system/governance/apimgt/applicationdata/provider/admin/hello/1.0.0/fault/add_custom_header_fault.xml\r\nContent-Type: application/json\r\n\r\n{ \r\n \"id\":\"624b9f7d-bfaf-484b-94cc-e84491f5d725\",\r\n \"name\":\"add_custom_header_fault\",\r\n \"type\":\"fault\",\r\n \"config\":\"\\n \\n\\n\"\r\n}" + summary: Add an API specific mediation policy + description: | + This operation can be used to add an API specifc mediation policy. + parameters: + - in: body + name: body + description: mediation policy to upload + required: true + schema: + $ref: '#/definitions/Mediation' + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Mediation Policy (Collection) + responses: + 200: + description: | + OK. + mediation policy uploaded + schema: + $ref : '#/definitions/Mediation' + headers: + Location: + description: | + The URL of the uploaded thumbnail image of the API. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -1205,6 +1443,324 @@ paths: schema: $ref: '#/definitions/Error' +###################################################### +# The "Individual API specific mediation sequence" resource +###################################################### + /apis/{apiId}/policies/mediation/{mediationPolicyId}: + +#----------------------------------------------------- +# Retrieve a particular API specific mediation squence +#----------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -k -H \"Authorization: Bearer 5aa0acc0-0ce3-3a0b-8cc8-db5ef696ee23\" https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/624b9f7d-bfaf-484b-94cc-e84491f5d725" + x-wso2-request: "GET https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/624b9f7d-bfaf-484b-94cc-e84491f5d725\r\nAuthorization: Bearer 5aa0acc0-0ce3-3a0b-8cc8-db5ef696ee23" + x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n\r\n{\r\n \"id\": \"624b9f7d-bfaf-484b-94cc-e84491f5d725\",\r\n \"name\": \"add_custom_header_fault\",\r\n \"type\": \"fault\",\r\n \"config\": \"\\n \\n<\\/sequence>\\n\"\r\n}" + summary: Get an API specific mediation policy + description: | + This operation can be used to retrieve a particular API specific mediation policy. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/mediationPolicyId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Mediation Policy (Individual) + responses: + 200: + description: | + OK. + Mediation policy returned. + schema: + $ref: '#/definitions/Mediation' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. + Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested Document does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Delete the mediation policy +#----------------------------------------------------- + delete: + x-scope: apim:api_create + x-wso2-curl: "curl -k -H \"Authorization: Bearer fb2a0784-f60c-3276-8fde-5b0f70e61ecc\" -X DELETE https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/60f5146d-1774-405d-86b3-9b040ac266d5" + x-wso2-request: "DELETE https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/60f5146d-1774-405d-86b3-9b040ac266d5\r\nAuthorization: Bearer fb2a0784-f60c-3276-8fde-5b0f70e61ecc" + x-wso2-response: "HTTP/1.1 200 OK" + summary: Delete an API specific mediation policy + description: | + This operation can be used to delete an existing API specific mediation policy providing the Id of the API and the Id of the mediation policy. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/mediationPolicyId' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Mediation Policy (Individual) + responses: + 200: + description: | + OK. + Resource successfully deleted. + 403: + description: | + Forbidden. + The request must be conditional but no condition has been specified. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + Resource to be deleted does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Update the a mediation policy +#----------------------------------------------------- + put: + x-scope: apim:api_create + x-wso2-curl: "curl -k -H \"Authorization: Bearer 9e41fae2-3ada-3dd1-8f12-2077202f4285\" -H \"Content-Type: application/json\" -X PUT -d @data.json https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/820fdcf7-7258-42b5-809e-674b893644d1" + x-wso2-request: "PUT https://localhost:9443/api/am/publisher/v0.12/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/820fdcf7-7258-42b5-809e-674b893644d1\r\nContent-Type: application/json\r\nAuthorization: Bearer 9e41fae2-3ada-3dd1-8f12-2077202f4285\r\n\r\n{\r\n \"name\": \"add_custom_header_fault\",\r\n \"type\": \"fault\",\r\n \"config\": \"\\n \\n<\\/sequence>\\n\"\r\n}" + x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n\r\n{\r\n \"id\": \"a7365481-5b3f-463c-a646-a498895ac210\",\r\n \"name\": \"add_custom_header_fault\",\r\n \"type\": \"fault\",\r\n \"config\": \"\\n \\n<\\/sequence>\\n\"\r\n}" + summary: Update an API specific mediation policy + description: | + This operation can be used to update an existing mediation policy of an API. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/mediationPolicyId' + - in: body + name: body + description: | + Mediation policy object that needs to be updated + required: true + schema: + $ref: '#/definitions/Mediation' + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Mediation Policy (Individual) + responses: + 200: + description: | + OK. + Successful response with updated API object + schema: + $ref: '#/definitions/Mediation' + headers: + Location: + description: | + The URL of the newly created resource. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 403: + description: | + Forbidden. + The request must be conditional but no condition has been specified. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The wsdl Resource +###################################################### + /apis/{apiId}/wsdl: + +#----------------------------------------------------- +# Retrieve the details about a certain wsdl +#----------------------------------------------------- + get: + x-scope: apim:api_view + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/publisher/v0.12/apis/7f82f6b0-2667-441e-af23-c0fc44cf3a17/wsdl\"" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/apis/7f82f6b0-2667-441e-af23-c0fc44cf3a17/wsdl + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n\r\n{\r\n \"name\": \"admin--hello1.0.0.wsdl\",\r\n \"wsdlDefinition\": \"\\n \\n \\n <\\/part>\\n <\\/message>\\n \\n \\n <\\/part>\\n <\\/message>\\n \\n \\n \\n <\\/input>\\n \\n <\\/output>\\n <\\/operation>\\n <\\/portType>\\n \\n \\n \\n \\n \\n \\n <\\/input>\\n \\n \\n <\\/output>\\n <\\/operation>\\n <\\/binding>\\n \\nWSDL File for HelloService<\\/documentation>\\n \\n \\n <\\/port>\\n <\\/service>\\n<\\/definitions>\"\r\n}" + summary: Get the WSDL of an API + description: | + This operation can be used to retrieve the WSDL definition of an API. + parameters: + - $ref: '#/parameters/apiId' + - $ref: '#/parameters/Accept' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Wsdl (Individual) + responses: + 200: + description: | + OK. + Requested WSDL DTO object belongs to the API + schema: + $ref: '#/definitions/Wsdl' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 404: + description: | + Not Found. + Requested API does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' +#----------------------------------------------------- +# Add a wsdl to the registry +#----------------------------------------------------- + post: + x-scope: apim:api_create + x-wso2-curl: "curl -k -H \"Authorization:Bearer 5311eca3-8ac8-354e-ab36-7e2fdd6a4013\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/publisher/v0.12/apis/af3f96da-9ccf-463f-8cee-13ec8530a9cd/wsdl\"" + x-wso2-request: "POST https://localhost:9443/api/am/publisher/v0.12/apis/af3f96da-9ccf-463f-8cee-13ec8530a9cd/wsdl\r\nContent-Type: application/json\r\nAuthorization: Bearer 7d237cab-7011-3f81-b384-24d03e750873\r\n\r\n{\r\n \"name\": \"admin--PizzaShackAPI1.0.0.wsdl\",\r\n \"wsdlDefinition\": \"\\n \\n \\n <\\/part>\\n <\\/message>\\n \\n \\n <\\/part>\\n <\\/message>\\n \\n \\n \\n <\\/input>\\n \\n <\\/output>\\n <\\/operation>\\n <\\/portType>\\n \\n \\n \\n \\n \\n \\n <\\/input>\\n \\n \\n <\\/output>\\n <\\/operation>\\n <\\/binding>\\n \\nWSDL File for HelloService<\\/documentation>\\n \\n \\n <\\/port>\\n <\\/service>\\n<\\/definitions>\"\r\n}" + x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n\r\n{\r\n \"name\": \"admin--PizzaShackAPI1.0.0.wsdl\",\r\n \"wsdlDefinition\": \"\\n \\n \\n <\\/part>\\n <\\/message>\\n \\n \\n <\\/part>\\n <\\/message>\\n \\n \\n \\n <\\/input>\\n \\n <\\/output>\\n <\\/operation>\\n <\\/portType>\\n \\n \\n \\n \\n \\n \\n <\\/input>\\n \\n \\n <\\/output>\\n <\\/operation>\\n <\\/binding>\\n \\nWSDL File for HelloService<\\/documentation>\\n \\n \\n <\\/port>\\n <\\/service>\\n<\\/definitions>\"\r\n}" + summary: Add a WSDL to an API + description: | + This operation can be used to add a WSDL definition to an existing API. + parameters: + - $ref: '#/parameters/apiId' + - in: body + name: body + description: | + JSON payload including WSDL definition that needs to be added + required: true + schema: + $ref: '#/definitions/Wsdl' + - $ref: '#/parameters/Content-Type' + - $ref: '#/parameters/If-Match' + - $ref: '#/parameters/If-Unmodified-Since' + tags: + - Wsdl (Individual) + responses: + 200: + description: | + OK. + Successful response with updated wsdl definition + headers: + Location: + description: | + The URL of the newly created resource. + type: string + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional requests (Will be supported in future). + type: string + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 403: + description: | + Forbidden. + The request must be conditional but no condition has been specified. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + + ###################################################### # The "Individual Application" resource APIs ###################################################### @@ -1215,18 +1771,21 @@ paths: #----------------------------------------------------- get: x-scope: apim:api_create - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/applications/896658a0-b4ee-4535-bbfa-806c894a4015" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://localhost:9443/api/am/publisher/v0.12/applications/896658a0-b4ee-4535-bbfa-806c894a4015" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/applications/896658a0-b4ee-4535-bbfa-806c894a4015 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"groupId\": \"\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"description\": null,\n \"name\": \"DefaultApplication\"\n}" - summary: Get Application + summary: Get details of an application description: | - Get application details + This operation can be used to retrieve details of an individual application specifying the application id in the URI. parameters: - $ref: '#/parameters/applicationId' - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - - Applications + - Application (Individual) responses: 200: description: | @@ -1241,17 +1800,17 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests. + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. @@ -1275,13 +1834,20 @@ paths: #----------------------------------------------------- get: x-scope: apim:subscription_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/subscriptions?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/publisher/v0.12/subscriptions?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b\"" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/subscriptions?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n \n{\n \"previous\": \"\",\n \"list\": [\n {\n \"subscriptionId\": \"64eca60b-2e55-4c38-8603-e9e6bad7d809\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"UNBLOCKED\"\n },\n {\n \"subscriptionId\": \"7ac22c34-8745-4cfe-91e0-262c50b2f2e3\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"367a2361-8db5-4140-8133-c6c8dc7fa0c4\",\n \"status\": \"UNBLOCKED\"\n }\n ],\n \"next\": \"\",\n \"count\": 2\n}" - summary: Get All Subscriptions + summary: Get all Subscriptions description: | - Get subscription list. - The API Identifier and corresponding Application Identifier - the subscriptions of which are to be returned are passed as parameters. + This operation can be used to retrieve a list of subscriptions of the user associated with the provided access token. This operation is capable of + + 1. Retrieving all subscriptions for the user's APIs. + `GET https://localhost:9443/api/am/publisher/v0.12/subscriptions` + + 2. Retrieving subscriptions for a specific API. + `GET https://localhost:9443/api/am/publisher/v0.12/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed` parameters: - $ref: '#/parameters/apiId-Q' - $ref: '#/parameters/limit' @@ -1289,7 +1855,7 @@ paths: - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' tags: - - Subscriptions + - Subscription (Collection) responses: 200: description: | @@ -1305,12 +1871,12 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 406: description: | Not Acceptable. The requested media type is not supported @@ -1327,39 +1893,42 @@ paths: #----------------------------------------------------- get: x-scope: apim:subscription_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/subscriptions/64eca60b-2e55-4c38-8603-e9e6bad7d809" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://localhost:9443/api/am/publisher/v0.12/subscriptions/64eca60b-2e55-4c38-8603-e9e6bad7d809" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/subscriptions/64eca60b-2e55-4c38-8603-e9e6bad7d809 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"subscriptionId\": \"64eca60b-2e55-4c38-8603-e9e6bad7d809\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"UNBLOCKED\"\n}" - summary: Get a Subscription + summary: Get details of a subscription description: | - Get subscription details + This operation can be used to get details of a single subscription. parameters: - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - - Subscriptions + - Subscription (Individual) responses: 200: description: | OK. Subscription returned schema: - $ref: '#/definitions/Subscription' + $ref: '#/definitions/ExtendedSubscription' headers: Content-Type: description: The content type of the body. type: string ETag: - description: 'Entity Tag of the response resource. Used by caches, or in conditional requests.' + description: 'Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future).' type: string Last-Modified: - description: 'Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests.' + description: 'Date and time the resource has been modifed the last time. Used by caches, or in conditional requests (Will be supported in future).' type: string '304': description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). '404': description: | Not Found. @@ -1377,9 +1946,17 @@ paths: #----------------------------------------------------- post: x-scope: apim:subscription_block - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/subscriptions/block-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809&blockState=PROD_ONLY_BLOCKED\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X POST \"https://localhost:9443/api/am/publisher/v0.12/subscriptions/block-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809&blockState=PROD_ONLY_BLOCKED\"" + x-wso2-request: | + POST https://localhost:9443/api/am/publisher/v0.12/subscriptions/block-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809&blockState=PROD_ONLY_BLOCKED + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n \n{\n \"subscriptionId\": \"64eca60b-2e55-4c38-8603-e9e6bad7d809\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"PROD_ONLY_BLOCKED\"\n}" summary: Block a subscription + description: | + This operation can be used to block a subscription. Along with the request, `blockState` must be specified as a query parameter. + + 1. `BLOCKED` : Subscription is completely blocked for both Production and Sandbox environments. + 2. `PROD_ONLY_BLOCKED` : Subscription is blocked for Production environment only. parameters: - $ref: '#/parameters/subscriptionId-Q' - name: blockState @@ -1393,10 +1970,8 @@ paths: - PROD_ONLY_BLOCKED - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' - description: | - Block a subscription. tags: - - Subscriptions + - Subscription (Individual) responses: 200: description: | @@ -1406,12 +1981,12 @@ paths: ETag: description: | Entity Tag of the blocked subscription. - Used by caches, or in conditional request. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the subscription has been blocked. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -1442,7 +2017,10 @@ paths: #----------------------------------------------------- post: x-scope: apim:subscription_block - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/subscriptions/unblock-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X POST \"https://localhost:9443/api/am/publisher/v0.12/subscriptions/unblock-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809\"" + x-wso2-request: | + POST https://localhost:9443/api/am/publisher/v0.12/subscriptions/unblock-subscription?subscriptionId=64eca60b-2e55-4c38-8603-e9e6bad7d809 + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8` x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"subscriptionId\": \"64eca60b-2e55-4c38-8603-e9e6bad7d809\",\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"admin-PhoneVerification-1.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"UNBLOCKED\"\n} " summary: Unblock a Subscription parameters: @@ -1450,9 +2028,9 @@ paths: - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' description: | - Unblock a subscription. + This operation can be used to unblock a subscription specifying the subscription Id. The subscription will be fully unblocked after performing this operation. tags: - - Subscriptions + - Subscription (Individual) responses: 200: description: | @@ -1462,12 +2040,12 @@ paths: ETag: description: | Entity Tag of the unblocked subscription. - Used by caches, or in conditional request. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the subscription has been unblocked. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -1498,11 +2076,14 @@ paths: #----------------------------------------------------- get: x-scope: apim:tier_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://localhost:9443/api/am/publisher/v0.12/tiers/api" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/tiers/api + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 1,\n \"description\": \"Allows 1 request(s) per minute.\",\n \"name\": \"Bronze\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 20,\n \"description\": \"Allows 20 request(s) per minute.\",\n \"name\": \"Gold\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Silver\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 0,\n \"tierPlan\": null,\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 0,\n \"description\": \"Allows unlimited requests\",\n \"name\": \"Unlimited\",\n \"attributes\": {}\n }\n ],\n \"next\": \"\",\n \"count\": 4\n}" - summary: List Tiers + summary: Get all tiers description: | - Get available tiers + This operation can be used to list the available tiers for a given tier level. Tier level should be specified as a path parameter and should be one of `api`, `application` and `resource`. parameters: - $ref: '#/parameters/limit' - $ref: '#/parameters/offset' @@ -1510,7 +2091,7 @@ paths: - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' tags: - - Tiers + - Throttling Tier (Collection) responses: 200: description: | @@ -1525,12 +2106,12 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 406: description: | Not Acceptable. @@ -1543,12 +2124,16 @@ paths: #----------------------------------------------------- post: x-scope: apim:tier_manage - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X POST -d @data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api\"" - x-wso2-request: "{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"a\":10,\n \"b\":30\n }\n}" - x-wso2-response: "HTTP/1.1 201 Created\nLocation: http://localhost:9763/api/am/publisher/v0.10/tiers/Low\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"b\": \"30\",\n \"a\": \"10\"\n }\n}" - summary: Add a new Tier + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/publisher/v0.12/tiers/api\"" + x-wso2-request: "POST https://localhost:9443/api/am/publisher/v0.12/tiers/api\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"a\":10,\n \"b\":30\n }\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/publisher/v0.12/tiers/Low\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"b\": \"30\",\n \"a\": \"10\"\n }\n}" + summary: Create a Tier description: | - Add a new tier + This operation can be used to create a new throttling tier. The only supported tier level is `api` tiers. + `POST https://localhost:9443/api/am/publisher/v0.12/tiers/api` + + **IMPORTANT:** + * This is only effective when Advanced Throttling is disabled in the Server. If enabled, we need to use Admin REST API for throttling tiers modification related operations. parameters: - in: body name: body @@ -1557,10 +2142,10 @@ paths: required: true schema: $ref: '#/definitions/Tier' - - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/tierLevel-A' - $ref: '#/parameters/Content-Type' tags: - - Tiers + - Throttling Tier (Collection) responses: 201: description: | @@ -1604,11 +2189,16 @@ paths: #----------------------------------------------------- get: x-scope: apim:tier_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api/Bronze" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://localhost:9443/api/am/publisher/v0.12/tiers/api/Bronze" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/tiers/api/Bronze + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 1,\n \"description\": \"Allows 1 request(s) per minute.\",\n \"name\": \"Bronze\",\n \"attributes\": {}\n}" - summary: Get a Tier + summary: Get details of a tier description: | - Get tier details + This operation can be used to retrieve details of a single tier by specifying the tier level and tier name. + Note that the scope of the API is mandatory while retreiving the access token with the following cURL command : `curl -k -d \"grant_type=password&username=username&password=password&scope=apim:tier_view\" -H \"Authorization: Basic \" https://localhost:8243/token`. + You will receive the access token as the response, for example `"access_token":"8644c013-7ff1-3217-b150-d7b92cae6be7"`. parameters: - $ref: '#/parameters/tierName' - $ref: '#/parameters/tierLevel' @@ -1616,7 +2206,7 @@ paths: - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - - Tiers + - Throttling Tier (Individual) responses: 200: description: | @@ -1632,17 +2222,17 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. @@ -1661,12 +2251,16 @@ paths: #----------------------------------------------------- put: x-scope: apim:tier_manage - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X PUT -d @data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api/Low\"" - x-wso2-request: "{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 10,\n \"description\": \"Allows 10 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"a\": \"30\",\n \"b\": \"10\",\n \"c\": \"20\"\n }\n}\n" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X PUT -d @data.json \"https://localhost:9443/api/am/publisher/v0.12/tiers/api/Low\"" + x-wso2-request: "PUT https://localhost:9443/api/am/publisher/v0.12/tiers/api/Low\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 10,\n \"description\": \"Allows 10 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"a\": \"30\",\n \"b\": \"10\",\n \"c\": \"20\"\n }\n}\n" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"tierLevel\": \"api\",\n \"stopOnQuotaReach\": true,\n \"requestCount\": 10,\n \"description\": \"Allows 10 request(s) per minute.\",\n \"name\": \"Low\",\n \"attributes\": {\n \"b\": \"10\",\n \"c\": \"20\",\n \"a\": \"30\"\n }\n}" summary: Update a Tier description: | - Update tier details + This operation can be used to update an existing tier. The only supported tier level is `api` tiers. + `PUT https://localhost:9443/api/am/publisher/v0.12/tiers/api/Low` + + **IMPORTANT:** + * This is only effective when Advanced Throttling is disabled in the Server. If enabled, we need to use Admin REST API for throttling tiers modification related operations. parameters: - $ref: '#/parameters/tierName' - in: body @@ -1676,12 +2270,12 @@ paths: required: true schema: $ref: '#/definitions/Tier' - - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/tierLevel-A' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - Tiers + - Throttling Tier (Individual) responses: 200: description: | @@ -1701,12 +2295,12 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional request. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. - Used by caches, or in conditional reuquests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -1732,18 +2326,25 @@ paths: #----------------------------------------------------- delete: x-scope: apim:tier_manage - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -X POST \"http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/api/Low\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE \"https://localhost:9443/api/am/publisher/v0.12/tiers/api/Low\"" + x-wso2-request: | + DELETE https://localhost:9443/api/am/publisher/v0.12/tiers/api/Low + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK" summary: Delete a Tier description: | - Remove a tier + This operation can be used to delete an existing tier. The only supported tier level is `api` tiers. + `DELETE https://localhost:9443/api/am/publisher/v0.12/tiers/api/Low` + + **IMPORTANT:** + * This is only effective when Advanced Throttling is disabled in the Server. If enabled, we need to use Admin REST API for throttling tiers modification related operations. parameters: - $ref: '#/parameters/tierName' - - $ref: '#/parameters/tierLevel' + - $ref: '#/parameters/tierLevel-A' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - - Tiers + - Throttling Tier (Individual) responses: 200: description: | @@ -1772,12 +2373,12 @@ paths: #----------------------------------------------------- post: x-scope: apim:tier_manage - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" -H \"Content-Type: application/json\" -X POST -d @data.json \"http://127.0.0.1:9763/api/am/publisher/v0.10/tiers/update-permission?tierName=Bronze&tierLevel=api\"" - x-wso2-request: "{\n \"permissionType\":\"deny\",\n \"roles\": [\"Internal/everyone\",\"admin\"]\n}" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/publisher/v0.12/tiers/update-permission?tierName=Bronze&tierLevel=api\"" + x-wso2-request: "POST https://localhost:9443/api/am/publisher/v0.12/tiers/update-permission?tierName=Bronze&tierLevel=api\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\nContent-Type: application/json\n\n{\n \"permissionType\":\"deny\",\n \"roles\": [\"Internal/everyone\",\"admin\"]\n}" x-wso2-response: "HTTP/1.1 200 OK" - summary: Update Tier Permission + summary: Update tier permission description: | - Update tier permission + This operation can be used to update tier permissions which controls access for the particular tier based on the subscribers' roles. parameters: - $ref: '#/parameters/tierName-Q' - $ref: '#/parameters/tierLevel-Q' @@ -1788,7 +2389,7 @@ paths: schema: $ref: '#/definitions/TierPermission' tags: - - Tiers + - Throttling Tier (Individual) responses: 200: description: | @@ -1802,12 +2403,12 @@ paths: ETag: description: | Entity Tag of the modified tier. - Used by caches, or in conditional request. + Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the tier has been modified. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | @@ -1845,19 +2446,18 @@ paths: #----------------------------------------------------- get: x-scope: apim:api_view - x-wso2-curl: "curl -H \"Authorization: Bearer b0982cd2aacd463ff5f63cd5ebe58f4a\" \"http://127.0.0.1:9763/api/am/publisher/v0.10/environments\"" - x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"list\": [ {\n \"showInApiConsole\": true,\n \"serverUrl\": \"https://192.168.56.1:9444//services/\",\n \"endpoints\": {\n \"http\": \"http://192.168.56.1:8281\",\n \"https\": \"https://192.168.56.1:8244\"\n },\n \"name\": \"Production and Sandbox\",\n \"type\": \"hybrid\"\n }],\n \"count\": 1\n}" - summary: Get gateway environments + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/publisher/v0.12/environments\"" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/environments + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"list\": [ {\n \"showInApiConsole\": true,\n \"serverUrl\": \"https://localhost:9443/services/\",\n \"endpoints\": {\n \"http\": \"http://localhost:8280\",\n \"https\": \"https://localhost:8243\"\n },\n \"name\": \"Production and Sandbox\",\n \"type\": \"hybrid\"\n }],\n \"count\": 1\n}" + summary: Get all gateway environments description: | - Get a list of gateway environments configured previously. + This operation can be used to retrieve the list of gateway environments available. parameters: - - in: query - name: apiId - description: | - Will return environment list for the provided API. - type: string + - $ref: '#/parameters/apiId-Q' tags: - - Environments + - Environment (Collection) responses: 200: description: | @@ -1873,18 +2473,124 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests. + Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. Requested API does not exist. schema: $ref: '#/definitions/Error' + /policies/mediation: + +#----------------------------------------------------------------------------------------- +# Retrieving the list of all global mediation sequences under a given search condition +#----------------------------------------------------------------------------------------- + get: + x-scope: apim:mediation_policy_view + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://localhost:9443/api/am/publisher/v0.12/policies/mediation" + x-wso2-request: | + GET https://localhost:9443/api/am/publisher/v0.12/policies/mediation + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n\r\n{\r\n \"count\": 10,\r\n \"next\": null,\r\n \"previous\": null,\r\n \"list\": [\r\n {\r\n \"name\": \"debug_json_fault\",\r\n \"id\": \"563de8f3-dd1d-4ec7-afc2-d158c663ed34\",\r\n \"type\": \"fault\"\r\n },\r\n {\r\n \"name\": \"json_fault\",\r\n \"id\": \"f9c36f4d-a2b6-41e7-b311-d358a47916be\",\r\n \"type\": \"fault\"\r\n },\r\n {\r\n \"name\": \"json_to_xml_in_message\",\r\n \"id\": \"3921225b-7918-4b95-a851-22c4e4e3e911\",\r\n \"type\": \"in\"\r\n },\r\n {\r\n \"name\": \"debug_in_flow\",\r\n \"id\": \"2bc15f93-4455-4763-89b8-83600fb9d731\",\r\n \"type\": \"in\"\r\n },\r\n {\r\n \"name\": \"log_in_message\",\r\n \"id\": \"4d287cca-76ab-44ca-b22e-919fc27c50e3\",\r\n \"type\": \"in\"\r\n },\r\n {\r\n \"name\": \"preserve_accept_header\",\r\n \"id\": \"3776b215-b3bc-40b6-bdcb-06efa7de64be\",\r\n \"type\": \"in\"\r\n },\r\n {\r\n \"name\": \"xml_to_json_in_message\",\r\n \"id\": \"50ac2002-769e-4f90-8549-6d0248dff7d2\",\r\n \"type\": \"in\"\r\n },\r\n {\r\n \"name\": \"xml_to_json_out_message\",\r\n \"id\": \"2af75853-ed75-4d25-81aa-0ebbeca691ea\",\r\n \"type\": \"out\"\r\n },\r\n {\r\n \"name\": \"json_to_xml_out_message\",\r\n \"id\": \"d9fa3ffc-f6b6-4171-ab97-eb44196cb66e\",\r\n \"type\": \"out\"\r\n },\r\n {\r\n \"name\": \"debug_out_flow\",\r\n \"id\": \"260b7701-4071-46bd-9b66-900ac6fffed6\",\r\n \"type\": \"out\"\r\n },\r\n {\r\n \"name\": \"apply_accept_header\",\r\n \"id\": \"15c17c2f-33e3-4c37-a262-04dfa49983a4\",\r\n \"type\": \"out\"\r\n },\r\n {\r\n \"name\": \"log_out_message\",\r\n \"id\": \"d37dca41-c048-492a-82cf-9a2292c6fff0\",\r\n \"type\": \"out\"\r\n }\r\n ]\r\n}" + summary: | + Get all global level mediation policies + description: | + This operation provides you a list of available all global level mediation policies. + parameters: + - $ref : '#/parameters/limit' + - $ref : '#/parameters/offset' + - name : query + in: query + description: "-Not supported yet-" + type: string + - $ref : "#/parameters/Accept" + - $ref : "#/parameters/If-None-Match" + tags: + - Mediation Policy (Collection) + responses: + 200: + description: | + OK. + List of mediation policies is returned. + schema: + $ref: '#/definitions/mediationList' + headers: + Content-Type: + description: The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + type: string + 304: + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource (Will be supported in future). + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + + + +###################################################### +# The "Workflow approval" resource API +###################################################### + /workflows/update-workflow-status: + +#------------------------------------------------------------------- +# Resume the workflow by approving or rejecting the workflow request +#------------------------------------------------------------------- + post: + x-scope: apim:api_workflow + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/publisher/v0.12/workflows/update-workflow-status?workflowReferenceId=56e3a170-a7a7-45f8-b051-7e43a58a67e1\"" + x-wso2-request: "POST https://localhost:9443/api/am/publisher/v0.12/workflows/update-workflow-status?workflowReferenceId=56e3a170-a7a7-45f8-b051-7e43a58a67e1\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\nContent-Type: application/json\n\n{\n \"status\" : \"APPROVED\",\n \"attributes\" : {\n \"apiCurrentState\": \"Created\",\n \"apiLCAction\": \"Publish\",\n \"apiName\":\"APIname\",\n \"apiVersion\" : \"1.0.0\",\n \"apiProvider\" : \"admin\",\n \"invoker\": \"admin\"\n }\n}" + x-wso2-response: "HTTP/1.1 200 OK" + summary: Update workflow status + description: | + This operation can be used to approve or reject a workflow task. + parameters: + - $ref: '#/parameters/workflowReferenceId-Q' + - in: body + name: body + description: | + Workflow event that need to be updated + required: true + schema: + $ref: '#/definitions/Workflow' + tags: + - Workflows (Individual) + responses: + 200: + description: | + OK. + Workflow request information is returned. + schema: + $ref: '#/definitions/Workflow' + headers: + Content-Type: + description: | + The content type of the body. + type: string + 400: + description: | + Bad Request. + Invalid request or validation error. + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + Workflow for the given reference in not found. + schema: + $ref: '#/definitions/Error' ###################################################### # Parameters - required by some of the APIs above ###################################################### @@ -1896,11 +2602,12 @@ parameters: name: apiId in: path description: | - **API ID** consisting of the **UUID** of the API. + **API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. required: true type: string + x-encoded: true # API Identifier # Specified as part of the query string @@ -1908,11 +2615,12 @@ parameters: name: apiId in: query description: | - **API ID** consisting of the **UUID** of the API. + **API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. required: true type: string + x-encoded: true # Document Identifier @@ -1921,7 +2629,7 @@ parameters: name: documentId in: path description: | - **Document Identifier** + Document Identifier required: true type: string @@ -1945,6 +2653,18 @@ parameters: required: true type: string +# Mediation policy identifier +# Specified as part of the path expression + mediationPolicyId: + name: mediationPolicyId + in: path + description: | + Mediation policy Id + required: true + type: string + + + # Subscription Identifier # Specified as part of the query string subscriptionId-Q: @@ -1989,6 +2709,18 @@ parameters: - resource required: true +# Tier Type +# Specified as part of the path expression + tierLevel-A: + name: tierLevel + in: path + description: | + List API or Application or Resource type tiers. + type: string + enum: + - api + required: true + # Tier Type # Specified as part of the query string tierLevel-Q: @@ -2029,8 +2761,8 @@ parameters: name: Accept in: header description: | - Media types acceptable for the response. Default is JSON. - default: JSON + Media types acceptable for the response. Default is application/json. + default: application/json type: string # The HTTP Content-Type header @@ -2038,8 +2770,17 @@ parameters: name: Content-Type in: header description: | - Media type of the entity in the body. Default is JSON. - default: JSON + Media type of the entity in the body. Default is application/json. + default: application/json + required: true + type : string + +# The HTTP Authorization header + Authorization: + name: Authorization + in: header + description: | + Holds the bearer token for apis that require authentication. required: true type : string @@ -2050,7 +2791,7 @@ parameters: in: header description: | Validator for conditional requests; based on the ETag of the formerly retrieved - variant of the resourec. + variant of the resource (Will be supported in future). type : string # The HTTP If-Modified-Since header @@ -2060,7 +2801,7 @@ parameters: in: header description: | Validator for conditional requests; based on Last Modified header of the - formerly retrieved variant of the resource. + formerly retrieved variant of the resource (Will be supported in future). type: string # The HTTP If-Match header @@ -2069,7 +2810,7 @@ parameters: name: If-Match in: header description: | - Validator for conditional requests; based on ETag. + Validator for conditional requests; based on ETag (Will be supported in future). type: string # The HTTP If-Unmodified-Since header @@ -2078,7 +2819,18 @@ parameters: name: If-Unmodified-Since in: header description: | - Validator for conditional requests; based on Last Modified header. + Validator for conditional requests; based on Last Modified header (Will be supported in future). + type: string + + +# Workflow reference ID +# Specified as part of the path expression + workflowReferenceId-Q: + name: workflowReferenceId + in: query + description: | + Workflow reference id + required: true type: string ###################################################### @@ -2113,6 +2865,17 @@ definitions: type: array items: $ref: '#/definitions/APIInfo' + pagination: + properties: + offset: + type: integer + example: 12 + limit: + type: integer + example: 25 + total: + type: integer + example: 1290 #----------------------------------------------------- # The API Info resource @@ -2143,6 +2906,9 @@ definitions: status: type: string example: CREATED + thumbnailUri: + type: string + example: /apis/01234567-0123-0123-0123-012345678901/thumbnail #----------------------------------------------------- # The API resource @@ -2153,12 +2919,12 @@ definitions: - name - context - version - - apiDefinition - tiers - isDefaultVersion - transport - endpointConfig - visibility + - type properties: id: type: string @@ -2167,15 +2933,19 @@ definitions: example: 01234567-0123-0123-0123-012345678901 name: type: string + description: Name of the API example: CalculatorAPI description: type: string + description: A brief description about the API example: A calculator API that supports basic operations context: type: string + description: A string that represents the context of the user's request example: CalculatorAPI version: type: string + description: The version of the API example: 1.0.0 provider: description: | @@ -2186,6 +2956,7 @@ definitions: description: | Swagger definition of the API which contains details about URI templates and scopes type: string + example: "{\"paths\":{\"/substract\":{\"get\":{\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"parameters\":[{\"name\":\"x\",\"required\":true,\"type\":\"string\",\"in\":\"query\"},{\"name\":\"y\",\"required\":true,\"type\":\"string\",\"in\":\"query\"}],\"responses\":{\"200\":{}}}},\"/add\":{\"get\":{\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"parameters\":[{\"name\":\"x\",\"required\":true,\"type\":\"string\",\"in\":\"query\"},{\"name\":\"y\",\"required\":true,\"type\":\"string\",\"in\":\"query\"}],\"responses\":{\"200\":{}}}}},\"swagger\":\"2.0\",\"info\":{\"title\":\"CalculatorAPI\",\"version\":\"1.0.0\"}}" wsdlUri: description: | WSDL URL if the API is based on a WSDL endpoint @@ -2193,6 +2964,7 @@ definitions: example: "http://www.webservicex.com/globalweather.asmx?wsdl" status: type: string + description: This describes in which status of the lifecycle the API is example: CREATED responseCaching: type: string @@ -2206,6 +2978,14 @@ definitions: isDefaultVersion: type: boolean example: false + type: + type: string + description: The transport to be set. Accepted values are HTTP, WS + enum: + - HTTP + - WS + example: HTTP + default: HTTP transport: description: | Supported transports for the API (http and/or https). @@ -2215,14 +2995,20 @@ definitions: example: ["http","https"] tags: type: array + description: Search keywords related to the API items: type: string example: ["substract","add"] tiers: type: array + description: The subscription tiers selected for the particular API items: type: string example: ["Unlimited"] + apiLevelPolicy: + description: The policy selected for the particular API + type: string + example: "Unlimited" maxTps: properties: production: @@ -2238,6 +3024,7 @@ definitions: example: "/apis/01234567-0123-0123-0123-012345678901/thumbnail" visibility: type: string + description: The visibility level of the API. Accepts one of the following. PUBLIC, PRIVATE, RESTRICTED OR CONTROLLED. enum: - PUBLIC - PRIVATE @@ -2246,22 +3033,19 @@ definitions: example: PUBLIC visibleRoles: type: array - items: - type: string - example: [] - visibleTenants: - type: array + description: The user roles that are able to access the API items: type: string example: [] endpointConfig: type: string - example: "{\"production_endpoints\":{\"url\":\"http://localhost:9763/am/sample/calculator/v1/api\",\"config\":null},\"implementation_status\":\"managed\",\"endpoint_type\":\"http\"}" + example: "{\"production_endpoints\":{\"url\":\"https://localhost:9443/am/sample/pizzashack/v1/api/\",\"config\":{\"suspendErrorCode\":\"101000\",\"suspendDuration\":\"2000\",\"suspendMaxDuration\":\"3\",\"factor\":\"2\",\"retryErroCode\":\"101000\",\"retryTimeOut\":\"4\",\"retryDelay\":\"1000\",\"actionSelect\":\"fault\",\"actionDuration\":\"3000\"}},\"sandbox_endpoints\":{\"url\":\"https://localhost:9443/am/sample/pizzashack/v1/api/\",\"config\":null},\"endpoint_type\":\"http\"}" endpointSecurity: properties: type: type: string example: basic + description: Accepts one of the following, basic or digest. enum: - basic - digest @@ -2283,6 +3067,7 @@ definitions: example: [] subscriptionAvailability: type: string + description: The subscription availability. Accepts one of the following. current_tenant, all_tenants or specific_tenants. enum: - current_tenant - all_tenants @@ -2292,7 +3077,25 @@ definitions: type: array items: type: string - example: [] + example: ["tenant1", "tenant2"] + additionalProperties: + type: object + description : Map of custom properties of API + accessControl: + type: string + description: | + Is the API is restricted to certain set of publishers or creators or is it visible to all the + publishers and creators. If the accessControl restriction is none, this API can be modified by all the + publishers and creators, if not it can only be viewable/modifiable by certain set of publishers and creators, + based on the restriction. enum: + - NONE + - RESTRICTED + accessControlRoles: + type: array + description: The user roles that are able to view/modify as API publisher or creator. + items: + type: string + example: [admin] businessInformation: properties: businessOwner: @@ -2439,6 +3242,102 @@ definitions: example: API_LEVEL #----------------------------------------------------- +# The Mediation List resource +#----------------------------------------------------- + mediationList: + title: Mediation List + properties: + count: + type: integer + description: | + Number of mediation sequences returned. + example: 1 + next: + type: string + description: | + Link to the next subset of sequences qualified. + Empty if no more sequences are to be returned. + example: "" + previous: + type: string + description: | + Link to the previous subset of sequences qualified. + Empty if current subset is the first subset returned. + example: "" + list: + type: array + items: + $ref: '#/definitions/MediationInfo' + +#----------------------------------------------------- +# The MediationInfo resource +#----------------------------------------------------- + MediationInfo: + title: MediationInfo + required: + - name + - type + - id + properties: + name: + type: string + example: json_fault.xml + id: + type: string + example: 01234567-0123-0123-0123-012345678901 + type: + type: string + enum: + - in + - out + - fault + example: in +#----------------------------------------------------- +# The Mediation resource +#----------------------------------------------------- + Mediation: + title: Mediation + required: + - name + - type + - config + properties: + id: + type: string + example: 01234567-0123-0123-0123-012345678901 + name: + type: string + example: json_fault.xml + type: + type: string + enum: + - in + - out + - fault + example: in + config: + type: string + example: ' + + + + ' + +#----------------------------------------------------- +# The MediationInfo resource +#----------------------------------------------------- + Wsdl: + title: Wsdl + required: + - name + properties: + name: + type: string + example: admin--calculatorAPI2.0.wsdl + wsdlDefinition: + type: string + + # The Tier List resource #----------------------------------------------------- TierList: @@ -2607,6 +3506,20 @@ definitions: - REJECTED example: UNBLOCKED +#----------------------------------------------------- +# The Extended Subscription resource +#----------------------------------------------------- + ExtendedSubscription: + title: Subscription with Ext. Workflow Reference + required: + - workflowId + allOf: + - $ref: '#/definitions/Subscription' + - properties: + workflowId: + type: string + example: 01234567-0123-0123-0123-012345678901 + #----------------------------------------------------- # The Sequence resource #----------------------------------------------------- @@ -2618,12 +3531,15 @@ definitions: name: type: string example: log_in_message - config: - type: string - example: "" type: type: string example: in + id: + type: string + example: 69ea3fa6-55c6-472e-896d-e449dd34a824 + shared: + type: boolean + example: true #----------------------------------------------------- # The Error resource @@ -2692,7 +3608,7 @@ definitions: example: hybrid serverUrl: type: string - example: "https://localhost:9443//services/" + example: "https://localhost:9443/services/" showInApiConsole: type: boolean example: true @@ -2729,7 +3645,7 @@ definitions: https: type: string description: HTTPS environment URL - example: "https://localhost:8244" + example: "https://localhost:8243" #----------------------------------------------------- # The File Information resource @@ -2744,4 +3660,32 @@ definitions: mediaType: type: string description: media-type of the file - example: "image/jpeg" \ No newline at end of file + example: "image/jpeg" + + +#----------------------------------------------------- +# The workflow response resource +#----------------------------------------------------- + Workflow: + title: workflow + required: + - status + properties: + status: + description: | + This attribute declares whether this workflow task is approved or rejected. + type: string + enum: + - APPROVED + - REJECTED + example: APPROVED + attributes: + description: | + Custom attributes to complete the workflow task + type: object + additionalProperties: + type: string + example: {} + description: + type: string + example: "Approve workflow request." \ No newline at end of file diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/store-api.yaml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/store-api.yaml index eed49e831e1..5bdf610d347 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/store-api.yaml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/src/main/resources/store-api.yaml @@ -1,19 +1,34 @@ +# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ + swagger: '2.0' ###################################################### # Prolog ###################################################### info: - version: "0.11.0" + version: "0.12.0" title: "WSO2 API Manager - Store" description: | This specifies a **RESTful API** for WSO2 **API Manager** - Store. - - Please see [full swagger definition](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.0.4/components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/resources/store-api.yaml) of the API which is written using [swagger 2.0](http://swagger.io/) specification. + + Please see [full swagger definition](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.1.66/components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/resources/store-api.yaml) of the API which is written using [swagger 2.0](http://swagger.io/) specification. contact: name: "WSO2" url: "http://wso2.com/products/api-manager/" email: "architecture@wso2.com" - license: + license: name: "Apache 2.0" url: "http://www.apache.org/licenses/LICENSE-2.0.html" @@ -22,7 +37,7 @@ info: ###################################################### # The schemes supported by the API -schemes: +schemes: - https # The domain of the API. @@ -32,23 +47,23 @@ host: apis.wso2.com # The base path of the API. # Will be prefixed to all paths. -basePath: /api/am/store/v0.11 +basePath: /api/am/store/v0.12 # The following media types can be passed as input in message bodies of the API. # The actual media type must be specified in the Content-Type header field of the request. # The default is json, i.e. the Content-Type header is not needed to # be set, but supporting it serves extensibility. -consumes: +consumes: - application/json # The following media types may be passed as output in message bodies of the API. # The media type(s) consumable by the requestor is specified in the Accept header field -# of the corresponding request. -# The actual media type returned will be specfied in the Content-Type header field +# of the corresponding request. +# The actual media type returned will be specfied in the Content-Type header field # of the of the response. # The default of the Accept header is json, i.e. there is not needed to # set the value, but supporting it serves extensibility. -produces: +produces: - application/json x-wso2-security: @@ -66,20 +81,21 @@ paths: /apis: #----------------------------------------------------- -# Retrieving the list of all APIs qualifying under a given search condition +# Retrieving the list of all APIs qualifying under a given search condition #----------------------------------------------------- get: - x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis" + x-wso2-curl: "curl https://localhost:9443/api/am/store/v0.12/apis" + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/apis" x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/apis + GET https://localhost:9443/api/am/store/v0.12/apis x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"This API provide Account Status Validation.\",\n \"status\": \"PUBLISHED\",\n \"name\": \"AccountVal\",\n \"context\": \"/account/1.0.0\",\n \"id\": \"2e81f147-c8a8-4f68-b4f0-69e0e7510b01\"\n },\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": null,\n \"status\": \"PUBLISHED\",\n \"name\": \"api1\",\n \"context\": \"/api1/1.0.0\",\n \"id\": \"3e22d2fb-277a-4e9e-8c7e-1c0f7f73960e\"\n },\n {\n \"provider\": \"admin\",\n \"version\": \"2.0.0\",\n \"description\": \"Verify a phone number\",\n \"status\": \"PUBLISHED\",\n \"name\": \"PhoneVerification\",\n \"context\": \"/phoneverify/2.0.0\",\n \"id\": \"c43a325c-260b-4302-81cb-768eafaa3aed\"\n }\n ],\n \"count\": 3,\n \"next\": \"\"\n}" summary: | Retrieve/Search APIs description: | This operation provides you a list of available APIs qualifying under a given search condition. - + Each retrieved API is represented with a minimal amount of attributes. If you want to get complete details of an API, you need to use **Get details of an API** operation. - + This operation supports retriving APIs of other tenants. The required tenant domain need to be specified as a header `X-WSO2-Tenant`. If not specified super tenant's APIs will be retrieved. If you used an Authorization header, the user's tenant associated with the access token will be used. **NOTE:** @@ -109,7 +125,7 @@ paths: If no advanced attribute modifier has been specified, search will match the given query string against API Name. - + type: string - $ref : "#/parameters/Accept" - $ref : "#/parameters/If-None-Match" @@ -150,17 +166,18 @@ paths: # Retrieve the details of an API definition #----------------------------------------------------- get: - x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed" + x-wso2-curl: "curl https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed" + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed" x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed - x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\r\n \"thumbnailUrl\": null,\r\n \"tiers\": [\"Unlimited\"],\r\n \"businessInformation\": {\r\n \"technicalOwner\": \"John Doe\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"businessOwner\": \"Jane Roe\",\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\"\r\n },\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"},\\\"Content-Type\\\":{\\\"description\\\":\\\"The content type of the body.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity.\\\"}}}},\\\"/order/{orderId}\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Get details of an Order\\\",\\\"parameters\\\":[{\\\"description\\\":\\\"Order Id\\\",\\\"name\\\":\\\"orderId\\\",\\\"format\\\":\\\"integer\\\",\\\"type\\\":\\\"number\\\",\\\"required\\\":true,\\\"in\\\":\\\"path\\\"}],\\\"responses\\\":{\\\"200\\\":{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"headers\\\":{},\\\"description\\\":\\\"OK Requested Order will be returned\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"isDefaultVersion\": false,\r\n \"endpointURLs\": [ {\r\n \"environmentName\": \"Production and Sandbox\",\r\n \"environmentType\": \"hybrid\",\r\n \"environmentURLs\": {\r\n \"http\": \"http://10.100.7.77:8280//pizzashack/1.0.0\",\r\n \"https\": \"https://10.100.7.77:8243//pizzashack/1.0.0\"\r\n }\r\n }],\r\n \"transport\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"tags\": [\"pizza\"],\r\n \"version\": \"1.0.0\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"provider\": \"admin\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"context\": \"/pizzashack/1.0.0\",\r\n \"id\": \"8848faaa-7fd1-478a-baa2-48a4ebb92c98\",\r\n \"status\": \"PUBLISHED\"\r\n} " + GET https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\r\n \"thumbnailUrl\": null,\r\n \"tiers\": [\"Unlimited\"],\r\n \"businessInformation\": {\r\n \"technicalOwner\": \"John Doe\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"businessOwner\": \"Jane Roe\",\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\"\r\n },\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"},\\\"Content-Type\\\":{\\\"description\\\":\\\"The content type of the body.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity.\\\"}}}},\\\"/order/{orderId}\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Get details of an Order\\\",\\\"parameters\\\":[{\\\"description\\\":\\\"Order Id\\\",\\\"name\\\":\\\"orderId\\\",\\\"format\\\":\\\"string\\\",\\\"type\\\":\\\"string\\\",\\\"required\\\":true,\\\"in\\\":\\\"path\\\"}],\\\"responses\\\":{\\\"200\\\":{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"headers\\\":{},\\\"description\\\":\\\"OK Requested Order will be returned\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"isDefaultVersion\": false,\r\n \"endpointURLs\": [ {\r\n \"environmentName\": \"Production and Sandbox\",\r\n \"environmentType\": \"hybrid\",\r\n \"environmentURLs\": {\r\n \"http\": \"http://localhost:8280//pizzashack/1.0.0\",\r\n \"https\": \"https://localhost:8243//pizzashack/1.0.0\"\r\n }\r\n }],\r\n \"transport\": [\r\n \"http\",\r\n \"https\"\r\n ],\r\n \"tags\": [\"pizza\"],\r\n \"version\": \"1.0.0\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"provider\": \"admin\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"context\": \"/pizzashack/1.0.0\",\r\n \"id\": \"8848faaa-7fd1-478a-baa2-48a4ebb92c98\",\r\n \"status\": \"PUBLISHED\"\r\n} " summary: | Get details of an API description: | Using this operation, you can retrieve complete details of a single API. You need to provide the Id of the API to retrive it. - + `X-WSO2-Tenant` header can be used to retrive an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. - + **NOTE:** * This operation does not require an Authorization header by default. But if it is provided, it will be validated and checked for permissions of the user, hence you may be able to see APIs which are restricted for special permissions/roles. \n parameters: @@ -183,7 +200,7 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | @@ -195,7 +212,7 @@ paths: 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource (Will be supported in future). + Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. @@ -216,16 +233,17 @@ paths: #----------------------------------------------------- get: x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger - x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger" + GET https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger + x-wso2-curl: "curl https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger" + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/swagger" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"paths\": {\"/*\": {\"get\": {\n \"x-auth-type\": \"Application\",\n \"x-throttling-tier\": \"Unlimited\",\n \"responses\": {\"200\": {\"description\": \"OK\"}}\n }}},\n \"x-wso2-security\": {\"apim\": {\"x-wso2-scopes\": []}},\n \"swagger\": \"2.0\",\n \"info\": {\n \"title\": \"PhoneVerification\",\n \"description\": \"Verify a phone number\",\n \"contact\": {\n \"email\": \"xx@ee.com\",\n \"name\": \"xx\"\n },\n \"version\": \"2.0.0\"\n }\n}\n" summary: | Get swagger definition description: | You can use this operation to retrieve the swagger definition of an API. - + `X-WSO2-Tenant` header can be used to retrive the swagger definition an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. - + **NOTE:** * This operation does not require an Authorization header by default. But in order to see a restricted API's swagger definition, you need to provide Authorization header. parameters: @@ -248,7 +266,7 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | @@ -258,7 +276,7 @@ paths: 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource (Will be supported in future). + Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. @@ -279,9 +297,10 @@ paths: post: x-scope: apim:subscribe x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/apis/generate-sdk - x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/generate-sdk" - x-wso2-response: "HTTP/1.1 200 OK \n Content-Disposition: attachment; filename=\"PizzaShackAPI_1.0.0_java.zip\" \n Date: Wed, 12 Oct 2016 11:10:49 GMT \n Content-Type: application/zip \n Transfer-Encoding: chunked \n Server: WSO2 Carbon Server" + POST https://localhost:9443/api/am/store/v0.12/apis/generate-sdk?apiId=e93fb282-b456-48fc-8981-003fb89086ae&language=java + Authorization: Bearer 2e29904b-f3b0-366e-ba13-b469abedd88e + x-wso2-curl: "curl -k -H \"Authorization: Bearer 2e29904b-f3b0-366e-ba13-b469abedd88e\" -X POST 'https://localhost:9443/api/am/store/v0.12/apis/generate-sdk?apiId=5721d128-76d0-4cb9-b300-2bd9578beddb&language=java' > PizzaAPI_Java_SDK.zip" + x-wso2-response: "HTTP/1.1 200 OK \nContent-Disposition: attachment; filename=\"PizzaShackAPI_1.0.0_java.zip\"\nContent-Type: application/zip\n\n[zip content]" summary: | Generate SDK for an API description: | @@ -331,16 +350,17 @@ paths: #----------------------------------------------------- get: x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents - x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents" + GET https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents + x-wso2-curl: "curl https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents" + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"850a4f34-db2c-4d23-9d85-3f95fbfb082c\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n },\n {\n \"sourceType\": \"URL\",\n \"sourceUrl\": \"http://wiki.cdyne.com/index.php/Phone_Verification\",\n \"otherTypeName\": null,\n \"documentId\": \"98e18be8-5861-43c7-ba26-8cbbccd3a76f\",\n \"summary\": \"This is the URL for online documentation\",\n \"name\": \"Online Documentation\",\n \"type\": \"SAMPLES\"\n },\n {\n \"sourceType\": \"FILE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"b66451ff-c6c2-4f6a-b91d-3821dc119b04\",\n \"summary\": \"This is a sample documentation pdf\",\n \"name\": \"Introduction to PhoneVerification API PDF\",\n \"type\": \"HOWTO\"\n }\n ],\n \"count\": 3,\n \"next\": \"\"\n}" summary: | Get a list of documents of an API description: | This operation can be used to retrive a list of documents belonging to an API by providing the id of the API. - + `X-WSO2-Tenant` header can be used to retrive documents of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. - + **NOTE:** * This operation does not require an Authorization header by default. But in order to see a restricted API's documents, you need to provide Authorization header. parameters: @@ -395,18 +415,19 @@ paths: #----------------------------------------------------- get: x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c - x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c\"" + GET https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c + x-wso2-curl: "curl \"https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c\"" + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/apis/c43a325c-260b-4302-81cb-768eafaa3aed/documents/850a4f34-db2c-4d23-9d85-3f95fbfb082c" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"850a4f34-db2c-4d23-9d85-3f95fbfb082c\",\n \"summary\": \"This is a sample documentation for v1.0.0\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" summary: | Get a document of an API description: | This operation can be used to retrieve a particular document's metadata associated with an API. - + `X-WSO2-Tenant` header can be used to retrive a document of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. **NOTE:** - * This operation does not require an Authorization header by default. But in order to see a restricted API's document, you need to provide Authorization header. + * This operation does not require an Authorization header by default. But in order to see a restricted API's document, you need to provide Authorization header. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/documentId' @@ -431,7 +452,7 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests (Will be supported in future). + Used by caches, or in conditional requests. type: string Last-Modified: description: | @@ -441,7 +462,7 @@ paths: 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource (Will be supported in future). + Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. @@ -467,28 +488,29 @@ paths: #------------------------------------------------------------------------------------------------- get: x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content - x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content\" > sample.pdf" + GET https://localhost:9443/api/am/store/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content + x-wso2-curl: "curl \"https://localhost:9443/api/am/store/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content\" > sample.pdf" + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" \"https://localhost:9443/api/am/store/v0.12/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5/content\" > sample.pdf" x-wso2-response: "HTTP/1.1 200 OK\nContent-Disposition: attachment; filename=\"sample.pdf\"\nContent-Type: application/octet-stream\nContent-Length: 7802\n\n%PDF-1.4\n%äüöß\n2 0 obj\n<>\nstream\n..\n>>\nstartxref\n7279\n%%EOF" summary: | Get the content of an API document description: | This operation can be used to retrive the content of an API's document. - + The document can be of 3 types. In each cases responses are different. - + 1. **Inline type**: The content of the document will be retrieved in `text/plain` content type - 2. **FILE type**: + 2. **FILE type**: The file will be downloaded with the related content type (eg. `application/pdf`) 3. **URL type**: The client will recieve the URL of the document as the Location header with the response with - `303 See Other` - + `X-WSO2-Tenant` header can be used to retrive the content of a document of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. **NOTE:** - * This operation does not require an Authorization header by default. But in order to see a restricted API's document content, you need to provide Authorization header. + * This operation does not require an Authorization header by default. But in order to see a restricted API's document content, you need to provide Authorization header. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/documentId' @@ -511,7 +533,7 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests (Will be supported in future). + Used by caches, or in conditional requests. type: string Last-Modified: description: | @@ -530,7 +552,7 @@ paths: 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource (Will be supported in future). + Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. @@ -554,15 +576,18 @@ paths: #------------------------------------------------------------------------------------------------- get: x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail - x-wso2-curl: "curl https://127.0.0.1:9443/api/am/store/v0.11/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail > image.jpg" + GET https://localhost:9443/api/am/store/v0.12/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail + x-wso2-curl: "curl https://localhost:9443/api/am/store/v0.12/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail > image.jpg" + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/apis/e93fb282-b456-48fc-8981-003fb89086ae/thumbnail > image.jpg" x-wso2-response: "HTTP/1.1 200 OK\r\nContent-Type: image/jpeg\r\n\r\n[image content]" summary: Get thumbnail image description: | This operation can be used to download a thumbnail image of an API. - + + `X-WSO2-Tenant` header can be used to retrive a thumbnail of an API that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. + **NOTE:** - * This operation does not require an Authorization header by default. But in order to see a restricted API's thumbnail, you need to provide Authorization header. + * This operation does not require an Authorization header by default. But in order to see a restricted API's thumbnail, you need to provide Authorization header. parameters: - $ref: '#/parameters/apiId' - $ref: '#/parameters/requestedTenant' @@ -584,7 +609,7 @@ paths: ETag: description: | Entity Tag of the response resource. - Used by caches, or in conditional requests (Will be supported in future). + Used by caches, or in conditional requests. type: string Last-Modified: description: | @@ -594,7 +619,7 @@ paths: 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource (Will be supported in future). + Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. @@ -619,9 +644,9 @@ paths: get: x-scope: apim:subscribe x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/applications + GET https://localhost:9443/api/am/store/v0.12/applications Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/store/v0.11/applications\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/store/v0.12/applications\"" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"groupId\": \"\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"367a2361-8db5-4140-8133-c6c8dc7fa0c4\",\n \"description\": \"\",\n \"status\": \"APPROVED\",\n \"name\": \"app1\"\n },\n {\n \"groupId\": \"\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"description\": null,\n \"status\": \"APPROVED\",\n \"name\": \"DefaultApplication\"\n }\n ],\n \"count\": 2,\n \"next\": \"\"\n}" summary: | Retrieve/Search applications @@ -686,9 +711,9 @@ paths: #----------------------------------------------------- post: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/applications\"" - x-wso2-request: "POST https://127.0.0.1:9443/api/am/store/v0.11/applications\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"throttlingTier\": \"Unlimited\",\n \"description\": \"sample app description\",\n \"name\": \"sampleapp\",\n \"callbackUrl\": \"http://my.server.com/callback\"\n}" - x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.11/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\nContent-Type: application/json\n\n{\n \"groupId\": null,\n \"callbackUrl\": \"http://my.server.com/callback\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"description\": \"sample app description\",\n \"status\": \"APPROVED\",\n \"name\": \"sampleapp\",\n \"keys\": []\n}" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/store/v0.12/applications\"" + x-wso2-request: "POST https://localhost:9443/api/am/store/v0.12/applications\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"throttlingTier\": \"Unlimited\",\n \"description\": \"sample app description\",\n \"name\": \"sampleapp\",\n \"callbackUrl\": \"http://my.server.com/callback\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.12/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\nContent-Type: application/json\n\n{\n \"groupId\": null,\n \"callbackUrl\": \"http://my.server.com/callback\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"description\": \"sample app description\",\n \"status\": \"APPROVED\",\n \"name\": \"sampleapp\",\n \"keys\": []\n}" summary: | Create a new application description: | @@ -754,9 +779,9 @@ paths: #----------------------------------------------------- get: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/store/v0.11/applications/896658a0-b4ee-4535-bbfa-806c894a4015\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/store/v0.12/applications/896658a0-b4ee-4535-bbfa-806c894a4015\"" x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/applications/896658a0-b4ee-4535-bbfa-806c894a4015 + GET https://localhost:9443/api/am/store/v0.12/applications/896658a0-b4ee-4535-bbfa-806c894a4015 Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"groupId\": \"\",\n \"callbackUrl\": null,\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Unlimited\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"description\": null,\n \"status\": \"APPROVED\",\n \"name\": \"DefaultApplication\",\n \"keys\": [ {\n \"consumerKey\": \"AVoREWiB16kY_GTIzscl40GYYZQa\",\n \"consumerSecret\": \"KXQxmS8W3xDvvJH4AfR6xrhKIeIa\",\n \"keyState\": \"COMPLETED\",\n \"keyType\": \"PRODUCTION\",\n \"supportedGrantTypes\": null,\n \"token\": {\n \"validityTime\": 3600,\n \"accessToken\": \"3887da6d111f0429c6dff47a46e87209\",\n \"tokenScopes\": [\n \"am_application_scope\",\n \"default\"\n ]\n }\n }]\n}" summary: | @@ -784,7 +809,7 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | @@ -794,7 +819,7 @@ paths: 304: description: | Not Modified. - Empty body because the client has already the latest version of the requested resource (Will be supported in future). + Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. @@ -813,8 +838,8 @@ paths: #----------------------------------------------------- put: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X PUT -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\"" - x-wso2-request: "PUT https://127.0.0.1:9443/api/am/store/v0.11/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"callbackUrl\": \"\",\n \"throttlingTier\": \"Bronze\",\n \"description\": \"sample app description updated\",\n \"name\": \"sampleapp\"\n}" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X PUT -d @data.json \"https://localhost:9443/api/am/store/v0.12/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\"" + x-wso2-request: "PUT https://localhost:9443/api/am/store/v0.12/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"callbackUrl\": \"\",\n \"throttlingTier\": \"Bronze\",\n \"description\": \"sample app description updated\",\n \"name\": \"sampleapp\"\n}" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"groupId\": null,\n \"callbackUrl\": \"\",\n \"subscriber\": \"admin\",\n \"throttlingTier\": \"Bronze\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"description\": \"sample app description updated\",\n \"status\": \"APPROVED\",\n \"name\": \"sampleapp\",\n \"keys\": []\n}" summary: | Update an application @@ -852,7 +877,7 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | @@ -874,7 +899,7 @@ paths: 412: description: | Precondition Failed. - The request has not been performed because one of the preconditions is not met (Will be supported in future). + The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' @@ -883,9 +908,9 @@ paths: #----------------------------------------------------- delete: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE \"https://127.0.0.1:9443/api/am/store/v0.11/applications/367a2361-8db5-4140-8133-c6c8dc7fa0c4\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE \"https://localhost:9443/api/am/store/v0.12/applications/367a2361-8db5-4140-8133-c6c8dc7fa0c4\"" x-wso2-request: | - DELETE https://127.0.0.1:9443/api/am/store/v0.11/applications/367a2361-8db5-4140-8133-c6c8dc7fa0c4 + DELETE https://localhost:9443/api/am/store/v0.12/applications/367a2361-8db5-4140-8133-c6c8dc7fa0c4 Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK" summary: | @@ -912,10 +937,126 @@ paths: 412: description: | Precondition Failed. - The request has not been performed because one of the preconditions is not met (Will be supported in future). + The request has not been performed because one of the preconditions is not met. + schema: + $ref: '#/definitions/Error' + +###################################################### +# The "Application Keys of a Given Type" resource APIs +###################################################### + '/applications/{applicationId}/keys/{keyType}': + +#----------------------------------------------------------- +# Retrieve key details of a given type (PRODUCTION/SANDBOX) +#----------------------------------------------------------- + get: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/store/v0.12/applications/896658a0-b4ee-4535-bbfa-806c894a4015/keys/PRODUCTION\"" + x-wso2-request: | + GET https://localhost:9443/api/am/store/v0.12/applications/896658a0-b4ee-4535-bbfa-806c894a4015/keys/PRODUCTION + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n {\n \"consumerKey\": \"QwEtRHd4NJkcFuRUfAT5af8XEEoa\",\n \"consumerSecret\": \"7Fairfeu321ENjOR9w2xgJl3i70a\",\n \"supportedGrantTypes\": [\n \"refresh_token\",\n \"urn:ietf:params:oauth:grant-type:saml2-bearer\",\n \"password\",\n \"client_credentials\",\n \"iwa:ntlm\"\n ],\n \"callbackUrl\": \"http://sample/com/callback\",\n \"keyState\": \"COMPLETED\",\n \"keyType\": \"PRODUCTION\"}\n" + summary: | + Get key details of a given type + description: | + This operation can be used to retrieve key details of an individual application specifying the key type in the URI. + parameters: + - $ref: '#/parameters/applicationId' + - $ref: '#/parameters/keyType' + - $ref: '#/parameters/groupId' + - $ref: '#/parameters/Accept' + tags: + - Application (Individual) + - Application Keys + responses: + 200: + description: | + OK. + Application key details returned. + schema: + $ref: '#/definitions/ApplicationKey' + headers: + Content-Type: + description: | + The content type of the body. + type: string + 404: + description: | + Not Found. + Requested application does not exist. + schema: + $ref: '#/definitions/Error' + 406: + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' + +#----------------------------------------------------- +# Update grant types and callback url of an application +#----------------------------------------------------- + put: + x-scope: apim:subscribe + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X PUT -d @data.json \"https://localhost:9443/api/am/store/v0.12/applications/c30f3a6e-ffa4-4ae7-afce-224d1f820524/keys/SANDBOX\"" + x-wso2-request: | + PUT https://localhost:9443/api/am/store/v0.12/applications/896658a0-b4ee-4535-bbfa-806c894a4015/keys/SANDBOX + Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 + { + "supportedGrantTypes": [ + "refresh_token", + "urn:ietf:params:oauth:grant-type:saml2-bearer", + "password", + "client_credentials", + "iwa:ntlm" + ], + "callbackUrl": "http://sample/com/callback" + } + x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n {\n \"consumerKey\": \"QwEtRHd4NJkcFuRUfAT5af8XEEoa\",\n \"consumerSecret\": \"7Fairfeu321ENjOR9w2xgJl3i70a\",\n \"supportedGrantTypes\": [\n \"refresh_token\",\n \"urn:ietf:params:oauth:grant-type:saml2-bearer\",\n \"password\",\n \"client_credentials\",\n \"iwa:ntlm\"\n ],\n \"callbackUrl\": \"http://sample/com/callback\",\n \"keyState\": \"COMPLETED\",\n \"keyType\": \"PRODUCTION\"}\n" + summary: | + Update grant types and callback url of an application + description: | + This operation can be used to update grant types and callback url of an application. (Consumer Key and Consumer Secret are ignored) Upon succesfull you will retrieve the updated key details as the response. + parameters: + - $ref: '#/parameters/applicationId' + - $ref: '#/parameters/keyType' + - in: body + name: body + description: | + Grant types/Callback URL update request object + required: true + schema: + $ref: '#/definitions/ApplicationKey' + tags: + - Application (Individual) + - Application Keys + responses: + 200: + description: | + Ok. + Grant types or/and callback url is/are updated. + schema: + $ref: '#/definitions/ApplicationKey' + 400: + description: | + Bad Request. + Invalid request or validation error + schema: + $ref: '#/definitions/Error' + 404: + description: | + Not Found. + The resource to be updated does not exist. + schema: + $ref: '#/definitions/Error' + 412: + description: | + Precondition Failed. + The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' + ###################################################### # The "Generate Keys" Processing Function resource API ###################################################### @@ -926,8 +1067,8 @@ paths: #----------------------------------------------------- post: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/applications/generate-keys?applicationId=c30f3a6e-ffa4-4ae7-afce-224d1f820524\"" - x-wso2-request: "POST https://127.0.0.1:9443/api/am/store/v0.11/applications/generate-keys?applicationId=c30f3a6e-ffa4-4ae7-afce-224d1f820524\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"validityTime\": \"3600\",\n \"keyType\": \"PRODUCTION\",\n \"accessAllowDomains\": [\"ALL\"\n ]\n}" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/store/v0.12/applications/generate-keys?applicationId=c30f3a6e-ffa4-4ae7-afce-224d1f820524\"" + x-wso2-request: "POST https://localhost:9443/api/am/store/v0.12/applications/generate-keys?applicationId=c30f3a6e-ffa4-4ae7-afce-224d1f820524\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"validityTime\": \"3600\",\n \"keyType\": \"PRODUCTION\",\n \"accessAllowDomains\": [\"ALL\"\n ]\n}" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"consumerSecret\": \"8V7DDKtKGtuG_9GDjaOJ5sijdX0a\",\n \"consumerKey\": \"LOFL8He72MSGVil4SS_bsh9O8MQa\",\n \"keyState\": \"APPROVED\",\n \"keyType\": \"PRODUCTION\",\n \"supportedGrantTypes\": [\n \"urn:ietf:params:oauth:grant-type:saml2-bearer\",\n \"iwa:ntlm\",\n \"refresh_token\",\n \"client_credentials\",\n \"password\"\n ],\n \"token\": {\n \"validityTime\": 3600,\n \"accessToken\": \"fd2cdc4906fbc162e033d57f85a71c21\",\n \"tokenScopes\": [\n \"am_application_scope\",\n \"default\"\n ]\n }\n}" summary: | Generate keys for application @@ -987,6 +1128,96 @@ paths: The request has not been performed because one of the preconditions is not met (Will be supported in future). schema: $ref: '#/definitions/Error' + '/applications/scopes/{applicationId}': + get: + x-scope: 'apim:subscribe' + x-wso2-request: |- + GET https://127.0.0.1:9443/api/am/store/v0.12/applications/scopes/896658a0-b4ee-4535-bbfa-806c894a4015 + Authorization: Beareraa0ddec1ac656744234477f20fafcb0d + x-wso2-curl: 'curl -k -H "Authorization: Bearer aa0ddec1ac656744234477f20fafcb0d" "https://127.0.0.1:9443/api/am/store/v0.12/applications/scopes/896658a0-b4ee-4535-bbfa-806c894a4015"' + x-wso2-response: |- + HTTP/1.1 200 OK + Content-Type: application/json + + { + "groupId": "", + "callbackUrl": null, + "subscriber": "admin", + "throttlingTier": "Unlimited", + "applicationId": "896658a0-b4ee-4535-bbfa-806c894a4015", + "description": null, + "status": "APPROVED", + "name": "DefaultApplication", + "keys": [ { + "consumerKey": "AVoREWiB16kY_GTIzscl40GYYZQa", + "consumerSecret": "KXQxmS8W3xDvvJH4AfR6xrhKIeIa", + "keyState": "COMPLETED", + "keyType": "PRODUCTION", + "supportedGrantTypes": null, + "token": { + "validityTime": 3600, + "accessToken": "3887da6d111f0429c6dff47a46e87209", + "tokenScopes": [ + "am_application_scope", + "default" + ] + } + }] + } + summary: | + Get scopes associated with a particular application based on subscribed APIs + description: | + Get scopes associated with a particular application based on subscribed APIs + parameters: + - $ref: '#/parameters/applicationId' + - $ref: '#/parameters/filterByUserRoles' + - $ref: '#/parameters/If-None-Match' + - $ref: '#/parameters/If-Modified-Since' + tags: + - Application (Individual) + responses: + '200': + description: | + OK. + Scope returned. + schema: + $ref: '#/definitions/ScopeList' + headers: + Content-Type: + description: | + The content type of the body. + type: string + ETag: + description: | + Entity Tag of the response resource. Used by caches, or in conditional requests. + type: string + Last-Modified: + description: | + Date and time the resource has been modifed the last time. + Used by caches, or in conditional reuquests. + type: string + '304': + description: | + Not Modified. + Empty body because the client has already the latest version of the requested resource. + '401': + description: | + Un authorized. + The user is not authorized to view the application . + schema: + $ref: '#/definitions/Error' + '404': + description: | + Not Found. + Requested application does not exist. + schema: + $ref: '#/definitions/Error' + '406': + description: | + Not Acceptable. + The requested media type is not supported + schema: + $ref: '#/definitions/Error' ###################################################### # The "Subscription Collection" resource APIs @@ -998,22 +1229,22 @@ paths: #----------------------------------------------------- get: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/store/v0.12/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed\"" x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed + GET https://localhost:9443/api/am/store/v0.12/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"tier\": \"Bronze\",\n \"subscriptionId\": \"03b8ef2b-5ae5-41f5-968e-52fa7fbd5d33\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"896658a0-b4ee-4535-bbfa-806c894a4015\",\n \"status\": \"UNBLOCKED\"\n },\n {\n \"tier\": \"Bronze\",\n \"subscriptionId\": \"5ed42650-9f5e-4dd4-94f3-3f09f1b17354\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"846118a5-3b25-4c22-a983-2d0278936f09\",\n \"status\": \"UNBLOCKED\"\n }\n ],\n \"count\": 2,\n \"next\": \"\"\n}" summary: | Get all subscriptions description: | This operation can be used to retrieve a list of subscriptions of the user associated with the provided access token. This operation is capable of - + 1. Retrieving applications which are subscibed to a specific API. - `GET https://127.0.0.1:9443/api/am/store/v0.11/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed` - + `GET https://localhost:9443/api/am/store/v0.12/subscriptions?apiId=c43a325c-260b-4302-81cb-768eafaa3aed` + 2. Retrieving APIs which are subscribed by a specific application. - `GET https://127.0.0.1:9443/api/am/store/v0.11/subscriptions?applicationId=c43a325c-260b-4302-81cb-768eafaa3aed` - + `GET https://localhost:9443/api/am/store/v0.12/subscriptions?applicationId=c43a325c-260b-4302-81cb-768eafaa3aed` + **IMPORTANT:** * It is mandatory to provide either **apiId** or **applicationId**. parameters: @@ -1058,9 +1289,9 @@ paths: #----------------------------------------------------- post: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions\"" - x-wso2-request: "POST https://127.0.0.1:9443/api/am/store/v0.11/subscriptions\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"c43a325c-260b-4302-81cb-768eafaa3aed\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\"\n}" - x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\nContent-Type: application/json\n\n{\n \"tier\": \"Gold\",\n \"subscriptionId\": \"5b65808c-cdf2-43e1-a695-de63e3ad0ae9\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"status\": \"UNBLOCKED\"\n}" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/store/v0.12/subscriptions\"" + x-wso2-request: "POST https://localhost:9443/api/am/store/v0.12/subscriptions\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"c43a325c-260b-4302-81cb-768eafaa3aed\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.12/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\nContent-Type: application/json\n\n{\n \"tier\": \"Gold\",\n \"subscriptionId\": \"5b65808c-cdf2-43e1-a695-de63e3ad0ae9\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"status\": \"UNBLOCKED\"\n}" summary: | Add a new subscription description: | @@ -1117,9 +1348,9 @@ paths: #----------------------------------------------------- post: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/multiple\"" - x-wso2-request: "POST https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/multiple\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"c43a325c-260b-4302-81cb-768eafaa3aed\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\"\n}" - x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\nContent-Type: application/json\n\n{\n \"tier\": \"Gold\",\n \"subscriptionId\": \"5b65808c-cdf2-43e1-a695-de63e3ad0ae9\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"status\": \"UNBLOCKED\"\n}" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X POST -d @data.json \"https://localhost:9443/api/am/store/v0.12/subscriptions/multiple\"" + x-wso2-request: "POST https://localhost:9443/api/am/store/v0.12/subscriptions/multiple\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\n\n{\n \"tier\": \"Gold\",\n \"apiIdentifier\": \"c43a325c-260b-4302-81cb-768eafaa3aed\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\"\n}" + x-wso2-response: "HTTP/1.1 201 Created\nLocation: https://localhost:9443/api/am/store/v0.12/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\nContent-Type: application/json\n\n{\n \"tier\": \"Gold\",\n \"subscriptionId\": \"5b65808c-cdf2-43e1-a695-de63e3ad0ae9\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"status\": \"UNBLOCKED\"\n}" summary: | Add new subscriptions description: | @@ -1143,9 +1374,9 @@ paths: OK. Successful response with the newly created objects as entity in the body. schema: - type: array + $ref: '#/definitions/Subscription' items: - $ref: '#/definitions/Subscription' + type: array headers: Content-Type: description: | @@ -1165,7 +1396,7 @@ paths: description: | Unsupported media type. The entity of the request was in a not supported format. - + ###################################################### # The "Individual Subscription" resource APIs ###################################################### @@ -1176,9 +1407,9 @@ paths: #----------------------------------------------------- get: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://localhost:9443/api/am/store/v0.12/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\"" x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9 + GET https://localhost:9443/api/am/store/v0.12/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9 Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"tier\": \"Gold\",\n \"subscriptionId\": \"5b65808c-cdf2-43e1-a695-de63e3ad0ae9\",\n \"apiIdentifier\": \"admin-PhoneVerification-2.0.0\",\n \"applicationId\": \"c30f3a6e-ffa4-4ae7-afce-224d1f820524\",\n \"status\": \"UNBLOCKED\"\n}" summary: | @@ -1205,7 +1436,7 @@ paths: type: string ETag: description: | - Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). + Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | @@ -1214,7 +1445,7 @@ paths: '304': description: | Not Modified. - Empty body because the client has already the latest version of the requested resource (Will be supported in future). + Empty body because the client has already the latest version of the requested resource. '404': description: | Not Found. @@ -1227,9 +1458,9 @@ paths: #----------------------------------------------------- delete: x-scope: apim:subscribe - x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE \"https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\"" + x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE \"https://localhost:9443/api/am/store/v0.12/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9\"" x-wso2-request: | - DELETE https://127.0.0.1:9443/api/am/store/v0.11/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9 + DELETE https://localhost:9443/api/am/store/v0.12/subscriptions/5b65808c-cdf2-43e1-a695-de63e3ad0ae9 x-wso2-response: "HTTP/1.1 200 OK" summary: | Remove a subscription @@ -1255,7 +1486,7 @@ paths: 412: description: | Precondition Failed. - The request has not been performed because one of the preconditions is not met (Will be supported in future). + The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' @@ -1268,15 +1499,18 @@ paths: # Retrieve the list of all available tiers #----------------------------------------------------- get: - x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/tiers/api\"" + x-wso2-curl: "curl \"https://localhost:9443/api/am/store/v0.12/tiers/api\"" x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/tiers/api + GET https://localhost:9443/api/am/store/v0.12/tiers/api + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/tiers/api" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 1,\n \"description\": \"Allows 1 request(s) per minute.\",\n \"name\": \"Bronze\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 20,\n \"description\": \"Allows 20 request(s) per minute.\",\n \"name\": \"Gold\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 5,\n \"description\": \"Allows 5 request(s) per minute.\",\n \"name\": \"Silver\",\n \"attributes\": {}\n },\n {\n \"unitTime\": 0,\n \"tierPlan\": null,\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 0,\n \"description\": \"Allows unlimited requests\",\n \"name\": \"Unlimited\",\n \"attributes\": {}\n }\n ],\n \"count\": 4,\n \"next\": \"\"\n}" summary: | Get available tiers description: | This operation can be used to retrieve all the tiers available for the provided tier level. Tier level should be specified as a path parameter and should be one of `api` and `application`. - + + `X-WSO2-Tenant` header can be used to retrive tiers that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. + **NOTE**: * API tiers are the ones that is available during subscription of an application to an API. Hence they are also called subscription tiers and are same as the subscription policies in Admin REST API. parameters: @@ -1326,14 +1560,17 @@ paths: # Retrieve a certain tier #----------------------------------------------------- get: - x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/tiers/api/Bronze\"" + x-wso2-curl: "curl \"https://localhost:9443/api/am/store/v0.12/tiers/api/Bronze\"" x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/tiers/api/Bronze + GET https://localhost:9443/api/am/store/v0.12/tiers/api/Bronze + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/tiers/api/Bronze" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"unitTime\": 60000,\n \"tierPlan\": \"FREE\",\n \"stopOnQuotaReach\": true,\n \"tierLevel\": \"api\",\n \"requestCount\": 1,\n \"description\": \"Allows 1 request(s) per minute.\",\n \"name\": \"Bronze\",\n \"attributes\": {}\n}" summary: | Get details of a tier description: | This operation can be used to retrieve details of a single tier by specifying the tier level and tier name. + + `X-WSO2-Tenant` header can be used to retrive tiers that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. parameters: - $ref: '#/parameters/tierName' - $ref: '#/parameters/tierLevel' @@ -1391,14 +1628,20 @@ paths: # Retrieve the list of tags qualifying under a search condition #----------------------------------------------------- get: - x-wso2-curl: "curl \"https://127.0.0.1:9443/api/am/store/v0.11/tags\"" + x-wso2-curl: "curl \"https://localhost:9443/api/am/store/v0.12/tags\"" x-wso2-request: | - GET https://127.0.0.1:9443/api/am/store/v0.11/tags + GET https://localhost:9443/api/am/store/v0.12/tags + x-wso2-curl-tenant: "curl -k -H \"X-WSO2-Tenant:test.com\" https://localhost:9443/api/am/store/v0.12/tags" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"weight\": 1,\n \"name\": \"mobile\"\n },\n {\n \"weight\": 1,\n \"name\": \"multimedia\"\n },\n {\n \"weight\": 1,\n \"name\": \"phone\"\n }\n ],\n \"count\": 3,\n \"next\": \"\"\n}" summary: | Get all tags description: | This operation can be used to retrieve a list of tags that are already added to APIs. + + `X-WSO2-Tenant` header can be used to retrive tags that belongs to a different tenant domain. If not specified super tenant will be used. If Authorization header is present in the request, the user's tenant associated with the access token will be used. + + **NOTE:** + * This operation does not require an Authorization header by default. But in order to see a restricted API's tags, you need to provide Authorization header. parameters: - $ref: '#/parameters/limit' - $ref: '#/parameters/offset' @@ -1461,11 +1704,12 @@ parameters: name: apiId in: path description: | - **API ID** consisting of the **UUID** of the API. + **API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. required: true type: string + x-encoded: true # API Identifier # Specified as part of the query string @@ -1473,11 +1717,12 @@ parameters: name: apiId in: query description: | - **API ID** consisting of the **UUID** of the API. + **API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. required: true type: string + x-encoded: true # API Identifier # Specified as part of the path expression @@ -1510,6 +1755,16 @@ parameters: required: true type: string +# Filter By user roles +# Specified as part of the query string + filterByUserRoles: + name: filterByUserRoles + in: query + description : | + Filter user by roles. + required : false + type: boolean + # Application Identifier # Specified as part of the query string applicationId-Q: @@ -1583,6 +1838,19 @@ parameters: default: 0 type: integer +# Application Key Type +# Specified as part of the path expression + keyType: + name: keyType + in: path + description: | + **Application Key Type** standing for the type of the keys (i.e. Production or Sandbox). + required: true + type: string + enum: + - PRODUCTION + - SANDBOX + # The HTTP Accept header Accept: name: Accept @@ -1609,7 +1877,7 @@ parameters: in: header description: | Validator for conditional requests; based on the ETag of the formerly retrieved - variant of the resourec. + variant of the resource. type : string # The HTTP If-Modified-Since header @@ -1619,7 +1887,7 @@ parameters: in: header description: | Validator for conditional requests; based on Last Modified header of the - formerly retrieved variant of the resource. + formerly retrieved variant of the resource (Will be supported in future). type: string # The HTTP If-Match header @@ -1637,7 +1905,7 @@ parameters: name: If-Unmodified-Since in: header description: | - Validator for conditional requests; based on Last Modified header. + Validator for conditional requests; based on Last Modified header (Will be supported in future). type: string ###################################################### @@ -1672,7 +1940,17 @@ definitions: type: array items: $ref: '#/definitions/APIInfo' - + pagination: + properties: + offset: + type: integer + example: 12 + limit: + type: integer + example: 25 + total: + type: integer + example: 1290 #----------------------------------------------------- # The API Info resource #----------------------------------------------------- @@ -1702,7 +1980,13 @@ definitions: status: type: string example: PUBLISHED - + thumbnailUri: + type: string + example: /apis/01234567-0123-0123-0123-012345678901/thumbnail + scopes: + type: array + items: + $ref: '#/definitions/ScopeInfo' #----------------------------------------------------- # The API resource #----------------------------------------------------- @@ -1723,15 +2007,19 @@ definitions: example: 01234567-0123-0123-0123-012345678901 name: type: string + description: Name of the API example: CalculatorAPI description: type: string + description: A brief description about the API example: A calculator API that supports basic operations context: type: string + description: A string that represents thecontext of the user's request example: CalculatorAPI version: type: string + description: The version of the API example: 1.0.0 provider: description: | @@ -1742,7 +2030,7 @@ definitions: description: | Swagger definition of the API which contains details about URI templates and scopes type: string - example: "{\"paths\":{\"/substract\":{\"get\":{\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"parameters\":[{\"name\":\"x\",\"required\":true,\"type\":\"string\",\"in\":\"query\"},{\"name\":\"y\",\"required\":true,\"type\":\"string\",\"in\":\"query\"}],\"responses\":{\"200\":{}}}},\"/add\":{\"get\":{\"x-auth-type\":\"Application & Application User\",\"x-throttling-tier\":\"Unlimited\",\"parameters\":[{\"name\":\"x\",\"required\":true,\"type\":\"string\",\"in\":\"query\"},{\"name\":\"y\",\"required\":true,\"type\":\"string\",\"in\":\"query\"}],\"responses\":{\"200\":{}}}}},\"swagger\":\"2.0\",\"info\":{\"title\":\"CalculatorAPI\",\"version\":\"1.0.0\"}}" + example: "{'paths':{'/substract':{'get':{'x-auth-type':'Application & Application User','x-throttling-tier':'Unlimited','parameters':[{'name':'x','required':true,'type':'string','in':'query'},{'name':'y','required':true,'type':'string','in':'query'}],'responses':{'200':{}}}},'/add':{'get':{'x-auth-type':'Application & Application User','x-throttling-tier':'Unlimited','parameters':[{'name':'x','required':true,'type':'string','in':'query'},{'name':'y','required':true,'type':'string','in':'query'}],'responses':{'200':{}}}}},'swagger':'2.0','info':{'title':'CalculatorAPI','version':'1.0.0'}}" wsdlUri: description: | WSDL URL if the API is based on a WSDL endpoint @@ -1750,6 +2038,7 @@ definitions: example: "http://www.webservicex.com/globalweather.asmx?wsdl" status: type: string + description: This describes in which status of the lifecycle the API is. example: PUBLISHED isDefaultVersion: type: boolean @@ -1763,17 +2052,26 @@ definitions: example: ["http","https"] tags: type: array + description: Search keywords related to the API items: type: string example: ["substract","add"] tiers: type: array + description: The subscription tiers selected for the particular API items: type: string example: ["Unlimited"] thumbnailUrl: type: string example: "" + additionalProperties: + description: | + Custom(user defined) properties of API + type: object + additionalProperties: + type: string + example: {} endpointURLs: type: array items: @@ -1789,11 +2087,11 @@ definitions: http: type: string description: HTTP environment URL - example: "http://192.168.56.1:8280/phoneverify/1.0.0" + example: "http://localhost:8280/phoneverify/1.0.0" https: type: string description: HTTPS environment URL - example: "https://192.168.56.1:8243/phoneverify/1.0.0" + example: "https://localhost:8243/phoneverify/1.0.0" businessInformation: properties: businessOwner: @@ -2062,7 +2360,8 @@ definitions: even if the request count exceeded within a unit time type: boolean example: true - + TierPermissions: + $ref: '#/definitions/TierPermissionInfo' #----------------------------------------------------- # The Subscription List resource #----------------------------------------------------- @@ -2103,13 +2402,16 @@ definitions: properties: subscriptionId: type: string - example: 01234567-0123-0123-0123-012345678901 + description: The UUID of the subscription + example: faae5fcc-cbae-40c4-bf43-89931630d313 applicationId: type: string - example: 01234567-0123-0123-0123-012345678901 + description: The UUID of the application + example: b3ade481-30b0-4b38-9a67-498a40873a6d apiIdentifier: type: string - example: 01234567-0123-0123-0123-012345678901 + description: The unique identifier of the API. + example: admin-PizzaShackAPI-1.0.0 tier: type: string example: Unlimited @@ -2123,6 +2425,7 @@ definitions: - REJECTED example: UNBLOCKED + #----------------------------------------------------- # The Tag resource #----------------------------------------------------- @@ -2244,29 +2547,37 @@ definitions: properties: consumerKey: type: string - description: Consumer key of the application + description: The consumer key associated with the application and identifying the client example: vYDoc9s7IgAFdkSyNDaswBX7ejoa consumerSecret: type: string - description: Consumer secret of the application + description: The client secret that is used to authenticate the client with the authentication server example: TIDlOFkpzB7WjufO3OJUhy1fsvAa supportedGrantTypes: type: array items: type: string - description: Supported grant types for the application + description: The grant types that are supported by the application example: ["client_credentials","password"] + callbackUrl: + type: string + description: Callback URL + example: "http://sample.com/callback/url" keyState: type: string - description: State of the key generation of the application + description: Describes the state of the key generation. example: APPROVED keyType: - description: Key type + description: Describes to which endpoint the key belongs type: string enum: - PRODUCTION - SANDBOX example: PRODUCTION + groupId: + type: string + description: Application group id (if any). + example: 02 token: $ref: '#/definitions/Token' @@ -2289,6 +2600,12 @@ definitions: validityTime: type: string example: 3600 + supportedGrantTypes: + type: array + items: + type: string + description: The grant types that are supported by the application + example: ["client_credentials","password"] callbackUrl: type: string description: Callback URL @@ -2306,6 +2623,71 @@ definitions: description: Allowed scopes for the access token example: ["am_application_scope","default"] +#----------------------------------------------------- +# Scope Info resource +#----------------------------------------------------- + ScopeInfo: + title: API Scope info object with scope details + properties: + key: + type: string + example: admin_scope + name: + type: string + example: admin scope + roles: + type: array + items: + type: string + description: Allowed roles for the scope + example: ["manager","developer"] + +#----------------------------------------------------- +# Tier Permission Info resource +#----------------------------------------------------- + TierPermissionInfo: + title: Tier Permission info object with tier permission details + properties: + type: + type: string + enum: + - allow + - deny + roles: + type: array + items: + type: string + description: roles for this permission + example: ["manager","developer"] + + ApplicationScope : + title: Scope of the APIs + properties: + key: + type: string + description: Key of scope + example: apim:fileread + name: + type: string + description: Name of the scope + example: apim file read + roles : + type: string + description: Roles scope is bounded to + example : admin, role1 + description: + type: string + description: Description of the scope + + ScopeList : + title : Scope list + properties: + list : + type : array + items: + $ref: '#/definitions/ApplicationScope' + + #----------------------------------------------------- # END-OF-FILE #----------------------------------------------------- \ No newline at end of file diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java index 4bb54d5ac15..2fe35e472bf 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java @@ -50,10 +50,10 @@ public class APIPublisherServiceImpl implements APIPublisherService { PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService() .getPublisherClient(); API api = getAPI(apiConfig); - APIList apiList = publisherClient.getApi().apisGet(100, 0, "name:" + api.getName(), CONTENT_TYPE, null); + APIList apiList = publisherClient.getApis().apisGet(100, 0, "name:" + api.getName(), CONTENT_TYPE, null); if (!isExist(api, apiList)) { - api = publisherClient.getApi().apisPost(api, CONTENT_TYPE); + api = publisherClient.getApi().apisPost(api, CONTENT_TYPE, null); if (CREATED_STATUS.equals(api.getStatus())) { publisherClient.getApi().apisChangeLifecyclePost(PUBLISH_ACTION, api.getId(), null, null, null); } diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceTest.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceTest.java index 87d27c5e524..46fcb412e10 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceTest.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceTest.java @@ -27,7 +27,7 @@ import org.wso2.carbon.apimgt.integration.client.OAuthRequestInterceptor; import org.wso2.carbon.apimgt.integration.client.model.OAuthApplication; import org.wso2.carbon.apimgt.integration.client.publisher.PublisherClient; import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService; -import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APIsApi; +import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APIIndividualApi; import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.API; import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.APIInfo; import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.APIList; @@ -77,11 +77,11 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService(). getPublisherClient(); doReturn(publisherClient).when(integrationClientService).getPublisherClient(); - APIsApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); + APIIndividualApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); doReturn(apIsApi).when(publisherClient).getApi(); API api = Mockito.mock(API.class, Mockito.CALLS_REAL_METHODS); api.setStatus("CREATED"); - doReturn(api).when(apIsApi).apisPost(Mockito.any(), Mockito.anyString()); + doReturn(api).when(apIsApi).apisPost(Mockito.any(), Mockito.anyString(), Mockito.anyString()); apiPublisherService.publishAPI(apiConfig); } @@ -97,18 +97,18 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService(). getPublisherClient(); doReturn(publisherClient).when(integrationClientService).getPublisherClient(); - APIsApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); + APIIndividualApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); doReturn(apIsApi).when(publisherClient).getApi(); API api = Mockito.mock(API.class, Mockito.CALLS_REAL_METHODS); api.setStatus("CREATED"); - doReturn(api).when(apIsApi).apisPost(Mockito.any(), Mockito.anyString()); + doReturn(api).when(apIsApi).apisPost(Mockito.any(), Mockito.anyString(), Mockito.anyString()); APIList apiList = Mockito.mock(APIList.class, Mockito.CALLS_REAL_METHODS); APIInfo apiInfo = new APIInfo(); List apiInfoList = new ArrayList<>(); apiInfoList.add(apiInfo); apiList.list(apiInfoList); - doReturn(apiList).when(apIsApi).apisGet(Mockito.anyInt(), Mockito.anyInt(), - Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); +// doReturn(apiList).when(apIsApi).apisGet(Mockito.anyInt(), Mockito.anyInt(), +// Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); doReturn(api).when(apIsApi).apisApiIdPut(Mockito.anyString(), Mockito.any(), Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); apiPublisherService.publishAPI(apiConfig); @@ -126,11 +126,11 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService(). getPublisherClient(); doReturn(publisherClient).when(integrationClientService).getPublisherClient(); - APIsApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); + APIIndividualApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); doReturn(apIsApi).when(publisherClient).getApi(); API api = Mockito.mock(API.class, Mockito.CALLS_REAL_METHODS); api.setStatus("CREATED"); - doReturn(api).when(apIsApi).apisPost(Mockito.any(), Mockito.anyString()); + doReturn(api).when(apIsApi).apisPost(Mockito.any(), Mockito.anyString(), Mockito.anyString()); APIList apiList = Mockito.mock(APIList.class, Mockito.CALLS_REAL_METHODS); APIInfo apiInfo = new APIInfo(); apiInfo.setName("testAPI-3"); @@ -139,8 +139,8 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { List apiInfoList = new ArrayList<>(); apiInfoList.add(apiInfo); apiList.list(apiInfoList); - doReturn(apiList).when(apIsApi).apisGet(Mockito.anyInt(), Mockito.anyInt(), - Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); +// doReturn(apiList).when(apIsApi).apisGet(Mockito.anyInt(), Mockito.anyInt(), +// Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); doReturn(api).when(apIsApi).apisApiIdPut(Mockito.anyString(), Mockito.any(), Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); apiConfig.setSharedWithAllTenants(false); diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/BaseAPIPublisherTest.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/BaseAPIPublisherTest.java index 229d11a9702..f8624ca6964 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/BaseAPIPublisherTest.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/BaseAPIPublisherTest.java @@ -26,7 +26,7 @@ import org.wso2.carbon.apimgt.integration.client.IntegrationClientServiceImpl; import org.wso2.carbon.apimgt.integration.client.internal.APIIntegrationClientDataHolder; import org.wso2.carbon.apimgt.integration.client.publisher.PublisherClient; import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService; -import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APIsApi; +import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APIIndividualApi; import org.wso2.carbon.apimgt.webapp.publisher.internal.APIPublisherDataHolder; import org.wso2.carbon.apimgt.webapp.publisher.utils.MockApi; import org.wso2.carbon.base.MultitenantConstants; @@ -87,7 +87,7 @@ public abstract class BaseAPIPublisherTest { PublisherClient publisherClient = Mockito.mock(PublisherClient.class, Mockito.CALLS_REAL_METHODS); doReturn(publisherClient).when(integrationClientService).getPublisherClient(); - APIsApi api = new MockApi(); + APIIndividualApi api = new MockApi(); Field field = PublisherClient.class.getDeclaredField("api"); field.setAccessible(true); field.set(publisherClient, api); diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockApi.java index f9e22de3e8d..12e84722532 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockApi.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockApi.java @@ -17,9 +17,9 @@ */ package org.wso2.carbon.apimgt.webapp.publisher.utils; -import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APIsApi; +import feign.Param; +import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APIIndividualApi; import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.API; -import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.APIList; import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.FileInfo; import java.io.File; @@ -27,7 +27,7 @@ import java.io.File; /** * Class to create MockApi for testing. */ -public class MockApi implements APIsApi { +public class MockApi implements APIIndividualApi { @Override public void apisApiIdDelete(String apiId, String ifMatch, String ifUnmodifiedSince) { @@ -75,12 +75,17 @@ public class MockApi implements APIsApi { } @Override - public APIList apisGet(Integer limit, Integer offset, String query, String accept, String ifNoneMatch) { + public API apisPost(API body, @Param("contentType") String contentType, @Param("authorization") String authorization) { return null; } - @Override - public API apisPost(API body, String contentType) { - return new API(); - } +// @Override +// public APIList apisGet(Integer limit, Integer offset, String query, String accept, String ifNoneMatch) { +// return null; +// } +// +// @Override +// public API apisPost(API body, String contentType) { +// return new API(); +// } } From 6f19ca3e205355caa1cc0837134e339bdc0870f5 Mon Sep 17 00:00:00 2001 From: charitha Date: Wed, 14 Mar 2018 15:13:27 +0530 Subject: [PATCH 3/3] Fixed test failures --- .../publisher/APIPublisherServiceTest.java | 26 +- .../publisher/BaseAPIPublisherTest.java | 4 +- .../publisher/utils/MockAPICollectionApi.java | 32 + ...MockApi.java => MockAPIIndividualApi.java} | 13 +- .../carbon-home/repository/conf/carbon.xml | 656 ++++++++++++++++++ pom.xml | 2 +- 6 files changed, 711 insertions(+), 22 deletions(-) create mode 100644 components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockAPICollectionApi.java rename components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/{MockApi.java => MockAPIIndividualApi.java} (87%) create mode 100644 components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/resources/carbon-home/repository/conf/carbon.xml diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceTest.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceTest.java index 46fcb412e10..f5f38676535 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceTest.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceTest.java @@ -27,6 +27,7 @@ import org.wso2.carbon.apimgt.integration.client.OAuthRequestInterceptor; import org.wso2.carbon.apimgt.integration.client.model.OAuthApplication; import org.wso2.carbon.apimgt.integration.client.publisher.PublisherClient; import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService; +import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APICollectionApi; import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APIIndividualApi; import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.API; import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.APIInfo; @@ -35,7 +36,8 @@ import org.wso2.carbon.apimgt.webapp.publisher.config.WebappPublisherConfig; import org.wso2.carbon.apimgt.webapp.publisher.dto.ApiScope; import org.wso2.carbon.apimgt.webapp.publisher.exception.APIManagerPublisherException; import org.wso2.carbon.apimgt.webapp.publisher.internal.APIPublisherDataHolder; -import org.wso2.carbon.apimgt.webapp.publisher.utils.MockApi; +import org.wso2.carbon.apimgt.webapp.publisher.utils.MockAPICollectionApi; +import org.wso2.carbon.apimgt.webapp.publisher.utils.MockAPIIndividualApi; import org.wso2.carbon.apimgt.webapp.publisher.utils.TestUtils; import java.lang.reflect.Field; @@ -61,6 +63,12 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { APIManagerPublisherException { APIConfig apiConfig = new APIConfig(); setApiConfigs(apiConfig, "testAPI-0"); + PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService(). + getPublisherClient(); + APICollectionApi collectionApi = Mockito.mock(MockAPICollectionApi.class, Mockito.CALLS_REAL_METHODS); + APIIndividualApi apIsApi = Mockito.mock(MockAPIIndividualApi.class, Mockito.CALLS_REAL_METHODS); + doReturn(collectionApi).when(publisherClient).getApis(); + doReturn(apIsApi).when(publisherClient).getApi(); apiPublisherService.publishAPI(apiConfig); } @@ -77,7 +85,9 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService(). getPublisherClient(); doReturn(publisherClient).when(integrationClientService).getPublisherClient(); - APIIndividualApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); + APIIndividualApi apIsApi = Mockito.mock(MockAPIIndividualApi.class, Mockito.CALLS_REAL_METHODS); + APICollectionApi collectionApi = Mockito.mock(MockAPICollectionApi.class, Mockito.CALLS_REAL_METHODS); + doReturn(collectionApi).when(publisherClient).getApis(); doReturn(apIsApi).when(publisherClient).getApi(); API api = Mockito.mock(API.class, Mockito.CALLS_REAL_METHODS); api.setStatus("CREATED"); @@ -97,7 +107,9 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService(). getPublisherClient(); doReturn(publisherClient).when(integrationClientService).getPublisherClient(); - APIIndividualApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); + APIIndividualApi apIsApi = Mockito.mock(MockAPIIndividualApi.class, Mockito.CALLS_REAL_METHODS); + APICollectionApi collectionApi = Mockito.mock(MockAPICollectionApi.class, Mockito.CALLS_REAL_METHODS); + doReturn(collectionApi).when(publisherClient).getApis(); doReturn(apIsApi).when(publisherClient).getApi(); API api = Mockito.mock(API.class, Mockito.CALLS_REAL_METHODS); api.setStatus("CREATED"); @@ -107,8 +119,6 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { List apiInfoList = new ArrayList<>(); apiInfoList.add(apiInfo); apiList.list(apiInfoList); -// doReturn(apiList).when(apIsApi).apisGet(Mockito.anyInt(), Mockito.anyInt(), -// Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); doReturn(api).when(apIsApi).apisApiIdPut(Mockito.anyString(), Mockito.any(), Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); apiPublisherService.publishAPI(apiConfig); @@ -126,7 +136,9 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService(). getPublisherClient(); doReturn(publisherClient).when(integrationClientService).getPublisherClient(); - APIIndividualApi apIsApi = Mockito.mock(MockApi.class, Mockito.CALLS_REAL_METHODS); + APIIndividualApi apIsApi = Mockito.mock(MockAPIIndividualApi.class, Mockito.CALLS_REAL_METHODS); + APICollectionApi collectionApi = Mockito.mock(MockAPICollectionApi.class, Mockito.CALLS_REAL_METHODS); + doReturn(collectionApi).when(publisherClient).getApis(); doReturn(apIsApi).when(publisherClient).getApi(); API api = Mockito.mock(API.class, Mockito.CALLS_REAL_METHODS); api.setStatus("CREATED"); @@ -139,8 +151,6 @@ public class APIPublisherServiceTest extends BaseAPIPublisherTest { List apiInfoList = new ArrayList<>(); apiInfoList.add(apiInfo); apiList.list(apiInfoList); -// doReturn(apiList).when(apIsApi).apisGet(Mockito.anyInt(), Mockito.anyInt(), -// Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); doReturn(api).when(apIsApi).apisApiIdPut(Mockito.anyString(), Mockito.any(), Mockito.anyString(), Mockito.anyString(), Mockito.anyString()); apiConfig.setSharedWithAllTenants(false); diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/BaseAPIPublisherTest.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/BaseAPIPublisherTest.java index f8624ca6964..dd2d111c340 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/BaseAPIPublisherTest.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/BaseAPIPublisherTest.java @@ -28,7 +28,7 @@ import org.wso2.carbon.apimgt.integration.client.publisher.PublisherClient; import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService; import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APIIndividualApi; import org.wso2.carbon.apimgt.webapp.publisher.internal.APIPublisherDataHolder; -import org.wso2.carbon.apimgt.webapp.publisher.utils.MockApi; +import org.wso2.carbon.apimgt.webapp.publisher.utils.MockAPIIndividualApi; import org.wso2.carbon.base.MultitenantConstants; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.internal.OSGiDataHolder; @@ -87,7 +87,7 @@ public abstract class BaseAPIPublisherTest { PublisherClient publisherClient = Mockito.mock(PublisherClient.class, Mockito.CALLS_REAL_METHODS); doReturn(publisherClient).when(integrationClientService).getPublisherClient(); - APIIndividualApi api = new MockApi(); + APIIndividualApi api = new MockAPIIndividualApi(); Field field = PublisherClient.class.getDeclaredField("api"); field.setAccessible(true); field.set(publisherClient, api); diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockAPICollectionApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockAPICollectionApi.java new file mode 100644 index 00000000000..f13c43a953f --- /dev/null +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockAPICollectionApi.java @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +* +* WSO2 Inc. licenses this file to you under the Apache License, +* Version 2.0 (the "License"); you may not use this file except +* in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +package org.wso2.carbon.apimgt.webapp.publisher.utils; + +import org.wso2.carbon.apimgt.integration.generated.client.publisher.api.APICollectionApi; +import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.APIList; + +/** + * Class to create MockApi for testing. + */ +public class MockAPICollectionApi implements APICollectionApi { + + @Override + public APIList apisGet(Integer limit, Integer offset, String query, String accept, String ifNoneMatch) { + return null; + } +} diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockApi.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockAPIIndividualApi.java similarity index 87% rename from components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockApi.java rename to components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockAPIIndividualApi.java index 12e84722532..9e8260a8517 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockApi.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/java/org/wso2/carbon/apimgt/webapp/publisher/utils/MockAPIIndividualApi.java @@ -27,7 +27,7 @@ import java.io.File; /** * Class to create MockApi for testing. */ -public class MockApi implements APIIndividualApi { +public class MockAPIIndividualApi implements APIIndividualApi { @Override public void apisApiIdDelete(String apiId, String ifMatch, String ifUnmodifiedSince) { @@ -76,16 +76,7 @@ public class MockApi implements APIIndividualApi { @Override public API apisPost(API body, @Param("contentType") String contentType, @Param("authorization") String authorization) { - return null; + return new API(); } -// @Override -// public APIList apisGet(Integer limit, Integer offset, String query, String accept, String ifNoneMatch) { -// return null; -// } -// -// @Override -// public API apisPost(API body, String contentType) { -// return new API(); -// } } diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/resources/carbon-home/repository/conf/carbon.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/resources/carbon-home/repository/conf/carbon.xml new file mode 100644 index 00000000000..f24ee57be23 --- /dev/null +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/test/resources/carbon-home/repository/conf/carbon.xml @@ -0,0 +1,656 @@ + + + + + + + + + ${product.name} + + + ${product.key} + + + ${product.version} + + + + + + + + + local:/${carbon.context}/services/ + + + + + + + ${default.server.role} + + + + + + + org.wso2.carbon + + + / + + + + + + + + + 15 + + + + + + + + + 0 + + + + + 9999 + + 11111 + + + + + + 10389 + + 8000 + + + + + + 10500 + + + + + + + org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory + + + + + + + + + java + + + + + + + + + + false + + + false + + + 600 + + + + false + + + + + + + + 30 + + + + + + + + + 15 + + + + + + ${carbon.home}/repository/deployment/server/ + + + 15 + + + ${carbon.home}/repository/conf/axis2/axis2.xml + + + 30000 + + + ${carbon.home}/repository/deployment/client/ + + ${carbon.home}/repository/conf/axis2/axis2_client.xml + + true + + + + + + + + + + admin + Default Administrator Role + + + user + Default User Role + + + + + + + + + + + + ${carbon.home}/repository/resources/security/wso2carbon.jks + + JKS + + wso2carbon + + wso2carbon + + wso2carbon + + + + + + ${carbon.home}/repository/resources/security/client-truststore.jks + + JKS + + wso2carbon + + + + + + + + + + + + + + + + + + + UserManager + + + false + + + + + + + ${carbon.home}/tmp/work + + + + + + true + + + 10 + + + 30 + + + + + + 100 + + + + keystore + certificate + * + + org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor + + + + + jarZip + + org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor + + + + dbs + + org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor + + + + tools + + org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor + + + + toolsAny + + org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor + + + + + + + info + org.wso2.carbon.core.transports.util.InfoProcessor + + + wsdl + org.wso2.carbon.core.transports.util.Wsdl11Processor + + + wsdl2 + org.wso2.carbon.core.transports.util.Wsdl20Processor + + + xsd + org.wso2.carbon.core.transports.util.XsdProcessor + + + + + + false + false + true + svn + http://svnrepo.example.com/repos/ + username + password + true + + + + + + + + + + + + + + + ${require.carbon.servlet} + + + + + true + + + + + + + default repository + ${p2.repo.url} + + + + + + + + true + + + + + + true + + diff --git a/pom.xml b/pom.xml index 75fd1206a54..bbe66916777 100644 --- a/pom.xml +++ b/pom.xml @@ -1860,7 +1860,7 @@ 2.2.1 6.1.1 - 4.4.25 + 4.4.26 [4.4.0, 5.0.0) 1.5.4 1.3