hi Bhathiya,

Thanks for reporting this!

Please clarify if the following is the correct command to be added to docs:

*curl -v -k -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H
"Content-Type: **application/atomcoll+xml**" -d
''https://localhost:9443/resource/1.0.0/artifact/_system/governance/permission/applications/TestSP/TestCol
<https://localhost:9443/resource/1.0.0/artifact/_system/governance/permission/applications/TestSP/TestCol>*


On Thu, Aug 4, 2016 at 6:11 PM, Bhathiya Jayasekara <[email protected]>
wrote:

> I could get it working by sending *-H "Content-Type:
> application/atomcoll+xml" *instead of Media-Type.
> Docs are incorrect, please fix them.
>
> Thanks,
> Bhathiya
>
> On Thu, Aug 4, 2016 at 5:58 PM, Bhathiya Jayasekara <[email protected]>
> wrote:
>
>> Hi all,
>>
>> I followed [1] to create a collection with below curl command. I'm using
>> IS 5.1.0 with resource.war from greg.
>>
>> *> curl -v -k -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H
>> "Media-Type: application/atomcoll+xml" -H "Content-Type:
>> application/x-www-form-urlencoded" -d ''
>> https://localhost:9443/resource/1.0.0/artifact/_system/governance/permission/applications/TestSP/TestCol
>> <https://localhost:9443/resource/1.0.0/artifact/_system/governance/permission/applications/TestSP/TestCol>*
>>
>> *< HTTP/1.1 201 Created< Cache-Control: private< Expires: Thu, 01 Jan
>> 1970 05:30:00 IST< Date: Thu, 04 Aug 2016 12:23:43 GMT< Content-Type:
>> application/json< Content-Length: 68< Server: WSO2 Carbon Server*
>>
>> But it always creates a resource instead of a collection. See below. What
>> am I missing here?
>>
>> [image: Inline image 1]
>>
>> [1] https://docs.wso2.com/display/Governance500/Collection+with+REST+API#
>> CollectionwithRESTAPI-AddaCollection
>>
>> Thanks,
>>
>> --
>> *Bhathiya Jayasekara*
>> *Senior Software Engineer,*
>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>
>> *Phone: +94715478185 <%2B94715478185>*
>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>> <http://www.linkedin.com/in/bhathiyaj>*
>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
>> *Blog: http://movingaheadblog.blogspot.com
>> <http://movingaheadblog.blogspot.com/>*
>>
>
>
>
> --
> *Bhathiya Jayasekara*
> *Senior Software Engineer,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>



-- 
Thanks & Best Regards,
*Praneesha Chandrasiri*
*Technical Writer*
*WSO2 Inc. *
*Mobile: +(94) 718156888*
*E-mail: [email protected] <[email protected]>*
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to