Hi

Thank you all

It's solved. misunderstood the given instruction. According to my scenario
correct code is

curl -H "Authorization:Basic YWRtaW46YWRtaW4=" -X GET "
https://10.100.4.139:9447/api-import-export-v0.9.1/export-api?name=WeatherAPI&version=1.0.0&provider=admin";
-k > myExportedAPI.zip

Thanks
Lasantha

On Tue, Sep 8, 2015 at 4:03 PM, Thilini Cooray <thili...@wso2.com> wrote:

> Hi,
>
> The authorization token should be Base64Encode of username:password
> In your case it should be admin:admin Base64 encode which
> is YWRtaW46YWRtaW4=
>
> On Tue, Sep 8, 2015 at 3:58 PM, Lasantha Dharmakeerthi <lasant...@wso2.com
> > wrote:
>
>> hi
>>
>> Thank you for giving help. Still couldn't solve the problem
>>
>> is this command correct??
>>
>> curl -H "Authorization:Basic YWRtaW46:YWRtaW46" -X GET "
>> http://10.100.4.139:9767/api-import-export-v0.9.1/export-api?name=WeatherAPI&version=1.0.0&provider=admin";
>> -k > myExportedAPI.zip
>>
>> I log as admin user.
>>
>> Thank You
>>
>> On Tue, Sep 8, 2015 at 3:21 PM, Jenananthan Yogendran <
>> jenanant...@wso2.com> wrote:
>>
>>> HI
>>>
>>> Also your api url missing the version (api-import-export-
>>> <https://localhost:9443/api-import-export->*v0.9.1*)
>>>
>>> https://localhost:9443/api-import-export-*v0.9.1*
>>> /export-api?name=xxx&version=xxx&provider
>>>
>>> On Tue, Sep 8, 2015 at 2:38 PM, Jenananthan Yogendran <
>>> jenanant...@wso2.com> wrote:
>>>
>>>> Hi Lasantha,
>>>>
>>>> You need to use Basic auth where user credentials (username and
>>>> password ) should be base 64 encoded separated by colon
>>>> (<username:password>). But in your case you have encoded only user name
>>>> "admin".
>>>> decode of "YWRtaW4" is admin[1] 1.https://www.base64decode.org/
>>>>
>>>> On Tue, Sep 8, 2015 at 2:07 PM, Thilini Cooray <thili...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Can you please make sure whether the API call is a success by using
>>>>> "curl -v" option?
>>>>>
>>>>> Thanks,
>>>>> ThiliniC.
>>>>>
>>>>> On Tue, Sep 8, 2015 at 1:46 PM, Lasantha Dharmakeerthi <
>>>>> lasant...@wso2.com> wrote:
>>>>>
>>>>>> Hi Devs,
>>>>>>
>>>>>> I followed the API Manager documentation to Migrate APIs to a
>>>>>> different environment. Downloaded the WSO2 API import/export tool v0.9.1
>>>>>> and tried to export API. But I got 0 byte zip file. So what will be the
>>>>>> reason for that?
>>>>>>
>>>>>> used command
>>>>>>
>>>>>> curl -H "Authorization:Basic YWRtaW4=" -X GET 
>>>>>> "http://10.100.4.139:9767/api-import-export/export-api?name=WeatherAPI&version=1.0.0&provider=admin";
>>>>>>  -k > myExportedAPI.zip
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dharmakeerthi Lasantha
>>>>>> Software Engineer Trainee, WSO2
>>>>>> Mobile 0774928852
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jenananthan Yogendran
>>>> *Software Engineer,*
>>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>>
>>>>
>>>
>>>
>>> --
>>> Jenananthan Yogendran
>>> *Software Engineer,*
>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>
>>>
>>
>>
>> --
>> Dharmakeerthi Lasantha
>> Software Engineer Trainee, WSO2
>> Mobile 0774928852
>>
>
>
>
> --
> 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
>



-- 
Dharmakeerthi Lasantha
Software Engineer Trainee, WSO2
Mobile 0774928852
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to