Hi Godwin,

Seems like your request url is wrong. I tested the same in EI-6.1.1 by
adding resources.war from GREG 5.3.0 pack and It is working fine. Please
execute the below curl and test.

curl -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Media-Type:
> Policy" -H "Content-Type: application/xml" -H "Cache-Control: no-cache" -d
> '<Test>Test2</Test>' "
> https://localhost:9443/resource/1.0.0/artifact/_system/config/repository/components/org.wso2.carbon.security.mgt/policy/policy1
> <https://www.google.com/url?q=https%3A%2F%2Flocalhost%3A9443%2Fresource%2F1.0.0%2Fartifact%2F_system%2Fconfig%2Frepository%2Fcomponents%2Forg.wso2.carbon.security.mgt%2Fpolicy%2Fpolicy1&sa=D&sntz=1&usg=AFQjCNGyrHcj7P9nwZj6eP6oEcoJAGZw7w>"
> -i -k
>

Thanks
Danesh

On Fri, Jan 5, 2018 at 12:47 PM, Godwin Shrimal <[email protected]> wrote:

> I am trying this in EI-6.1.1 pack
>
>
> Thanks
> Godwin
>
> On Fri, Jan 5, 2018 at 2:07 PM, Godwin Shrimal <[email protected]> wrote:
>
>> Hi Prasanna,
>>
>> I want to update the security policy "_system/config/repository/com
>> ponents/org.wso2.carbon.security.mgt/policy/policy1". I am using
>> following request to update it and but getting 405-Method not allowed.
>>
>> URL: https://localhost:9443/registry/_system/config/repository/
>> components/org.wso2.carbon.security.mgt/policy/scenario1
>> Method: PUT
>> *Headers:*
>> Media-Type: Policy
>> Content-Type: application/xml
>> Authorization: Basic YWRtaW46YWRtaW4=
>> Payload: <Test>Test</Test>
>>
>> [1] - https://docs.wso2.com/display/Governance530/Resources+with+REST+API
>>
>> Thanks
>> Godwin
>>
>>
>> On Tue, Jan 2, 2018 at 2:18 PM, Godwin Shrimal <[email protected]> wrote:
>>
>>> Thanks for the response Prasanna, Yes we can use "Update a resource"
>>> REST API to update the resources
>>>
>>>
>>> Thanks
>>> Godwin
>>>
>>>
>>>
>>> On Tue, Jan 2, 2018 at 2:09 PM, Prasanna Dangalla <[email protected]>
>>> wrote:
>>>
>>>> Hi Godwin,
>>>>
>>>> On Tue, Jan 2, 2018 at 12:33 PM, Godwin Shrimal <[email protected]>
>>>> wrote:
>>>>
>>>>> If this is not available, Is there any API to update the entire
>>>>> content of the resource ?
>>>>>
>>>> We have REST API's update registry resources and governance artifacts.
>>>> Can you check whether these can be used for your use case?
>>>>
>>>> [1] - https://docs.wso2.com/display/Governance530/Resources+with+R
>>>> EST+API
>>>> [2] - https://docs.wso2.com/display/Governance530/Governance+REST+API
>>>>
>>>> Thanks
>>>> Prasanna
>>>>
>>>>>
>>>>>
>>>>> Thanks
>>>>> Godwin
>>>>>
>>>>> On Sun, Dec 17, 2017 at 2:21 PM, Godwin Shrimal <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi Devs,
>>>>>>
>>>>>> Is there any API to change the roles of the UT policy (ws-security)
>>>>>> in the registry?
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>> Godwin
>>>>>>
>>>>>> --
>>>>>> *Godwin Amila Shrimal*
>>>>>> Associate Technical Lead
>>>>>> WSO2 Inc.; http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>> mobile: *+94772264165*
>>>>>> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
>>>>>> <https://www.linkedin.com/in/godwin-amila-2ba26844/>*
>>>>>> twitter: https://twitter.com/godwinamila
>>>>>> <http://wso2.com/signature>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Godwin Amila Shrimal*
>>>>> Associate Technical Lead
>>>>> WSO2 Inc.; http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> mobile: *+94772264165*
>>>>> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
>>>>> <https://www.linkedin.com/in/godwin-amila-2ba26844/>*
>>>>> twitter: https://twitter.com/godwinamila
>>>>> <http://wso2.com/signature>
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> *Godwin Amila Shrimal*
>>> Associate Technical Lead
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94772264165*
>>> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
>>> <https://www.linkedin.com/in/godwin-amila-2ba26844/>*
>>> twitter: https://twitter.com/godwinamila
>>> <http://wso2.com/signature>
>>>
>>
>>
>>
>> --
>> *Godwin Amila Shrimal*
>> Associate Technical Lead
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
>> <https://www.linkedin.com/in/godwin-amila-2ba26844/>*
>> twitter: https://twitter.com/godwinamila
>> <http://wso2.com/signature>
>>
>
>
>
> --
> *Godwin Amila Shrimal*
> Associate Technical Lead
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
> <https://www.linkedin.com/in/godwin-amila-2ba26844/>*
> twitter: https://twitter.com/godwinamila
> <http://wso2.com/signature>
>



-- 

*Danesh Kuruppu*
Senior Software Engineer | WSO2

Email: [email protected]
Mobile: +94 (77) 1690552
Web: WSO2 Inc <https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to