Understood! Thanks for the explanation Chamila.

On Fri, Jan 22, 2016 at 2:52 PM, Chamila Wijayarathna <[email protected]>
wrote:

> Hi Nadeesha,
>
> Filtering operation is not extracting a specific group, its used to list
> groups, but filter it by username or any other attribute name of attribute
> pattern.
>
> To retrieve specific group we need to use following command.
>
> curl -k --user admin:admin --header "Content-Type:application/json"
> https://localhost:9443/wso2/scim/Groups/ad583049-0cad-4dc4-ab08-e520dbb4fec8
>
> There you will get the list of users with other attributes of the group as
> follows.
>
>
> {"id":"ad583049-0cad-4dc4-ab08-e520dbb4fec8","schemas":["urn:scim:schemas:core:1.0"],"displayName":"engineer","members":[{"value":"a5a564a4-5d63-416b-90bd-77fa2130cdc9","display":"hasinitg"}],"meta":{"lastModified":"2016-01-22T12:58:33","created":"2016-01-22T12:58:33","location":"
> https://localhost:9443/wso2/scim/Groups/ad583049-0cad-4dc4-ab08-e520dbb4fec8
> "}}
>
> So what you have observed is not a bug, it is how it suppose to work. For
> more information about requests and responses in SCIM 1.1, please refer
> specification at [1].
>
> [1]. http://www.simplecloud.info/specs/draft-scim-api-01.html
>
> Thank You!
>
> On Fri, Jan 22, 2016 at 2:14 PM, Nadeesha Meegoda <[email protected]>
> wrote:
>
>> Hi Chamila,
>>
>> Why doesn't the filer command return the member list?
>>
>> On Fri, Jan 22, 2016 at 2:09 PM, Nadeesha Meegoda <[email protected]>
>> wrote:
>>
>>> Hi Chamila,
>>>
>>> I checked this. Neither specifying an exact group is not returning the
>>> members of the Group. Seems this is a bug.
>>>
>>>
>>> curl -v -k --user admin:admin
>>> https://localhost:9443/wso2/scim/Groups?filter=displayName+Eq+%22engineer%22
>>>
>>>
>>>
>>> {"schemas":["urn:scim:schemas:core:1.0"],"totalResults":1,"Resources":[{"id":"0f13fb29-78b8-4eb4-832d-c7a6cf12e45f","displayName":"PRIMARY/engineer","meta":{"lastModified":"2016-01-22T13:38:13","created":"2016-01-22T13:38:13","location":"
>>> https://localhost:9443/wso2/scim/Groups/0f13fb29-78b8-4eb4-832d-c7a6cf12e45f
>>> "}}]}
>>>
>>> On Fri, Jan 22, 2016 at 1:59 PM, Chamila Wijayarathna <[email protected]>
>>> wrote:
>>>
>>>> Hi Xavier,
>>>>
>>>> The result you are getting is the expected result. When you list
>>>> groups, you will only receive the list of groups available with group ID,
>>>> group name and their meta data.
>>>>
>>>> If you perform a GET request by specifying an exact group, you will
>>>> receive response with list of group members.
>>>>
>>>> Seems like response in the doc you have mentioned is wrong. It needs to
>>>> be corrected.
>>>>
>>>> Thank You!
>>>>
>>>> On Wed, Jan 20, 2016 at 7:22 PM, Xavier Pegenaute M2M <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I've been trying to follow the SCIM documentation [1] to manage user
>>>>> and groups but apparently the groups members are not visualized after the
>>>>> group creation phase. These are my steps:
>>>>>
>>>>> 1) Create user
>>>>> curl -v -k --user admin:admin --data "{"schemas":[],"name":{"
>>>>> familyName":"gunasinghe","givenName":"hasinitg"},"userName":"hasinitg
>>>>> ","password":"hasinitg","emails":[{"primary":true,"value":"
>>>>> hasini_home.com","type":"home"},{"value":"hasini_work.com","type":"
>>>>> work"}]}" --header "Content-Type:application/json" 
>>>>> https://localhost:9443/wso2/scim/Users
>>>>> OUTPUT { "meta": { "created": "2016-01-20T13:41:51", "location":
>>>>> "https://localhost:9443/wso2/scim/Users/c3561007-5174-4b7d-9d6f-db523164a370";
>>>>> <https://localhost:9443/wso2/scim/Users/c3561007-5174-4b7d-9d6f-db523164a370>,
>>>>> "lastModified": "2016-01-20T13:41:51" }, "emails": [ { "type": "home",
>>>>> "value": "hasini_home.com" }, { "type": "work", "value": "
>>>>> hasini_work.com" } ], "userName": "hasinitg", "name": { "givenName":
>>>>> "hasinitg", "familyName": "gunasinghe" }, "schemas": [
>>>>> "urn:scim:schemas:core:1.0" ], "id": 
>>>>> "c3561007-5174-4b7d-9d6f-db523164a370"
>>>>> } 2) Create group adding the user curl -k --user admin:admin --data
>>>>> "{"displayName": "engineer","members":
>>>>> [{"value":"c3561007-5174-4b7d-9d6f-db523164a370","display": "hasinitg"}]}"
>>>>> --header "Content-Type:application/json"
>>>>> https://localhost:9443/wso2/scim/Groups
>>>>>
>>>>> OUTPUT
>>>>> {
>>>>>   "meta": {
>>>>>     "location":
>>>>> "https://localhost:9443/wso2/scim/Groups/b2e69f12-1b6a-4277-b3f5-b2536da1303a";
>>>>> <https://localhost:9443/wso2/scim/Groups/b2e69f12-1b6a-4277-b3f5-b2536da1303a>
>>>>> ,
>>>>>     "created": "2016-01-20T13:47:20",
>>>>>     "lastModified": "2016-01-20T13:47:20"
>>>>>   },
>>>>>   "members": [
>>>>>     {
>>>>>       "display": "hasinitg",
>>>>>       "value": "c3561007-5174-4b7d-9d6f-db523164a370"
>>>>>     }
>>>>>   ],
>>>>>   "displayName": "PRIMARY/engineer",
>>>>>   "schemas": [
>>>>>     "urn:scim:schemas:core:1.0"
>>>>>   ],
>>>>>   "id": "b2e69f12-1b6a-4277-b3f5-b2536da1303a"
>>>>> }
>>>>>
>>>>> As you can notice, in member the hasinitg user is shown.
>>>>>
>>>>> 3) List groups (missing the members field)
>>>>> curl -k --user admin:admin --header "Content-Type:application/json"
>>>>> https://localhost:9443/wso2/scim/Groups
>>>>>
>>>>>
>>>>> OUTPUT
>>>>> {
>>>>>   "Resources": [
>>>>>     {
>>>>>       "meta": {
>>>>>         "location":
>>>>> "https://localhost:9443/wso2/scim/Groups/b2e69f12-1b6a-4277-b3f5-b2536da1303a";
>>>>> <https://localhost:9443/wso2/scim/Groups/b2e69f12-1b6a-4277-b3f5-b2536da1303a>
>>>>> ,
>>>>>         "created": "2016-01-20T13:47:20",
>>>>>         "lastModified": "2016-01-20T13:47:20"
>>>>>       },
>>>>>       "displayName": "PRIMARY/engineer",
>>>>>       "id": "b2e69f12-1b6a-4277-b3f5-b2536da1303a"
>>>>>     }
>>>>>   ],
>>>>>   "totalResults": 1,
>>>>>   "schemas": [
>>>>>     "urn:scim:schemas:core:1.0"
>>>>>   ]
>>>>> }
>>>>>
>>>>> Any one of you have any similar experience?, as it is stated in the
>>>>> documentation [1], this output should show the members field.
>>>>>
>>>>> Thanks & Regards,
>>>>>
>>>>> [1] - https://docs.wso2.com/display/IS510/SCIM+APIs
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Chamila Dilshan Wijayarathna,*
>>>> Software Engineer
>>>> Mobile:(+94)788193620
>>>> WSO2 Inc., http://wso2.com/
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Nadeesha Meegoda*
>>> Software Engineer - QA
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>> email : [email protected]
>>> mobile: +94783639540
>>> <%2B94%2077%202273555>
>>>
>>
>>
>>
>> --
>> *Nadeesha Meegoda*
>> Software Engineer - QA
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>> email : [email protected]
>> mobile: +94783639540
>> <%2B94%2077%202273555>
>>
>
>
>
> --
> *Chamila Dilshan Wijayarathna,*
> Software Engineer
> Mobile:(+94)788193620
> WSO2 Inc., http://wso2.com/
>



-- 
*Nadeesha Meegoda*
Software Engineer - QA
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
email : [email protected]
mobile: +94783639540
<%2B94%2077%202273555>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to