stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lasindu Charith (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (STRATOS-872) New User update issue
Date Fri, 10 Oct 2014 07:15:33 GMT

    [ https://issues.apache.org/jira/browse/STRATOS-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14166502#comment-14166502
] 

Lasindu Charith commented on STRATOS-872:
-----------------------------------------

This issue was due to REST Endpoint not returning the correct Status code for the above actions.
Updated code will give the below functionality.

[1] When a new user is Added/Created, EP will give HTTP Status 201 - Created
[2] If we try to add a user which is already there, EP will give Status 400 (with "Error in
adding user <UserName> to User Store")
[3] If an existing user is updated, EP will give Status code 204 - no content
[4] If we try to update a user who is not available, it will give Status 400 (Requested user
<UserName> does not exist).
[5] If user delete is successful - HTTP Status 204
[6] If we try to delete a user who is not available - it will give Status 400 (Requested user
<UserName> does not exist).

Committed in 2fa11c819b88d506ec34ea88a7ed3b291d9a1f47
IMO, The HTTP 400 status code could be more specific. This applies to most of the REST API
return codes. This issue will be addressed when re-factoring the REST API.



> New User update issue
> ---------------------
>
>                 Key: STRATOS-872
>                 URL: https://issues.apache.org/jira/browse/STRATOS-872
>             Project: Stratos
>          Issue Type: Bug
>    Affects Versions: 4.1.0 M1
>            Reporter: Dakshika Jayathilaka
>             Fix For: 4.2.0 M2
>
>
> PUT /user endpoint not updating and always return 201 accepted status. 
> curl -X PUT -H "Content-Type: application/json" -d @user2.json -k -v -u admin:admin https://localhost:9443/stratos/admin/user
> AFAIK we need to give /user/{userName} on update. 
> current PUT works with non-exsisting users as wel..
> here is the info log returns
> INFO {org.apache.stratos.rest.endpoint.services.ServiceUtils} -  Successfully updated
an user with Username test2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message