Re: [Dev] API Manager - deleting an API

2015-04-18 Thread Chalitha Kulathunga
Hi Uvindra,

Thanks for the information. I'm developing a tenant deletion tool which can
remove tenants internally without user authentication. As a part of that, I
have to delete all the APIs which belongs to a particular tenant.

Regards,

On Fri, Apr 17, 2015 at 4:54 PM, Uvindra Dias Jayasinha uvin...@wso2.com
wrote:

 Hi Chalitha,

 You should first remove any existing subscriptions[1] before you delete a
 given API.

 What is your use case for deleting APIs without user authentication?

 [1]
 https://docs.wso2.com/display/AM180/Store+APIs#StoreAPIs-RemoveaSubscription


 On 17 April 2015 at 14:45, Chalitha Kulathunga chalit...@wso2.com wrote:

 Hi Yvonne  Harsha,

 @Yvonne - yes, I'm going to delete subscribed APIs as well. If it can
 cause any issues, please let me know.

 @Harsha - I will try the suggested approach.

 Thank you  Regards,
 Chalitha

 On Fri, Apr 17, 2015 at 1:02 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Chalitha,

 You should be able to get the instance of the APIProvider as follow

 apiProvider = APIManagerFactory.getInstance().getAPIProvider(loggedUser);

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIManagerFactory.java

 Thanks,
 Harsha

 On Fri, Apr 17, 2015 at 12:42 PM, Yvonne Wickramasinghe yvo...@wso2.com
  wrote:

 Hi Chalitha,

 Just a quick question. Are we going to allow deleting subscribed APIs
 as well?

 Regards,

 On Fri, Apr 17, 2015 at 12:33 PM, Chalitha Kulathunga 
 chalit...@wso2.com wrote:

 Hi Thilini  Harsha,

 @Thilini - Remove an API needs the user to be authenticated. I'm
 looking for a solution that doesn't require user authentication. The idea
 is to delete APIs which belongs to a particular tenant from the out side,
 through an existing or a modified method call.

 @Harsha - sorry I was wrong previously, the impl package is exported
 but the  *APIProviderImpl.java *class cannot be accessed out side the
 package since it is not public. The class also contains the following
 description:

 /**
  * This class provides the core API provider functionality. It is 
 implemented in a very
  * self-contained and 'pure' manner, without taking requirements like 
 security into account,
  * which are subject to frequent change. Due to this 'pure' nature and 
 the significance of
  * the class to the overall API management functionality, the visibility 
 of the class has
  * been reduced to package level. This means we can still use it for 
 internal purposes and
  * possibly even extend it, but it's totally off the limits of the users. 
 Users wishing to
  * programmatically access this functionality should use one of the 
 extensions of this
  * class which is visible to them. These extensions may add additional 
 features like
  * security to this class.
  */


 Thank you very much for your suggestions.
 Regards,





 On Thu, Apr 16, 2015 at 8:04 PM, Harsha Kumara hars...@wso2.com
 wrote:

 Hi Chalitha,

 Which version that you tried to use of apimgt.impl dependency?
 According to [1] and [2], the impl package has exported. You won't be 
 able
 to use the APIMgtDAO, because deleting API involve deleting resources 
 from
 registry as well.

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml#L214
 [2] -
 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml

 Thanks,
 Harsha

 On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga 
 chalit...@wso2.com wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API
 and all its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also
 not exported in the pom.xml. Therefore, it cannot be accessed from the
 outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package
  also provides a similar but public method however I'm not certain 
 whether
 it is suitable for my purpose. Could someone please recommend me a 
 standard
 way to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581
 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --

 *Yvonne Wickramasinghe*
 Senior Product Manager; WSO2, Inc.; http://wso2.com
 email: yvo...@wso2.com; mobile (Sri Lanka): +94 

Re: [Dev] API Manager - deleting an API

2015-04-17 Thread Chalitha Kulathunga
Hi Thilini  Harsha,

@Thilini - Remove an API needs the user to be authenticated. I'm looking
for a solution that doesn't require user authentication. The idea is to
delete APIs which belongs to a particular tenant from the out side, through
an existing or a modified method call.

@Harsha - sorry I was wrong previously, the impl package is exported but
the  *APIProviderImpl.java *class cannot be accessed out side the package
since it is not public. The class also contains the following description:

/**
 * This class provides the core API provider functionality. It is
implemented in a very
 * self-contained and 'pure' manner, without taking requirements like
security into account,
 * which are subject to frequent change. Due to this 'pure' nature and
the significance of
 * the class to the overall API management functionality, the
visibility of the class has
 * been reduced to package level. This means we can still use it for
internal purposes and
 * possibly even extend it, but it's totally off the limits of the
users. Users wishing to
 * programmatically access this functionality should use one of the
extensions of this
 * class which is visible to them. These extensions may add additional
features like
 * security to this class.
 */


Thank you very much for your suggestions.
Regards,





On Thu, Apr 16, 2015 at 8:04 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Chalitha,

 Which version that you tried to use of apimgt.impl dependency? According
 to [1] and [2], the impl package has exported. You won't be able to use the
 APIMgtDAO, because deleting API involve deleting resources from registry as
 well.

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml#L214
 [2] -
 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml

 Thanks,
 Harsha

 On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga chalit...@wso2.com
 wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API and
 all its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also not
 exported in the pom.xml. Therefore, it cannot be accessed from the outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package  also
 provides a similar but public method however I'm not certain whether it is
 suitable for my purpose. Could someone please recommend me a standard way
 to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




-- 
*Chalitha Sanyuja Kulathunga*
*Software Engineer*
WSO2 Inc.; http://wso2.com
email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager - deleting an API

2015-04-17 Thread Chalitha Kulathunga
Hi Thilini  Harsha,

@Thilini - Remove an API needs the user to be authenticated. I'm looking
for a solution that doesn't require user authentication. The idea is to
delete APIs which belongs to a particular tenant from the out side, through
an existing or a modified method call.

@Harsha - sorry I was wrong previously, the impl package is exported but
the  *APIProviderImpl.java *class cannot be accessed out side the package
since it is not public. The class also contains the following description:

/**
 * This class provides the core API provider functionality. It is
implemented in a very
 * self-contained and 'pure' manner, without taking requirements like
security into account,
 * which are subject to frequent change. Due to this 'pure' nature and
the significance of
 * the class to the overall API management functionality, the
visibility of the class has
 * been reduced to package level. This means we can still use it for
internal purposes and
 * possibly even extend it, but it's totally off the limits of the
users. Users wishing to
 * programmatically access this functionality should use one of the
extensions of this
 * class which is visible to them. These extensions may add additional
features like
 * security to this class.
 */


Thank you very much for your suggestions.
Regards,





On Thu, Apr 16, 2015 at 8:04 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Chalitha,

 Which version that you tried to use of apimgt.impl dependency? According
 to [1] and [2], the impl package has exported. You won't be able to use the
 APIMgtDAO, because deleting API involve deleting resources from registry as
 well.

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml#L214
 [2] -
 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml

 Thanks,
 Harsha

 On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga chalit...@wso2.com
 wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API and
 all its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also not
 exported in the pom.xml. Therefore, it cannot be accessed from the outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package  also
 provides a similar but public method however I'm not certain whether it is
 suitable for my purpose. Could someone please recommend me a standard way
 to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




-- 
*Chalitha Sanyuja Kulathunga*
*Software Engineer*
WSO2 Inc.; http://wso2.com
email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager - deleting an API

2015-04-17 Thread Harsha Kumara
Hi Chalitha,

You should be able to get the instance of the APIProvider as follow

apiProvider = APIManagerFactory.getInstance().getAPIProvider(loggedUser);

[1] -
https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIManagerFactory.java

Thanks,
Harsha

On Fri, Apr 17, 2015 at 12:42 PM, Yvonne Wickramasinghe yvo...@wso2.com
wrote:

 Hi Chalitha,

 Just a quick question. Are we going to allow deleting subscribed APIs as
 well?

 Regards,

 On Fri, Apr 17, 2015 at 12:33 PM, Chalitha Kulathunga chalit...@wso2.com
 wrote:

 Hi Thilini  Harsha,

 @Thilini - Remove an API needs the user to be authenticated. I'm
 looking for a solution that doesn't require user authentication. The idea
 is to delete APIs which belongs to a particular tenant from the out side,
 through an existing or a modified method call.

 @Harsha - sorry I was wrong previously, the impl package is exported but
 the  *APIProviderImpl.java *class cannot be accessed out side the
 package since it is not public. The class also contains the following
 description:

 /**
  * This class provides the core API provider functionality. It is 
 implemented in a very
  * self-contained and 'pure' manner, without taking requirements like 
 security into account,
  * which are subject to frequent change. Due to this 'pure' nature and the 
 significance of
  * the class to the overall API management functionality, the visibility of 
 the class has
  * been reduced to package level. This means we can still use it for 
 internal purposes and
  * possibly even extend it, but it's totally off the limits of the users. 
 Users wishing to
  * programmatically access this functionality should use one of the 
 extensions of this
  * class which is visible to them. These extensions may add additional 
 features like
  * security to this class.
  */


 Thank you very much for your suggestions.
 Regards,





 On Thu, Apr 16, 2015 at 8:04 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Chalitha,

 Which version that you tried to use of apimgt.impl dependency? According
 to [1] and [2], the impl package has exported. You won't be able to use the
 APIMgtDAO, because deleting API involve deleting resources from registry as
 well.

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml#L214
 [2] -
 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml

 Thanks,
 Harsha

 On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga chalit...@wso2.com
  wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API and
 all its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also not
 exported in the pom.xml. Therefore, it cannot be accessed from the outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package
  also provides a similar but public method however I'm not certain whether
 it is suitable for my purpose. Could someone please recommend me a standard
 way to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --

 *Yvonne Wickramasinghe*
 Senior Product Manager; WSO2, Inc.; http://wso2.com
 email: yvo...@wso2.com; mobile (Sri Lanka): +94 71 516 3732




-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager - deleting an API

2015-04-17 Thread Yvonne Wickramasinghe
Hi Chalitha,

Just a quick question. Are we going to allow deleting subscribed APIs as
well?

Regards,

On Fri, Apr 17, 2015 at 12:33 PM, Chalitha Kulathunga chalit...@wso2.com
wrote:

 Hi Thilini  Harsha,

 @Thilini - Remove an API needs the user to be authenticated. I'm looking
 for a solution that doesn't require user authentication. The idea is to
 delete APIs which belongs to a particular tenant from the out side, through
 an existing or a modified method call.

 @Harsha - sorry I was wrong previously, the impl package is exported but
 the  *APIProviderImpl.java *class cannot be accessed out side the package
 since it is not public. The class also contains the following description:

 /**
  * This class provides the core API provider functionality. It is implemented 
 in a very
  * self-contained and 'pure' manner, without taking requirements like 
 security into account,
  * which are subject to frequent change. Due to this 'pure' nature and the 
 significance of
  * the class to the overall API management functionality, the visibility of 
 the class has
  * been reduced to package level. This means we can still use it for internal 
 purposes and
  * possibly even extend it, but it's totally off the limits of the users. 
 Users wishing to
  * programmatically access this functionality should use one of the 
 extensions of this
  * class which is visible to them. These extensions may add additional 
 features like
  * security to this class.
  */


 Thank you very much for your suggestions.
 Regards,





 On Thu, Apr 16, 2015 at 8:04 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Chalitha,

 Which version that you tried to use of apimgt.impl dependency? According
 to [1] and [2], the impl package has exported. You won't be able to use the
 APIMgtDAO, because deleting API involve deleting resources from registry as
 well.

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml#L214
 [2] -
 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml

 Thanks,
 Harsha

 On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga chalit...@wso2.com
 wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API and
 all its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also not
 exported in the pom.xml. Therefore, it cannot be accessed from the outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package  also
 provides a similar but public method however I'm not certain whether it is
 suitable for my purpose. Could someone please recommend me a standard way
 to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 

*Yvonne Wickramasinghe*
Senior Product Manager; WSO2, Inc.; http://wso2.com
email: yvo...@wso2.com; mobile (Sri Lanka): +94 71 516 3732
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager - deleting an API

2015-04-17 Thread Chalitha Kulathunga
Hi Yvonne  Harsha,

@Yvonne - yes, I'm going to delete subscribed APIs as well. If it can cause
any issues, please let me know.

@Harsha - I will try the suggested approach.

Thank you  Regards,
Chalitha

On Fri, Apr 17, 2015 at 1:02 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Chalitha,

 You should be able to get the instance of the APIProvider as follow

 apiProvider = APIManagerFactory.getInstance().getAPIProvider(loggedUser);

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIManagerFactory.java

 Thanks,
 Harsha

 On Fri, Apr 17, 2015 at 12:42 PM, Yvonne Wickramasinghe yvo...@wso2.com
 wrote:

 Hi Chalitha,

 Just a quick question. Are we going to allow deleting subscribed APIs as
 well?

 Regards,

 On Fri, Apr 17, 2015 at 12:33 PM, Chalitha Kulathunga chalit...@wso2.com
  wrote:

 Hi Thilini  Harsha,

 @Thilini - Remove an API needs the user to be authenticated. I'm
 looking for a solution that doesn't require user authentication. The idea
 is to delete APIs which belongs to a particular tenant from the out side,
 through an existing or a modified method call.

 @Harsha - sorry I was wrong previously, the impl package is exported but
 the  *APIProviderImpl.java *class cannot be accessed out side the
 package since it is not public. The class also contains the following
 description:

 /**
  * This class provides the core API provider functionality. It is 
 implemented in a very
  * self-contained and 'pure' manner, without taking requirements like 
 security into account,
  * which are subject to frequent change. Due to this 'pure' nature and the 
 significance of
  * the class to the overall API management functionality, the visibility of 
 the class has
  * been reduced to package level. This means we can still use it for 
 internal purposes and
  * possibly even extend it, but it's totally off the limits of the users. 
 Users wishing to
  * programmatically access this functionality should use one of the 
 extensions of this
  * class which is visible to them. These extensions may add additional 
 features like
  * security to this class.
  */


 Thank you very much for your suggestions.
 Regards,





 On Thu, Apr 16, 2015 at 8:04 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Chalitha,

 Which version that you tried to use of apimgt.impl dependency?
 According to [1] and [2], the impl package has exported. You won't be able
 to use the APIMgtDAO, because deleting API involve deleting resources from
 registry as well.

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml#L214
 [2] -
 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml

 Thanks,
 Harsha

 On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga 
 chalit...@wso2.com wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API and
 all its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also
 not exported in the pom.xml. Therefore, it cannot be accessed from the
 outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package
  also provides a similar but public method however I'm not certain whether
 it is suitable for my purpose. Could someone please recommend me a 
 standard
 way to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --

 *Yvonne Wickramasinghe*
 Senior Product Manager; WSO2, Inc.; http://wso2.com
 email: yvo...@wso2.com; mobile (Sri Lanka): +94 71 516 3732




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




-- 
*Chalitha Sanyuja Kulathunga*
*Software Engineer*
WSO2 Inc.; http://wso2.com
email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager - deleting an API

2015-04-17 Thread Uvindra Dias Jayasinha
Hi Chalitha,

You should first remove any existing subscriptions[1] before you delete a
given API.

What is your use case for deleting APIs without user authentication?

[1]
https://docs.wso2.com/display/AM180/Store+APIs#StoreAPIs-RemoveaSubscription


On 17 April 2015 at 14:45, Chalitha Kulathunga chalit...@wso2.com wrote:

 Hi Yvonne  Harsha,

 @Yvonne - yes, I'm going to delete subscribed APIs as well. If it can
 cause any issues, please let me know.

 @Harsha - I will try the suggested approach.

 Thank you  Regards,
 Chalitha

 On Fri, Apr 17, 2015 at 1:02 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Chalitha,

 You should be able to get the instance of the APIProvider as follow

 apiProvider = APIManagerFactory.getInstance().getAPIProvider(loggedUser);

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIManagerFactory.java

 Thanks,
 Harsha

 On Fri, Apr 17, 2015 at 12:42 PM, Yvonne Wickramasinghe yvo...@wso2.com
 wrote:

 Hi Chalitha,

 Just a quick question. Are we going to allow deleting subscribed APIs as
 well?

 Regards,

 On Fri, Apr 17, 2015 at 12:33 PM, Chalitha Kulathunga 
 chalit...@wso2.com wrote:

 Hi Thilini  Harsha,

 @Thilini - Remove an API needs the user to be authenticated. I'm
 looking for a solution that doesn't require user authentication. The idea
 is to delete APIs which belongs to a particular tenant from the out side,
 through an existing or a modified method call.

 @Harsha - sorry I was wrong previously, the impl package is exported
 but the  *APIProviderImpl.java *class cannot be accessed out side the
 package since it is not public. The class also contains the following
 description:

 /**
  * This class provides the core API provider functionality. It is 
 implemented in a very
  * self-contained and 'pure' manner, without taking requirements like 
 security into account,
  * which are subject to frequent change. Due to this 'pure' nature and the 
 significance of
  * the class to the overall API management functionality, the visibility 
 of the class has
  * been reduced to package level. This means we can still use it for 
 internal purposes and
  * possibly even extend it, but it's totally off the limits of the users. 
 Users wishing to
  * programmatically access this functionality should use one of the 
 extensions of this
  * class which is visible to them. These extensions may add additional 
 features like
  * security to this class.
  */


 Thank you very much for your suggestions.
 Regards,





 On Thu, Apr 16, 2015 at 8:04 PM, Harsha Kumara hars...@wso2.com
 wrote:

 Hi Chalitha,

 Which version that you tried to use of apimgt.impl dependency?
 According to [1] and [2], the impl package has exported. You won't be able
 to use the APIMgtDAO, because deleting API involve deleting resources from
 registry as well.

 [1] -
 https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml#L214
 [2] -
 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml

 Thanks,
 Harsha

 On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga 
 chalit...@wso2.com wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API
 and all its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also
 not exported in the pom.xml. Therefore, it cannot be accessed from the
 outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package
  also provides a similar but public method however I'm not certain 
 whether
 it is suitable for my purpose. Could someone please recommend me a 
 standard
 way to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --

 *Yvonne Wickramasinghe*
 Senior Product Manager; WSO2, Inc.; http://wso2.com
 email: yvo...@wso2.com; mobile (Sri Lanka): +94 71 516 3732




 --
 Harsha Kumara
 Software Engineer, WSO2 Inc.
 Mobile: +94775505618
 Blog:harshcreationz.blogspot.com




 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev 

Re: [Dev] API Manager - deleting an API

2015-04-16 Thread Thilini Cooray
Hi Chalitha,

You can remove an API with all its data using an API call. Please refer
Remove an API section in [1].
It internally calls deleteAPI() in APIProviderImpl.java

Please check whether this can resolve your problem.

[1] https://docs.wso2.com/display/AM180/Publisher+APIs

Thank you.

On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga chalit...@wso2.com
wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API and all
 its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also not
 exported in the pom.xml. Therefore, it cannot be accessed from the outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package  also
 provides a similar but public method however I'm not certain whether it is
 suitable for my purpose. Could someone please recommend me a standard way
 to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Best Regards,

*Thilini Cooray*
Software Engineer
Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
E-mail : thili...@wso2.com

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager - deleting an API

2015-04-16 Thread Harsha Kumara
Hi Chalitha,

Which version that you tried to use of apimgt.impl dependency? According to
[1] and [2], the impl package has exported. You won't be able to use the
APIMgtDAO, because deleting API involve deleting resources from registry as
well.

[1] -
https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml#L214
[2] -
https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml

Thanks,
Harsha

On Thu, Apr 16, 2015 at 7:08 PM, Chalitha Kulathunga chalit...@wso2.com
wrote:

 Hi all,

 I'm looking for a proper way(methods) to *delete an published API and all
 its data* in WSO2 API Manager.

 The *deleteAPI* method available in *APIProviderImpl.java* class in
 org.wso2.carbon.apimgt.impl package(bundle) is not public and also not
 exported in the pom.xml. Therefore, it cannot be accessed from the outside.

 *APIMgtDAO.java* class in org.wso2.carbon.apimgt.impl.dao package  also
 provides a similar but public method however I'm not certain whether it is
 suitable for my purpose. Could someone please recommend me a standard way
 to delete an API.


 Thanks  Regards

 --
 *Chalitha Sanyuja Kulathunga*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: chalit...@wso2.com cell: +94 77 5927581 %2B94%2077%207779495

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev