[Dhis2-devs] User Creation failing via Metadata API.

2014-06-17 Thread Kiran Prakash
Hello,

We are using metadata api to create user, the post payload looks like this.

{
users: [
{
disabled: false,
organisationUnits: [
{
name: MSF,
id: 2cf79e8f137
}
],
dataViewOrganisationUnits: [
{
name: MSF,
id: 2cf79e8f137
}
],
userCredentials: {
username: foo@dubia.msf.org,
password: aab24180611c714b04f572c737a324ae,
userAuthorityGroups: [
{
name: HQ,
id: hq
}
]
},
surname: Bar,
name: Foo Bar,
firstName: Foo,
selfRegistered: false,
id: 7,
email: foo@dubia.msf.org,
strategy: create_and_update
}
]
}


This post is failing with the error :

No IdentifiableObjectStore found for class: class
org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

We debugged a little, it looks like the there are some change in structure
of UserCredential object which is breaking the API.


Any help on this asap is greatly appreciated.

Thanks

Kiran.
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] User Creation failing via Metadata API.

2014-06-17 Thread Jason Pickering
I do not know the details here, but do know that the IDs (i.e. DHIS2 UIDs)
cannot begin with a number.

See here for more information

https://www.dhis2.org/doc/snapshot/en/user/html/go01.html

This was discussed just a few days ago on this list.

Regards,
Jason





On Tue, Jun 17, 2014 at 11:58 AM, Kiran Prakash kprak...@thoughtworks.com
wrote:

 Hello,

 We are using metadata api to create user, the post payload looks like this.

 {
 users: [
 {
 disabled: false,
 organisationUnits: [
 {
 name: MSF,
 id: 2cf79e8f137
 }
 ],
 dataViewOrganisationUnits: [
 {
 name: MSF,
 id: 2cf79e8f137
 }
 ],
 userCredentials: {
 username: foo@dubia.msf.org,
 password: aab24180611c714b04f572c737a324ae,
 userAuthorityGroups: [
 {
 name: HQ,
 id: hq
 }
 ]
 },
 surname: Bar,
 name: Foo Bar,
 firstName: Foo,
 selfRegistered: false,
 id: 7,
 email: foo@dubia.msf.org,
 strategy: create_and_update
 }
 ]
 }


 This post is failing with the error :

 No IdentifiableObjectStore found for class: class
 org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java

 We debugged a little, it looks like the there are some change in structure
 of UserCredential object which is breaking the API.


 Any help on this asap is greatly appreciated.

 Thanks

 Kiran.

 ___
 Mailing list: https://launchpad.net/~dhis2-devs
 Post to : dhis2-devs@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] User Creation failing via Metadata API.

2014-06-17 Thread Morten Olav Hansen
Hi


 We are using metadata api to create user, the post payload looks like this.

 {
 users: [
 {
 disabled: false,


Why do you have this here? this is part of userCredentials


 organisationUnits: [
 {
 name: MSF,
 id: 2cf79e8f137
 }
 ],
 dataViewOrganisationUnits: [
 {
 name: MSF,
 id: 2cf79e8f137
 }
 ],
 userCredentials: {
 username: foo@dubia.msf.org,
 password: aab24180611c714b04f572c737a324ae,
 userAuthorityGroups: [
 {
 name: HQ,
 id: hq
 }
 ]
 },
 surname: Bar,
 name: Foo Bar,
 firstName: Foo,
 selfRegistered: false,
 id: 7,


This ID makes no sense, where do you get this from?


 email: foo@dubia.msf.org,
 strategy: create_and_update


Strategy is not on the user class..


 }
 ]
 }


 This post is failing with the error :

 No IdentifiableObjectStore found for class: class
 org.hisp.dhis.user.UserCredentials (DefaultIdentifiableObjectManager.java


You can ignore this


 We debugged a little, it looks like the there are some change in structure
 of UserCredential object which is breaking the API.


What changes? I don't see any changes to that class

--
Morten




 Any help on this asap is greatly appreciated.

 Thanks

 Kiran.

 ___
 Mailing list: https://launchpad.net/~dhis2-devs
 Post to : dhis2-devs@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~dhis2-devs
 More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp