Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-04-21 Thread Naduni Pamudika
Hi All,

I have tested the CLI and released *API Manager Tooling 1.0.0* (refer [1])
which is compatible with API Manager 2.2.0.

[1] https://github.com/wso2/product-apim-tooling/releases/tag/v1.0.0

Thanks,
Naduni

On Fri, Apr 20, 2018 at 11:26 AM, Naduni Pamudika  wrote:

> Hi Dinusha,
>
> On Fri, Apr 20, 2018 at 11:10 AM, Dinusha Dissanayake 
> wrote:
>
>> Hi Naduni,
>>
>> There has been a issue reported w.r.t import export CLI[1]. You might
>> want to reconsider that when you are testing the tool.
>>
>> Thanks for pointing this out. I noticed the same when testing the tool
> and it has been fixed now in [1].
>
> [1] https://github.com/wso2/product-apim-tooling/pull/22
>
> Thanks,
> Naduni
>
>> Thanks,
>> DinushaD.
>>
>> [1] https://github.com/wso2/product-apim-tooling/issues/20
>>
>> On Wed, Apr 18, 2018 at 8:14 PM, Naduni Pamudika  wrote:
>>
>>> Hi All,
>>>
>>> I have started testing the CLI for Import and Export Applications and
>>> APIs (Following the docs [1] and [2]). As an initial step, I have modified
>>> the CLI and the README to the latest API Manager version (API Manager
>>> 2.2.0) in [3] and built the packs for all the platforms (which will be
>>> uploading to the relevant doc spaces). While testing, I'll modify/fix if
>>> there are any issues in the documentation as well. Will update the thread
>>> with the progress.
>>>
>>> [1] https://docs.wso2.com/display/AM2xx/Migrating+Applications+t
>>> o+a+Different+Environment
>>> [2] https://docs.wso2.com/display/AM2xx/Migrating+the+APIs+t
>>> o+a+Different+Environment
>>> [3] https://github.com/wso2/product-apim-tooling/pull/21
>>>
>>> Thanks,
>>> Naduni
>>>
>>> On Wed, Feb 28, 2018 at 11:11 AM, Randilu Soysa 
>>> wrote:
>>>




 *Hi everyone,I have completed the process of introducing new commands
 to the import-export CLI tool successfully.  Find the finalized set of
 commands below with the sample responses, thank you for all the insights
 and suggestions you’ve provided! Exports an Application from a desired
 environmentCommandsexport-app Flags Required -n, --name string Name of the
 Application to be exported -o, --owner string Owner of the Application to
 be exported -e, --environment string Environment to which the Application
 should be exported Optional -u, --username string Username -p, --password
 string Password -h, --help Help for export-app -k, --insecure Allow
 connections to SSL endpoints without certs --verbose Enable verbose mode
 apimcli export-app (--name  --owner
  --environment
 ) [flags] Examples:
 apimcli export-app -n SampleApp -o admin -e dev apimcli export-app -n
 SampleApp -o admin -e prod Sample Response: Succesfully exported
 Application! Find the exported Application at
 /home/user/.wso2apimcli/exported/apps/dev/admin_sampleApp.zip
 Imports
 an Application to a desired environmentCommandsimport-app Flags Required
 -f, --file string Name of the Application to be imported -e, --environment
 string Environment from the which the Application should be imported
 (default "default") Optional -s, --skipSubscriptions Skips subscriptions of
 the Application -o, --owner string Name of the target Owner of the
 Application as desired by the Importer -r, --preserveOwner Preserves app
 owner from the original Environment -u, --username string Username -p,
 --password string Password -h, --help Help for import-app -k, --insecure
 Allow connections to SSL endpoints without certs --verbose Enable verbose
 mode apimcli import-app (--file  --environment
 ) [flags] Examples:
 apimcli import-app -f qa/sampleApp.zip -e dev apimcli Import App -f
 staging/sampleApp.zip -e prod -o testUser -u admin -p admin apimcli
 import-app -f qa/sampleApp.zip --preserveOwner --skipSubscriptions -e
 staging Sample Response: ZipFilePath:
 /home/user/.wso2apimcli/exported/apps/staging/admin_sampleApp.zip
 Succesfully imported Application!
 Display
 a list of Applications in an environment specific to an ownerCommandslist
 apps Flags Required -e, --environment Environment to be searched -o,
 --owner string Owner of the Application Optional -u, --username Username
 -p, --password Password -h, --help Help for list apps Examples: apimcli
 list apps -e dev -o admin apimcli list apps -e staging -o sampleUser -u
 admin -p 123456 Sample Response: Environment: dev No. of Applications: 3
 +--+---+---+--+--+
 | ID | NAME | OWNER | STATUS | GROUP-ID |
 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-04-19 Thread Naduni Pamudika
Hi Dinusha,

On Fri, Apr 20, 2018 at 11:10 AM, Dinusha Dissanayake 
wrote:

> Hi Naduni,
>
> There has been a issue reported w.r.t import export CLI[1]. You might want
> to reconsider that when you are testing the tool.
>
> Thanks for pointing this out. I noticed the same when testing the tool and
it has been fixed now in [1].

[1] https://github.com/wso2/product-apim-tooling/pull/22

Thanks,
Naduni

> Thanks,
> DinushaD.
>
> [1] https://github.com/wso2/product-apim-tooling/issues/20
>
> On Wed, Apr 18, 2018 at 8:14 PM, Naduni Pamudika  wrote:
>
>> Hi All,
>>
>> I have started testing the CLI for Import and Export Applications and
>> APIs (Following the docs [1] and [2]). As an initial step, I have modified
>> the CLI and the README to the latest API Manager version (API Manager
>> 2.2.0) in [3] and built the packs for all the platforms (which will be
>> uploading to the relevant doc spaces). While testing, I'll modify/fix if
>> there are any issues in the documentation as well. Will update the thread
>> with the progress.
>>
>> [1] https://docs.wso2.com/display/AM2xx/Migrating+Applications+t
>> o+a+Different+Environment
>> [2] https://docs.wso2.com/display/AM2xx/Migrating+the+APIs+t
>> o+a+Different+Environment
>> [3] https://github.com/wso2/product-apim-tooling/pull/21
>>
>> Thanks,
>> Naduni
>>
>> On Wed, Feb 28, 2018 at 11:11 AM, Randilu Soysa  wrote:
>>
>>>
>>>
>>>
>>>
>>> *Hi everyone,I have completed the process of introducing new commands to
>>> the import-export CLI tool successfully.  Find the finalized set of
>>> commands below with the sample responses, thank you for all the insights
>>> and suggestions you’ve provided! Exports an Application from a desired
>>> environmentCommandsexport-app Flags Required -n, --name string Name of the
>>> Application to be exported -o, --owner string Owner of the Application to
>>> be exported -e, --environment string Environment to which the Application
>>> should be exported Optional -u, --username string Username -p, --password
>>> string Password -h, --help Help for export-app -k, --insecure Allow
>>> connections to SSL endpoints without certs --verbose Enable verbose mode
>>> apimcli export-app (--name  --owner
>>>  --environment
>>> ) [flags] Examples:
>>> apimcli export-app -n SampleApp -o admin -e dev apimcli export-app -n
>>> SampleApp -o admin -e prod Sample Response: Succesfully exported
>>> Application! Find the exported Application at
>>> /home/user/.wso2apimcli/exported/apps/dev/admin_sampleApp.zip
>>> Imports
>>> an Application to a desired environmentCommandsimport-app Flags Required
>>> -f, --file string Name of the Application to be imported -e, --environment
>>> string Environment from the which the Application should be imported
>>> (default "default") Optional -s, --skipSubscriptions Skips subscriptions of
>>> the Application -o, --owner string Name of the target Owner of the
>>> Application as desired by the Importer -r, --preserveOwner Preserves app
>>> owner from the original Environment -u, --username string Username -p,
>>> --password string Password -h, --help Help for import-app -k, --insecure
>>> Allow connections to SSL endpoints without certs --verbose Enable verbose
>>> mode apimcli import-app (--file  --environment
>>> ) [flags] Examples:
>>> apimcli import-app -f qa/sampleApp.zip -e dev apimcli Import App -f
>>> staging/sampleApp.zip -e prod -o testUser -u admin -p admin apimcli
>>> import-app -f qa/sampleApp.zip --preserveOwner --skipSubscriptions -e
>>> staging Sample Response: ZipFilePath:
>>> /home/user/.wso2apimcli/exported/apps/staging/admin_sampleApp.zip
>>> Succesfully imported Application!
>>> Display
>>> a list of Applications in an environment specific to an ownerCommandslist
>>> apps Flags Required -e, --environment Environment to be searched -o,
>>> --owner string Owner of the Application Optional -u, --username Username
>>> -p, --password Password -h, --help Help for list apps Examples: apimcli
>>> list apps -e dev -o admin apimcli list apps -e staging -o sampleUser -u
>>> admin -p 123456 Sample Response: Environment: dev No. of Applications: 3
>>> +--+---+---+--+--+
>>> | ID | NAME | OWNER | STATUS | GROUP-ID |
>>> +--+---+---+--+--+
>>> | 0e09806c-65bb-4114-b483-3f7521e51a70 | adminApp1 | admin | APPROVED | | |
>>> d2b2a966-97e6-40da-9f73-7202d6c2bf9b | sampleApp | admin | APPROVED | | |
>>> 2817069d-ce62-410c-9f10-9f3910912bee | sharedApp | admin | APPROVED |
>>> testGrp |
>>> +--+---+---+--+--+
>>> *
>>>
>>>
>>> On Thu, Jan 25, 2018 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-04-19 Thread Dinusha Dissanayake
Hi Naduni,

There has been a issue reported w.r.t import export CLI[1]. You might want
to reconsider that when you are testing the tool.

Thanks,
DinushaD.

[1] https://github.com/wso2/product-apim-tooling/issues/20

On Wed, Apr 18, 2018 at 8:14 PM, Naduni Pamudika  wrote:

> Hi All,
>
> I have started testing the CLI for Import and Export Applications and APIs
> (Following the docs [1] and [2]). As an initial step, I have modified the
> CLI and the README to the latest API Manager version (API Manager 2.2.0) in
> [3] and built the packs for all the platforms (which will be uploading to
> the relevant doc spaces). While testing, I'll modify/fix if there are any
> issues in the documentation as well. Will update the thread with the
> progress.
>
> [1] https://docs.wso2.com/display/AM2xx/Migrating+Applications+t
> o+a+Different+Environment
> [2] https://docs.wso2.com/display/AM2xx/Migrating+the+APIs+
> to+a+Different+Environment
> [3] https://github.com/wso2/product-apim-tooling/pull/21
>
> Thanks,
> Naduni
>
> On Wed, Feb 28, 2018 at 11:11 AM, Randilu Soysa  wrote:
>
>>
>>
>>
>>
>> *Hi everyone,I have completed the process of introducing new commands to
>> the import-export CLI tool successfully.  Find the finalized set of
>> commands below with the sample responses, thank you for all the insights
>> and suggestions you’ve provided! Exports an Application from a desired
>> environmentCommandsexport-app Flags Required -n, --name string Name of the
>> Application to be exported -o, --owner string Owner of the Application to
>> be exported -e, --environment string Environment to which the Application
>> should be exported Optional -u, --username string Username -p, --password
>> string Password -h, --help Help for export-app -k, --insecure Allow
>> connections to SSL endpoints without certs --verbose Enable verbose mode
>> apimcli export-app (--name  --owner
>>  --environment
>> ) [flags] Examples:
>> apimcli export-app -n SampleApp -o admin -e dev apimcli export-app -n
>> SampleApp -o admin -e prod Sample Response: Succesfully exported
>> Application! Find the exported Application at
>> /home/user/.wso2apimcli/exported/apps/dev/admin_sampleApp.zip
>> Imports
>> an Application to a desired environmentCommandsimport-app Flags Required
>> -f, --file string Name of the Application to be imported -e, --environment
>> string Environment from the which the Application should be imported
>> (default "default") Optional -s, --skipSubscriptions Skips subscriptions of
>> the Application -o, --owner string Name of the target Owner of the
>> Application as desired by the Importer -r, --preserveOwner Preserves app
>> owner from the original Environment -u, --username string Username -p,
>> --password string Password -h, --help Help for import-app -k, --insecure
>> Allow connections to SSL endpoints without certs --verbose Enable verbose
>> mode apimcli import-app (--file  --environment
>> ) [flags] Examples:
>> apimcli import-app -f qa/sampleApp.zip -e dev apimcli Import App -f
>> staging/sampleApp.zip -e prod -o testUser -u admin -p admin apimcli
>> import-app -f qa/sampleApp.zip --preserveOwner --skipSubscriptions -e
>> staging Sample Response: ZipFilePath:
>> /home/user/.wso2apimcli/exported/apps/staging/admin_sampleApp.zip
>> Succesfully imported Application!
>> Display
>> a list of Applications in an environment specific to an ownerCommandslist
>> apps Flags Required -e, --environment Environment to be searched -o,
>> --owner string Owner of the Application Optional -u, --username Username
>> -p, --password Password -h, --help Help for list apps Examples: apimcli
>> list apps -e dev -o admin apimcli list apps -e staging -o sampleUser -u
>> admin -p 123456 Sample Response: Environment: dev No. of Applications: 3
>> +--+---+---+--+--+
>> | ID | NAME | OWNER | STATUS | GROUP-ID |
>> +--+---+---+--+--+
>> | 0e09806c-65bb-4114-b483-3f7521e51a70 | adminApp1 | admin | APPROVED | | |
>> d2b2a966-97e6-40da-9f73-7202d6c2bf9b | sampleApp | admin | APPROVED | | |
>> 2817069d-ce62-410c-9f10-9f3910912bee | sharedApp | admin | APPROVED |
>> testGrp |
>> +--+---+---+--+--+
>> *
>>
>>
>> On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:
>>
>>> Hi everyone,
>>>
>>> I’m working on a project to introduce commands to provide application
>>> import export support for the import-export-cli for APIM 2.x. I am planning
>>> to introduce commands in order to list available applications of a specific
>>> user, export an application from a desired environment and 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-04-18 Thread Naduni Pamudika
Hi All,

I have started testing the CLI for Import and Export Applications and APIs
(Following the docs [1] and [2]). As an initial step, I have modified the
CLI and the README to the latest API Manager version (API Manager 2.2.0) in
[3] and built the packs for all the platforms (which will be uploading to
the relevant doc spaces). While testing, I'll modify/fix if there are any
issues in the documentation as well. Will update the thread with the
progress.

[1]
https://docs.wso2.com/display/AM2xx/Migrating+Applications+to+a+Different+Environment
[2]
https://docs.wso2.com/display/AM2xx/Migrating+the+APIs+to+a+Different+Environment
[3] https://github.com/wso2/product-apim-tooling/pull/21

Thanks,
Naduni

On Wed, Feb 28, 2018 at 11:11 AM, Randilu Soysa  wrote:

>
>
>
>
> *Hi everyone,I have completed the process of introducing new commands to
> the import-export CLI tool successfully.  Find the finalized set of
> commands below with the sample responses, thank you for all the insights
> and suggestions you’ve provided! Exports an Application from a desired
> environmentCommandsexport-app Flags Required -n, --name string Name of the
> Application to be exported -o, --owner string Owner of the Application to
> be exported -e, --environment string Environment to which the Application
> should be exported Optional -u, --username string Username -p, --password
> string Password -h, --help Help for export-app -k, --insecure Allow
> connections to SSL endpoints without certs --verbose Enable verbose mode
> apimcli export-app (--name  --owner
>  --environment
> ) [flags] Examples:
> apimcli export-app -n SampleApp -o admin -e dev apimcli export-app -n
> SampleApp -o admin -e prod Sample Response: Succesfully exported
> Application! Find the exported Application at
> /home/user/.wso2apimcli/exported/apps/dev/admin_sampleApp.zip
> Imports
> an Application to a desired environmentCommandsimport-app Flags Required
> -f, --file string Name of the Application to be imported -e, --environment
> string Environment from the which the Application should be imported
> (default "default") Optional -s, --skipSubscriptions Skips subscriptions of
> the Application -o, --owner string Name of the target Owner of the
> Application as desired by the Importer -r, --preserveOwner Preserves app
> owner from the original Environment -u, --username string Username -p,
> --password string Password -h, --help Help for import-app -k, --insecure
> Allow connections to SSL endpoints without certs --verbose Enable verbose
> mode apimcli import-app (--file  --environment
> ) [flags] Examples:
> apimcli import-app -f qa/sampleApp.zip -e dev apimcli Import App -f
> staging/sampleApp.zip -e prod -o testUser -u admin -p admin apimcli
> import-app -f qa/sampleApp.zip --preserveOwner --skipSubscriptions -e
> staging Sample Response: ZipFilePath:
> /home/user/.wso2apimcli/exported/apps/staging/admin_sampleApp.zip
> Succesfully imported Application!
> Display
> a list of Applications in an environment specific to an ownerCommandslist
> apps Flags Required -e, --environment Environment to be searched -o,
> --owner string Owner of the Application Optional -u, --username Username
> -p, --password Password -h, --help Help for list apps Examples: apimcli
> list apps -e dev -o admin apimcli list apps -e staging -o sampleUser -u
> admin -p 123456 Sample Response: Environment: dev No. of Applications: 3
> +--+---+---+--+--+
> | ID | NAME | OWNER | STATUS | GROUP-ID |
> +--+---+---+--+--+
> | 0e09806c-65bb-4114-b483-3f7521e51a70 | adminApp1 | admin | APPROVED | | |
> d2b2a966-97e6-40da-9f73-7202d6c2bf9b | sampleApp | admin | APPROVED | | |
> 2817069d-ce62-410c-9f10-9f3910912bee | sharedApp | admin | APPROVED |
> testGrp |
> +--+---+---+--+--+
> *
>
>
> On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:
>
>> Hi everyone,
>>
>> I’m working on a project to introduce commands to provide application
>> import export support for the import-export-cli for APIM 2.x. I am planning
>> to introduce commands in order to list available applications of a specific
>> user, export an application from a desired environment and import an
>> application to a desired environment.
>>
>>
>> The commands are as follows,
>>
>>
>> Exports an Application from a desired environment
>>
>> Commands
>>
>> export-app
>>
>> Flags
>>   Required
>> -n, --name string  Name of the Application to be exported
>> -i, --uuid string  UUID of the Application to be exported
>> -e, --environment 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-02-27 Thread Randilu Soysa
*Hi everyone,I have completed the process of introducing new commands to
the import-export CLI tool successfully.  Find the finalized set of
commands below with the sample responses, thank you for all the insights
and suggestions you’ve provided! Exports an Application from a desired
environmentCommandsexport-app Flags Required -n, --name string Name of the
Application to be exported -o, --owner string Owner of the Application to
be exported -e, --environment string Environment to which the Application
should be exported Optional -u, --username string Username -p, --password
string Password -h, --help Help for export-app -k, --insecure Allow
connections to SSL endpoints without certs --verbose Enable verbose mode
apimcli export-app (--name  --owner
 --environment
) [flags] Examples:
apimcli export-app -n SampleApp -o admin -e dev apimcli export-app -n
SampleApp -o admin -e prod Sample Response: Succesfully exported
Application! Find the exported Application at
/home/user/.wso2apimcli/exported/apps/dev/admin_sampleApp.zip
Imports
an Application to a desired environmentCommandsimport-app Flags Required
-f, --file string Name of the Application to be imported -e, --environment
string Environment from the which the Application should be imported
(default "default") Optional -s, --skipSubscriptions Skips subscriptions of
the Application -o, --owner string Name of the target Owner of the
Application as desired by the Importer -r, --preserveOwner Preserves app
owner from the original Environment -u, --username string Username -p,
--password string Password -h, --help Help for import-app -k, --insecure
Allow connections to SSL endpoints without certs --verbose Enable verbose
mode apimcli import-app (--file  --environment
) [flags] Examples:
apimcli import-app -f qa/sampleApp.zip -e dev apimcli Import App -f
staging/sampleApp.zip -e prod -o testUser -u admin -p admin apimcli
import-app -f qa/sampleApp.zip --preserveOwner --skipSubscriptions -e
staging Sample Response: ZipFilePath:
/home/user/.wso2apimcli/exported/apps/staging/admin_sampleApp.zip
Succesfully imported Application!
Display
a list of Applications in an environment specific to an ownerCommandslist
apps Flags Required -e, --environment Environment to be searched -o,
--owner string Owner of the Application Optional -u, --username Username
-p, --password Password -h, --help Help for list apps Examples: apimcli
list apps -e dev -o admin apimcli list apps -e staging -o sampleUser -u
admin -p 123456 Sample Response: Environment: dev No. of Applications: 3
+--+---+---+--+--+
| ID | NAME | OWNER | STATUS | GROUP-ID |
+--+---+---+--+--+
| 0e09806c-65bb-4114-b483-3f7521e51a70 | adminApp1 | admin | APPROVED | | |
d2b2a966-97e6-40da-9f73-7202d6c2bf9b | sampleApp | admin | APPROVED | | |
2817069d-ce62-410c-9f10-9f3910912bee | sharedApp | admin | APPROVED |
testGrp |
+--+---+---+--+--+
*


On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:

> Hi everyone,
>
> I’m working on a project to introduce commands to provide application
> import export support for the import-export-cli for APIM 2.x. I am planning
> to introduce commands in order to list available applications of a specific
> user, export an application from a desired environment and import an
> application to a desired environment.
>
>
> The commands are as follows,
>
>
> Exports an Application from a desired environment
>
> Commands
>
> export-app
>
> Flags
>   Required
> -n, --name string  Name of the Application to be exported
> -i, --uuid string  UUID of the Application to be exported
> -e, --environment string   Environment from which the Application 
> should be exported
>   Optional
> -p, --password string  Password
> -u, --username string  Username
>
> -k, --insecure Allow connections to SSL endpoints without 
> certs
> --verbose  Enable verbose mode
>
> apimcli export-app (--name  --uuid 
>  --environment 
> ) [flags]
>
> Examples:
>
> apimcli export-app -n SampleApp 9f6affe2-4c97-4817-bded-717f8b01eee8 
> -e dev
> apimcli export-app -n SampleApp 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f 
> -e prod
>
>
>
> Imports
> an Application to a desired environment
>
> Commands
>
> import-app
>
> Flags
> Required
>   -f, --file string  Name of the Application to be imported
>   -e, --environment 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-02-05 Thread Chamila Adhikarinayake
Hi

Shall we add a command to get the current version of the CLI tool? It would
be usefull to identify which version some one is using in-order to identify
any issues, etc.

Chamila.

On Mon, Jan 29, 2018 at 9:10 PM, Randilu Soysa  wrote:

> Adding Sample Responses, Exports an Application from a desired environment
>
> Commands
>
> export-app
>
> Flags
>   Required
> -n, --name string  Name of the Application to be exported
> -i, --uuid string  UUID of the Application to be exported
> -e, --environment string   Environment to which the Application 
> should be exported
>   Optional
> -u, --username string  Username
> -p, --password string  Password
>
> -k, --insecure Allow connections to SSL endpoints without 
> certs
> --verbose  Enable verbose mode
>
> apimcli export-app (--name  --uuid 
>  --environment 
> ) [flags]
>
> Examples:
>
> apimcli export-app -n SampleApp 9f6affe2-4c97-4817-bded-717f8b01eee8 
> -e dev
> apimcli export-app -n SampleApp 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f 
> -e prod
>
>
> Sample Response:
>
> Succesfully exported Application!
> Find the exported Application at 
> /home/user/.wso2apimcli/exported/dev/admin_sampleApp.zip
>
>
>
> Imports
> an Application to a desired environment
>
> Commands
>
> import-app
>
> Flags
> Required
>   -f, --file string  Name of the Application to be imported
>   -e, --environment string   Environment from the which the 
> Application should be imported (default "default")
> Optional
>   -s, --addSubscriptions Adds subscriptions of the Application
>   -o, --perserveOwnerPreserves app owner from the original 
> Environment
>   -u, --username string  Username
>   -p, --password string  Password
>
>
>   -k, --insecure Allow connections to SSL endpoints 
> without certs
>   --verbose  Enable verbose mode
>
> apimcli import-app (--file  --environment 
> ) [flags]
>
> Examples:
>
> apimcli import-app -f qa/sampleApp.zip -e dev
> apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p admin
> apimcli import-app -f qa/sampleApp.zip --preserveOwner 
> --addSubscriptions -e prod
>
>
> Sample Response:
>
> ZipFilePath: 
> /home/user/.wso2apimcli/exported/staging/admin_sampleApp.zip
> Succesfully imported Application!
>
>
>
> Lists
> the Applications available for a certain user
>
> Commands
>
> list apps
>
> Flags
> Required
> -e, --environment
> Optional
> -u, --username
> -p, --password
>
>
> Examples:
>
> wso2apim list apps -e dev
> wso2ppim list apps -e staging
> wso2ppim list apps -e staging -u admin -p 123456
> wso2ppim list apps -e staging -u admin
> wso2ppim list apps -e staging -p 123456
>
> Sample Response:
>
> Environment: staging
> No. of Applications: 3
> 
> +--+++---+--+
> |  ID  |NAME| 
> SUBSCRIBER |   TIER|  STATUS  |
> 
> +--+++---+--+
> | 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f | DefaultApplication | admin   
>| 50PerMin  | APPROVED |
> | b556d2f1-71be-4368-842e-482d0c9e5910 | sampleApp1 | admin   
>| Unlimited | APPROVED |
> | 3b1377e1-d8c6-4c64-a31c-af555407a14a | sampleApp2 | admin   
>| Unlimited | CREATED  |
> 
> +--+++---+--+
>
>
>
>
>
> On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:
>
>> Hi everyone,
>>
>> I’m working on a project to introduce commands to provide application
>> import export support for the import-export-cli for APIM 2.x. I am planning
>> to introduce commands in order to list available applications of a specific
>> user, export an application from a desired environment and import an
>> application to a desired environment.
>>
>>
>> The commands are as follows,
>>
>>
>> Exports an Application from a desired environment
>>
>> Commands
>>
>> export-app
>>
>> Flags
>>   Required
>> -n, --name string  Name of the Application to be exported
>> -i, --uuid string  UUID of the Application to be exported
>> -e, --environment string   Environment from which the Application 
>> should be exported
>>  

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-29 Thread Randilu Soysa
Adding Sample Responses, Exports an Application from a desired environment

Commands

export-app

Flags
  Required
-n, --name string  Name of the Application to be exported
-i, --uuid string  UUID of the Application to be exported
-e, --environment string   Environment to which the
Application should be exported
  Optional
-u, --username string  Username
-p, --password string  Password

-k, --insecure Allow connections to SSL endpoints
without certs
--verbose  Enable verbose mode

apimcli export-app (--name  --uuid
 --environment
) [flags]

Examples:

apimcli export-app -n SampleApp
9f6affe2-4c97-4817-bded-717f8b01eee8 -e dev
apimcli export-app -n SampleApp
7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f -e prod


Sample Response:

Succesfully exported Application!
Find the exported Application at
/home/user/.wso2apimcli/exported/dev/admin_sampleApp.zip


Imports
an Application to a desired environment

Commands

import-app

Flags
Required
  -f, --file string  Name of the Application to be imported
  -e, --environment string   Environment from the which the
Application should be imported (default "default")
Optional
  -s, --addSubscriptions Adds subscriptions of the Application
  -o, --perserveOwnerPreserves app owner from the
original Environment
  -u, --username string  Username
  -p, --password string  Password


  -k, --insecure Allow connections to SSL
endpoints without certs
  --verbose  Enable verbose mode

apimcli import-app (--file  --environment
) [flags]

Examples:

apimcli import-app -f qa/sampleApp.zip -e dev
apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p admin
apimcli import-app -f qa/sampleApp.zip --preserveOwner
--addSubscriptions -e prod


Sample Response:

ZipFilePath:
/home/user/.wso2apimcli/exported/staging/admin_sampleApp.zip
Succesfully imported Application!


Lists
the Applications available for a certain user

Commands

list apps

Flags
Required
-e, --environment
Optional
-u, --username
-p, --password


Examples:

wso2apim list apps -e dev
wso2ppim list apps -e staging
wso2ppim list apps -e staging -u admin -p 123456
wso2ppim list apps -e staging -u admin
wso2ppim list apps -e staging -p 123456

Sample Response:

Environment: staging
No. of Applications: 3

+--+++---+--+
|  ID  |NAME|
SUBSCRIBER |   TIER|  STATUS  |

+--+++---+--+
| 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f | DefaultApplication |
admin  | 50PerMin  | APPROVED |
| b556d2f1-71be-4368-842e-482d0c9e5910 | sampleApp1 |
admin  | Unlimited | APPROVED |
| 3b1377e1-d8c6-4c64-a31c-af555407a14a | sampleApp2 |
admin  | Unlimited | CREATED  |

+--+++---+--+





On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:

> Hi everyone,
>
> I’m working on a project to introduce commands to provide application
> import export support for the import-export-cli for APIM 2.x. I am planning
> to introduce commands in order to list available applications of a specific
> user, export an application from a desired environment and import an
> application to a desired environment.
>
>
> The commands are as follows,
>
>
> Exports an Application from a desired environment
>
> Commands
>
> export-app
>
> Flags
>   Required
> -n, --name string  Name of the Application to be exported
> -i, --uuid string  UUID of the Application to be exported
> -e, --environment string   Environment from which the Application 
> should be exported
>   Optional
> -p, --password string  Password
> -u, --username string  Username
>
> -k, --insecure Allow connections to SSL endpoints without 
> certs
> --verbose  Enable verbose mode
>
> apimcli export-app (--name  --uuid 
>  --environment 
> ) [flags]
>
> Examples:
>
> apimcli export-app -n SampleApp 9f6affe2-4c97-4817-bded-717f8b01eee8 
> -e dev
> apimcli export-app -n SampleApp 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f 
> -e prod
>
>
>
> 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-27 Thread Bhathiya Jayasekara
>
>
> list apps
>>
>> Flags
>> Required
>> -e, --environment
>> Optional
>> -u, --username
>> -p, --password
>>
>>
>> Examples:
>>
>> apimcli list apps -e dev
>>
>>
> Could you please add sample responses of each basic command?
>
I meant to this email.

Thanks,
Bhathiya

>
> Thanks,
> Bhathiya
>
>
>>
>> Your suggestions and feedback on this is highly appreciated!
>>
>>
>> --
>> *Randilu Soysa*
>> Software Engineering Intern | WSO2
>>
>> Email: rand...@wso2.com
>> Mobile   : +94 77 197 5078 <077%20197%205078>
>> linkedin : linkedin.com/in/randilusoysa
>> Web  : http://wso2.com
>>
>> 
>>
>
>
>
> --
> *Bhathiya Jayasekara*
> *Associate Technical Lead,*
> *WSO2 inc., http://wso2.com *
>
> *Phone: +94715478185 <071%20547%208185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> *
> *Twitter: https://twitter.com/bhathiyax *
> *Blog: http://movingaheadblog.blogspot.com
> *
>



-- 
*Bhathiya Jayasekara*
*Associate Technical Lead,*
*WSO2 inc., http://wso2.com *

*Phone: +94715478185 <071%20547%208185>*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
*
*Twitter: https://twitter.com/bhathiyax *
*Blog: http://movingaheadblog.blogspot.com
*
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-27 Thread Bhathiya Jayasekara
Hi Randilu,

On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:

>
> Exports an Application from a desired environment
>
> Commands
>
> export-app
>
> Flags
>   Required
> -n, --name string  Name of the Application to be exported
> -i, --uuid string  UUID of the Application to be exported
> -e, --environment string   Environment from which the Application 
> should be exported
>   Optional
> -p, --password string  Password
> -u, --username string  Username
>
> Shall we swap username and password? (in all commands)

list apps
>
> Flags
> Required
> -e, --environment
> Optional
> -u, --username
> -p, --password
>
>
> Examples:
>
> apimcli list apps -e dev
>
>
Could you please add sample responses of each basic command?

Thanks,
Bhathiya


>
> Your suggestions and feedback on this is highly appreciated!
>
>
> --
> *Randilu Soysa*
> Software Engineering Intern | WSO2
>
> Email: rand...@wso2.com
> Mobile   : +94 77 197 5078 <077%20197%205078>
> linkedin : linkedin.com/in/randilusoysa
> Web  : http://wso2.com
>
> 
>



-- 
*Bhathiya Jayasekara*
*Associate Technical Lead,*
*WSO2 inc., http://wso2.com *

*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
*
*Twitter: https://twitter.com/bhathiyax *
*Blog: http://movingaheadblog.blogspot.com
*
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-25 Thread Sanjeewa Malalgoda
IMO list apps command should list all apps in the system with their UUID
name and creator. So dev-opts person can have look at on that and get UUID
to proceed with next commands.
List command should be have as normal applications get command and should
return all application information.

Have we think about application sharing capability we have on API store? If
not please consider that as well for this. There can be cases where we do
not have same org-id in other environment etc.

Thanks,
sanjeewa.

On Thu, Jan 25, 2018 at 10:03 PM, Nuwan Dias  wrote:

>
> On Thu, 25 Jan 2018 at 10:00 pm, Rajkumar Rajaratnam 
> wrote:
>
>> On Thu, Jan 25, 2018 at 10:27 AM, Nuwan Dias  wrote:
>>
>>>
>>> On Thu, 25 Jan 2018 at 9:24 pm, Rajkumar Rajaratnam 
>>> wrote:
>>>
 Hi Nuwan, Randilu,

 Would like to understand this feature a bit.

- I hope this is about exporting/importing OAuth applications which
subscribers create in dev portal, right? Is this CLI invoking Store REST
API?

 yes it does.
>>>

- If I wish to export the subscription, is there way to pick and
choose the subscriptions I want? If not, what happens if some of these 
 APIs
are not available in the upper environment while importing the 
 application?
The operation will fail altogether or we print some warnings and 
 proceed?

 You can either export with or without subscriptions. You can’t pick and
>>> choose right now.
>>>

- Can I update the existing application, without deleting and
importing it again?


- When I import an application with subscriptions, does it
auto-create the consumer key/secrets?

 No. This is intended to move apps across environments. It is unlikely
>>> someone would reuse the same credentials across environments.
>>>
>>
>> ​I mean, it doesn't have to be same credential, but does it create
>> consumer key/secret for me or I have to create it manually after I import
>> the application into an environment for the first time?​
>>
>
> At the moment it doesn’t create new credentials as well.
>
>>
>>> Thanks.

 On Thu, Jan 25, 2018 at 8:26 AM, Nuwan Dias  wrote:

> Hi Randilu,
>
> I don't think we can expect dev-ops persona to provide the UUID of the
> application when exporting. He/She needs to be able to provide the name 
> and
> owner of the application and export. If we don't have APIs that can
> retrieve Applications with that input we need to introduce them IMO.
>
> I also think we need to export subscriptions by default when we export
> an App. If someone wants to prevent exporting subscriptions then we should
> provide a flag to skip exporting subscriptions.
>
> Thanks,
> NuwanD.
>
> On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa 
> wrote:
>
>> Hi everyone,
>>
>> I’m working on a project to introduce commands to provide application
>> import export support for the import-export-cli for APIM 2.x. I am 
>> planning
>> to introduce commands in order to list available applications of a 
>> specific
>> user, export an application from a desired environment and import an
>> application to a desired environment.
>>
>>
>> The commands are as follows,
>>
>>
>> Exports an Application from a desired environment
>>
>> Commands
>>
>> export-app
>>
>> Flags
>>   Required
>> -n, --name string  Name of the Application to be exported
>> -i, --uuid string  UUID of the Application to be exported
>> -e, --environment string   Environment from which the 
>> Application should be exported
>>   Optional
>> -p, --password string  Password
>> -u, --username string  Username
>>
>> -k, --insecure Allow connections to SSL endpoints 
>> without certs
>> --verbose  Enable verbose mode
>>
>> apimcli export-app (--name  --uuid 
>>  --environment 
>> ) [flags]
>>
>> Examples:
>>
>> apimcli export-app -n SampleApp 
>> 9f6affe2-4c97-4817-bded-717f8b01eee8 -e dev
>> apimcli export-app -n SampleApp 
>> 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f -e prod
>>
>>
>>
>> Imports
>> an Application to a desired environment
>>
>> Commands
>>
>> import-app
>>
>> Flags
>> Required
>>   -f, --file string  Name of the Application to be 
>> imported
>>   -e, --environment string   Environment from the which the 
>> Application should be 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-25 Thread Nuwan Dias
On Thu, 25 Jan 2018 at 10:00 pm, Rajkumar Rajaratnam 
wrote:

> On Thu, Jan 25, 2018 at 10:27 AM, Nuwan Dias  wrote:
>
>>
>> On Thu, 25 Jan 2018 at 9:24 pm, Rajkumar Rajaratnam 
>> wrote:
>>
>>> Hi Nuwan, Randilu,
>>>
>>> Would like to understand this feature a bit.
>>>
>>>- I hope this is about exporting/importing OAuth applications which
>>>subscribers create in dev portal, right? Is this CLI invoking Store REST
>>>API?
>>>
>>> yes it does.
>>
>>>
>>>- If I wish to export the subscription, is there way to pick and
>>>choose the subscriptions I want? If not, what happens if some of these 
>>> APIs
>>>are not available in the upper environment while importing the 
>>> application?
>>>The operation will fail altogether or we print some warnings and proceed?
>>>
>>> You can either export with or without subscriptions. You can’t pick and
>> choose right now.
>>
>>>
>>>- Can I update the existing application, without deleting and
>>>importing it again?
>>>
>>>
>>>- When I import an application with subscriptions, does it
>>>auto-create the consumer key/secrets?
>>>
>>> No. This is intended to move apps across environments. It is unlikely
>> someone would reuse the same credentials across environments.
>>
>
> ​I mean, it doesn't have to be same credential, but does it create
> consumer key/secret for me or I have to create it manually after I import
> the application into an environment for the first time?​
>

At the moment it doesn’t create new credentials as well.

>
>> Thanks.
>>>
>>> On Thu, Jan 25, 2018 at 8:26 AM, Nuwan Dias  wrote:
>>>
 Hi Randilu,

 I don't think we can expect dev-ops persona to provide the UUID of the
 application when exporting. He/She needs to be able to provide the name and
 owner of the application and export. If we don't have APIs that can
 retrieve Applications with that input we need to introduce them IMO.

 I also think we need to export subscriptions by default when we export
 an App. If someone wants to prevent exporting subscriptions then we should
 provide a flag to skip exporting subscriptions.

 Thanks,
 NuwanD.

 On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa 
 wrote:

> Hi everyone,
>
> I’m working on a project to introduce commands to provide application
> import export support for the import-export-cli for APIM 2.x. I am 
> planning
> to introduce commands in order to list available applications of a 
> specific
> user, export an application from a desired environment and import an
> application to a desired environment.
>
>
> The commands are as follows,
>
>
> Exports an Application from a desired environment
>
> Commands
>
> export-app
>
> Flags
>   Required
> -n, --name string  Name of the Application to be exported
> -i, --uuid string  UUID of the Application to be exported
> -e, --environment string   Environment from which the Application 
> should be exported
>   Optional
> -p, --password string  Password
> -u, --username string  Username
>
> -k, --insecure Allow connections to SSL endpoints 
> without certs
> --verbose  Enable verbose mode
>
> apimcli export-app (--name  --uuid 
>  --environment 
> ) [flags]
>
> Examples:
>
> apimcli export-app -n SampleApp 
> 9f6affe2-4c97-4817-bded-717f8b01eee8 -e dev
> apimcli export-app -n SampleApp 
> 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f -e prod
>
>
>
> Imports
> an Application to a desired environment
>
> Commands
>
> import-app
>
> Flags
> Required
>   -f, --file string  Name of the Application to be 
> imported
>   -e, --environment string   Environment from the which the 
> Application should be imported
> Optional
>   -s, --addSubscriptions Adds subscriptions of the Application
>   -o, --perserveOwnerPreserves app owner from the 
> original Environment
>   -p, --password string  Password
>   -u, --username string  Username
>
>   -k, --insecure Allow connections to SSL endpoints 
> without certs
>   --verbose  Enable verbose mode
>
> apimcli import-app (--file  --environment 
> ) [flags]
>
> Examples:
>
> apimcli import-app -f qa/sampleApp.zip -e dev
> apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-25 Thread Rajkumar Rajaratnam
On Thu, Jan 25, 2018 at 10:27 AM, Nuwan Dias  wrote:

>
> On Thu, 25 Jan 2018 at 9:24 pm, Rajkumar Rajaratnam 
> wrote:
>
>> Hi Nuwan, Randilu,
>>
>> Would like to understand this feature a bit.
>>
>>- I hope this is about exporting/importing OAuth applications which
>>subscribers create in dev portal, right? Is this CLI invoking Store REST
>>API?
>>
>> yes it does.
>
>>
>>- If I wish to export the subscription, is there way to pick and
>>choose the subscriptions I want? If not, what happens if some of these 
>> APIs
>>are not available in the upper environment while importing the 
>> application?
>>The operation will fail altogether or we print some warnings and proceed?
>>
>> You can either export with or without subscriptions. You can’t pick and
> choose right now.
>
>>
>>- Can I update the existing application, without deleting and
>>importing it again?
>>
>>
>>- When I import an application with subscriptions, does it
>>auto-create the consumer key/secrets?
>>
>> No. This is intended to move apps across environments. It is unlikely
> someone would reuse the same credentials across environments.
>

​I mean, it doesn't have to be same credential, but does it create consumer
key/secret for me or I have to create it manually after I import the
application into an environment for the first time?​

>
> Thanks.
>>
>> On Thu, Jan 25, 2018 at 8:26 AM, Nuwan Dias  wrote:
>>
>>> Hi Randilu,
>>>
>>> I don't think we can expect dev-ops persona to provide the UUID of the
>>> application when exporting. He/She needs to be able to provide the name and
>>> owner of the application and export. If we don't have APIs that can
>>> retrieve Applications with that input we need to introduce them IMO.
>>>
>>> I also think we need to export subscriptions by default when we export
>>> an App. If someone wants to prevent exporting subscriptions then we should
>>> provide a flag to skip exporting subscriptions.
>>>
>>> Thanks,
>>> NuwanD.
>>>
>>> On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:
>>>
 Hi everyone,

 I’m working on a project to introduce commands to provide application
 import export support for the import-export-cli for APIM 2.x. I am planning
 to introduce commands in order to list available applications of a specific
 user, export an application from a desired environment and import an
 application to a desired environment.


 The commands are as follows,


 Exports an Application from a desired environment

 Commands

 export-app

 Flags
   Required
 -n, --name string  Name of the Application to be exported
 -i, --uuid string  UUID of the Application to be exported
 -e, --environment string   Environment from which the Application 
 should be exported
   Optional
 -p, --password string  Password
 -u, --username string  Username

 -k, --insecure Allow connections to SSL endpoints 
 without certs
 --verbose  Enable verbose mode

 apimcli export-app (--name  --uuid 
  --environment 
 ) [flags]

 Examples:

 apimcli export-app -n SampleApp 
 9f6affe2-4c97-4817-bded-717f8b01eee8 -e dev
 apimcli export-app -n SampleApp 
 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f -e prod



 Imports
 an Application to a desired environment

 Commands

 import-app

 Flags
 Required
   -f, --file string  Name of the Application to be imported
   -e, --environment string   Environment from the which the 
 Application should be imported
 Optional
   -s, --addSubscriptions Adds subscriptions of the Application
   -o, --perserveOwnerPreserves app owner from the original 
 Environment
   -p, --password string  Password
   -u, --username string  Username

   -k, --insecure Allow connections to SSL endpoints 
 without certs
   --verbose  Enable verbose mode

 apimcli import-app (--file  --environment 
 ) [flags]

 Examples:

 apimcli import-app -f qa/sampleApp.zip -e dev
 apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p 
 admin
 apimcli import-app -f qa/sampleApp.zip --preserveOwner 
 --addSubscriptions -e prod



 Lists
 the Applications available for a certain user

 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-25 Thread Nuwan Dias
On Thu, 25 Jan 2018 at 9:24 pm, Rajkumar Rajaratnam 
wrote:

> Hi Nuwan, Randilu,
>
> Would like to understand this feature a bit.
>
>- I hope this is about exporting/importing OAuth applications which
>subscribers create in dev portal, right? Is this CLI invoking Store REST
>API?
>
> yes it does.

>
>- If I wish to export the subscription, is there way to pick and
>choose the subscriptions I want? If not, what happens if some of these APIs
>are not available in the upper environment while importing the application?
>The operation will fail altogether or we print some warnings and proceed?
>
> You can either export with or without subscriptions. You can’t pick and
choose right now.

>
>- Can I update the existing application, without deleting and
>importing it again?
>
>
>- When I import an application with subscriptions, does it auto-create
>the consumer key/secrets?
>
> No. This is intended to move apps across environments. It is unlikely
someone would reuse the same credentials across environments.

Thanks.
>
> On Thu, Jan 25, 2018 at 8:26 AM, Nuwan Dias  wrote:
>
>> Hi Randilu,
>>
>> I don't think we can expect dev-ops persona to provide the UUID of the
>> application when exporting. He/She needs to be able to provide the name and
>> owner of the application and export. If we don't have APIs that can
>> retrieve Applications with that input we need to introduce them IMO.
>>
>> I also think we need to export subscriptions by default when we export an
>> App. If someone wants to prevent exporting subscriptions then we should
>> provide a flag to skip exporting subscriptions.
>>
>> Thanks,
>> NuwanD.
>>
>> On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:
>>
>>> Hi everyone,
>>>
>>> I’m working on a project to introduce commands to provide application
>>> import export support for the import-export-cli for APIM 2.x. I am planning
>>> to introduce commands in order to list available applications of a specific
>>> user, export an application from a desired environment and import an
>>> application to a desired environment.
>>>
>>>
>>> The commands are as follows,
>>>
>>>
>>> Exports an Application from a desired environment
>>>
>>> Commands
>>>
>>> export-app
>>>
>>> Flags
>>>   Required
>>> -n, --name string  Name of the Application to be exported
>>> -i, --uuid string  UUID of the Application to be exported
>>> -e, --environment string   Environment from which the Application 
>>> should be exported
>>>   Optional
>>> -p, --password string  Password
>>> -u, --username string  Username
>>>
>>> -k, --insecure Allow connections to SSL endpoints 
>>> without certs
>>> --verbose  Enable verbose mode
>>>
>>> apimcli export-app (--name  --uuid 
>>>  --environment 
>>> ) [flags]
>>>
>>> Examples:
>>>
>>> apimcli export-app -n SampleApp 
>>> 9f6affe2-4c97-4817-bded-717f8b01eee8 -e dev
>>> apimcli export-app -n SampleApp 
>>> 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f -e prod
>>>
>>>
>>>
>>> Imports
>>> an Application to a desired environment
>>>
>>> Commands
>>>
>>> import-app
>>>
>>> Flags
>>> Required
>>>   -f, --file string  Name of the Application to be imported
>>>   -e, --environment string   Environment from the which the 
>>> Application should be imported
>>> Optional
>>>   -s, --addSubscriptions Adds subscriptions of the Application
>>>   -o, --perserveOwnerPreserves app owner from the original 
>>> Environment
>>>   -p, --password string  Password
>>>   -u, --username string  Username
>>>
>>>   -k, --insecure Allow connections to SSL endpoints 
>>> without certs
>>>   --verbose  Enable verbose mode
>>>
>>> apimcli import-app (--file  --environment 
>>> ) [flags]
>>>
>>> Examples:
>>>
>>> apimcli import-app -f qa/sampleApp.zip -e dev
>>> apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p 
>>> admin
>>> apimcli import-app -f qa/sampleApp.zip --preserveOwner 
>>> --addSubscriptions -e prod
>>>
>>>
>>>
>>> Lists
>>> the Applications available for a certain user
>>>
>>> Commands
>>>
>>> list apps
>>>
>>> Flags
>>> Required
>>> -e, --environment
>>> Optional
>>> -u, --username
>>> -p, --password
>>>
>>>
>>> Examples:
>>>
>>> apimcli list apps -e dev
>>> apimcli list apps -e staging
>>> apimcli list apps -e staging -u admin -p 123456
>>> apimcli list apps -e staging -u admin
>>> apimcli list apps -e 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-25 Thread Rajkumar Rajaratnam
Hi Nuwan, Randilu,

Would like to understand this feature a bit.

   - I hope this is about exporting/importing OAuth applications which
   subscribers create in dev portal, right? Is this CLI invoking Store REST
   API?
   - If I wish to export the subscription, is there way to pick and choose
   the subscriptions I want? If not, what happens if some of these APIs are
   not available in the upper environment while importing the application? The
   operation will fail altogether or we print some warnings and proceed?
   - Can I update the existing application, without deleting and importing
   it again?
   - When I import an application with subscriptions, does it auto-create
   the consumer key/secrets?

Thanks.

On Thu, Jan 25, 2018 at 8:26 AM, Nuwan Dias  wrote:

> Hi Randilu,
>
> I don't think we can expect dev-ops persona to provide the UUID of the
> application when exporting. He/She needs to be able to provide the name and
> owner of the application and export. If we don't have APIs that can
> retrieve Applications with that input we need to introduce them IMO.
>
> I also think we need to export subscriptions by default when we export an
> App. If someone wants to prevent exporting subscriptions then we should
> provide a flag to skip exporting subscriptions.
>
> Thanks,
> NuwanD.
>
> On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:
>
>> Hi everyone,
>>
>> I’m working on a project to introduce commands to provide application
>> import export support for the import-export-cli for APIM 2.x. I am planning
>> to introduce commands in order to list available applications of a specific
>> user, export an application from a desired environment and import an
>> application to a desired environment.
>>
>>
>> The commands are as follows,
>>
>>
>> Exports an Application from a desired environment
>>
>> Commands
>>
>> export-app
>>
>> Flags
>>   Required
>> -n, --name string  Name of the Application to be exported
>> -i, --uuid string  UUID of the Application to be exported
>> -e, --environment string   Environment from which the Application 
>> should be exported
>>   Optional
>> -p, --password string  Password
>> -u, --username string  Username
>>
>> -k, --insecure Allow connections to SSL endpoints 
>> without certs
>> --verbose  Enable verbose mode
>>
>> apimcli export-app (--name  --uuid 
>>  --environment 
>> ) [flags]
>>
>> Examples:
>>
>> apimcli export-app -n SampleApp 9f6affe2-4c97-4817-bded-717f8b01eee8 
>> -e dev
>> apimcli export-app -n SampleApp 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f 
>> -e prod
>>
>>
>>
>> Imports
>> an Application to a desired environment
>>
>> Commands
>>
>> import-app
>>
>> Flags
>> Required
>>   -f, --file string  Name of the Application to be imported
>>   -e, --environment string   Environment from the which the 
>> Application should be imported
>> Optional
>>   -s, --addSubscriptions Adds subscriptions of the Application
>>   -o, --perserveOwnerPreserves app owner from the original 
>> Environment
>>   -p, --password string  Password
>>   -u, --username string  Username
>>
>>   -k, --insecure Allow connections to SSL endpoints 
>> without certs
>>   --verbose  Enable verbose mode
>>
>> apimcli import-app (--file  --environment 
>> ) [flags]
>>
>> Examples:
>>
>> apimcli import-app -f qa/sampleApp.zip -e dev
>> apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p admin
>> apimcli import-app -f qa/sampleApp.zip --preserveOwner 
>> --addSubscriptions -e prod
>>
>>
>>
>> Lists
>> the Applications available for a certain user
>>
>> Commands
>>
>> list apps
>>
>> Flags
>> Required
>> -e, --environment
>> Optional
>> -u, --username
>> -p, --password
>>
>>
>> Examples:
>>
>> apimcli list apps -e dev
>> apimcli list apps -e staging
>> apimcli list apps -e staging -u admin -p 123456
>> apimcli list apps -e staging -u admin
>> apimcli list apps -e staging -p 123456
>>
>>
>> Your suggestions and feedback on this is highly appreciated!
>>
>>
>> --
>> *Randilu Soysa*
>> Software Engineering Intern | WSO2
>>
>> Email: rand...@wso2.com
>> Mobile   : +94 77 197 5078 <+94%2077%20197%205078>
>> linkedin : linkedin.com/in/randilusoysa
>> Web  : http://wso2.com
>>
>> 
>>
>
>
>
> --
> Nuwan Dias
>
> Software Architect - WSO2, Inc. http://wso2.com
> email : nuw...@wso2.com
> Phone : +94 777 775 729 

Re: [Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-25 Thread Nuwan Dias
Hi Randilu,

I don't think we can expect dev-ops persona to provide the UUID of the
application when exporting. He/She needs to be able to provide the name and
owner of the application and export. If we don't have APIs that can
retrieve Applications with that input we need to introduce them IMO.

I also think we need to export subscriptions by default when we export an
App. If someone wants to prevent exporting subscriptions then we should
provide a flag to skip exporting subscriptions.

Thanks,
NuwanD.

On Thu, Jan 25, 2018 at 5:41 PM, Randilu Soysa  wrote:

> Hi everyone,
>
> I’m working on a project to introduce commands to provide application
> import export support for the import-export-cli for APIM 2.x. I am planning
> to introduce commands in order to list available applications of a specific
> user, export an application from a desired environment and import an
> application to a desired environment.
>
>
> The commands are as follows,
>
>
> Exports an Application from a desired environment
>
> Commands
>
> export-app
>
> Flags
>   Required
> -n, --name string  Name of the Application to be exported
> -i, --uuid string  UUID of the Application to be exported
> -e, --environment string   Environment from which the Application 
> should be exported
>   Optional
> -p, --password string  Password
> -u, --username string  Username
>
> -k, --insecure Allow connections to SSL endpoints without 
> certs
> --verbose  Enable verbose mode
>
> apimcli export-app (--name  --uuid 
>  --environment 
> ) [flags]
>
> Examples:
>
> apimcli export-app -n SampleApp 9f6affe2-4c97-4817-bded-717f8b01eee8 
> -e dev
> apimcli export-app -n SampleApp 7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f 
> -e prod
>
>
>
> Imports
> an Application to a desired environment
>
> Commands
>
> import-app
>
> Flags
> Required
>   -f, --file string  Name of the Application to be imported
>   -e, --environment string   Environment from the which the 
> Application should be imported
> Optional
>   -s, --addSubscriptions Adds subscriptions of the Application
>   -o, --perserveOwnerPreserves app owner from the original 
> Environment
>   -p, --password string  Password
>   -u, --username string  Username
>
>   -k, --insecure Allow connections to SSL endpoints 
> without certs
>   --verbose  Enable verbose mode
>
> apimcli import-app (--file  --environment 
> ) [flags]
>
> Examples:
>
> apimcli import-app -f qa/sampleApp.zip -e dev
> apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p admin
> apimcli import-app -f qa/sampleApp.zip --preserveOwner 
> --addSubscriptions -e prod
>
>
>
> Lists
> the Applications available for a certain user
>
> Commands
>
> list apps
>
> Flags
> Required
> -e, --environment
> Optional
> -u, --username
> -p, --password
>
>
> Examples:
>
> apimcli list apps -e dev
> apimcli list apps -e staging
> apimcli list apps -e staging -u admin -p 123456
> apimcli list apps -e staging -u admin
> apimcli list apps -e staging -p 123456
>
>
> Your suggestions and feedback on this is highly appreciated!
>
>
> --
> *Randilu Soysa*
> Software Engineering Intern | WSO2
>
> Email: rand...@wso2.com
> Mobile   : +94 77 197 5078 <+94%2077%20197%205078>
> linkedin : linkedin.com/in/randilusoysa
> Web  : http://wso2.com
>
> 
>



-- 
Nuwan Dias

Software Architect - WSO2, Inc. http://wso2.com
email : nuw...@wso2.com
Phone : +94 777 775 729
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


[Architecture] [APIM] CLI support for Importing and Exporting Applications

2018-01-25 Thread Randilu Soysa
Hi everyone,

I’m working on a project to introduce commands to provide application
import export support for the import-export-cli for APIM 2.x. I am planning
to introduce commands in order to list available applications of a specific
user, export an application from a desired environment and import an
application to a desired environment.


The commands are as follows,


Exports an Application from a desired environment

Commands

export-app

Flags
  Required
-n, --name string  Name of the Application to be exported
-i, --uuid string  UUID of the Application to be exported
-e, --environment string   Environment from which the
Application should be exported
  Optional
-p, --password string  Password
-u, --username string  Username

-k, --insecure Allow connections to SSL endpoints
without certs
--verbose  Enable verbose mode

apimcli export-app (--name  --uuid
 --environment
) [flags]

Examples:

apimcli export-app -n SampleApp
9f6affe2-4c97-4817-bded-717f8b01eee8 -e dev
apimcli export-app -n SampleApp
7bc2b94e-c6d2-4d4f-beb1-cdccb08cd87f -e prod


Imports
an Application to a desired environment

Commands

import-app

Flags
Required
  -f, --file string  Name of the Application to be imported
  -e, --environment string   Environment from the which the
Application should be imported
Optional
  -s, --addSubscriptions Adds subscriptions of the Application
  -o, --perserveOwnerPreserves app owner from the
original Environment
  -p, --password string  Password
  -u, --username string  Username

  -k, --insecure Allow connections to SSL
endpoints without certs
  --verbose  Enable verbose mode

apimcli import-app (--file  --environment
) [flags]

Examples:

apimcli import-app -f qa/sampleApp.zip -e dev
apimcli import-app -f staging/sampleApp.zip -e prod -u admin -p admin
apimcli import-app -f qa/sampleApp.zip --preserveOwner
--addSubscriptions -e prod


Lists
the Applications available for a certain user

Commands

list apps

Flags
Required
-e, --environment
Optional
-u, --username
-p, --password


Examples:

apimcli list apps -e dev
apimcli list apps -e staging
apimcli list apps -e staging -u admin -p 123456
apimcli list apps -e staging -u admin
apimcli list apps -e staging -p 123456


Your suggestions and feedback on this is highly appreciated!


-- 
*Randilu Soysa*
Software Engineering Intern | WSO2

Email: rand...@wso2.com
Mobile   : +94 77 197 5078
linkedin : linkedin.com/in/randilusoysa
Web  : http://wso2.com


___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture