Re: [Dhis2-devs] DHIS-2 API: Partial Update of organisation objects (extra attributes)

2017-11-26 Thread Morten Olav Hansen
Hi

That syntax does not work anymore, please try without the /name part at the
end

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Fri, Nov 24, 2017 at 7:19 PM, Omer Butt  wrote:

> Hi,
>
> Dhis-2 Developer Guide:
> I have to use partial update Api to update the organisation unit
> attributes .But could not get it. Can you please make sample for orgunit
> attribute update using api.
>
> *below is the api for Partial Update .*
>
> The format for updating a single property is the same as when you are
> updating a complete object, just with only 1 property in the JSON/XML file,
> i.e.:
>
> curl -X PATCH -d "{\"name\": \"New Name\"}" -H "Content-Type: 
> application/json"
> -u admin:district 
> https://play.dhis2.org/dev/api/26/dataElements/fbfJHSPpUQD/name
>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_4138212393021094125_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> ___
> 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


[Dhis2-devs] DHIS-2 API: Partial Update of organisation objects (extra attributes)

2017-11-24 Thread Omer Butt
Hi,

Dhis-2 Developer Guide:
I have to use partial update Api to update the organisation unit attributes
.But could not get it. Can you please make sample for orgunit attribute
update using api.

*below is the api for Partial Update .*

The format for updating a single property is the same as when you are
updating a complete object, just with only 1 property in the JSON/XML file,
i.e.:

curl -X PATCH -d "{\"name\": \"New Name\"}" -H "Content-Type: application/json"
-u admin:district
https://play.dhis2.org/dev/api/26/dataElements/fbfJHSPpUQD/name



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
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


[Dhis2-devs] DHIS-2 API : Update org Unit and their attribute values

2017-11-22 Thread Omer Butt
Hi,

How to Update org Unit fields like name,short Name etc and their* extra
attributes* using web API.

Kindly Guide.


Thanks


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
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] DHIS-2 API For setting attributes values of organisation unit.

2017-11-21 Thread Morten Olav Hansen
Hi Omer

Just use the normal OU payload, and add the attributes:

{
   ... normal OU payload,
   "attributes": [
  { "attribute": {"id": "UID OF ATTRIBUTE"}, "value": "value1"},
  { "attribute": {"id": "UID OF ATTRIBUTE"}, "value": "value2"}
   ]
}

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Wed, Nov 22, 2017 at 12:08 PM, Omer Butt  wrote:

> Hi,
>
> I have studied developer guide for searching an API: *That will set the
> value of extra attributes that i have added to organisation unit. *
> Could not find yet.
>
> *For Example :*
>
> Attribute id:abc (*which is the extra field/attribute of organisation
> unit )*
> Attribute value: 123
> set it to org unit - id :abcxmsms etcc;
>
> Can you please guide me for this API? Or any Reference ?
>
> Thanks
>
>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_3764885447493149455_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> ___
> 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


[Dhis2-devs] DHIS-2 API For setting attributes values of organisation unit.

2017-11-21 Thread Omer Butt
Hi,

I have studied developer guide for searching an API: *That will set the
value of extra attributes that i have added to organisation unit. *
Could not find yet.

*For Example :*

Attribute id:abc (*which is the extra field/attribute of organisation unit
)*
Attribute value: 123
set it to org unit - id :abcxmsms etcc;

Can you please guide me for this API? Or any Reference ?

Thanks




Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
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] DHIS-2 Api

2017-10-05 Thread Knut Staring
This is an unfortunate historical remnant..

On Oct 5, 2017 12:59 PM, "Stian Sandvold"  wrote:

> Hi Omer,
>
> Data values are stored to the datavalue table in the database. You can
> look at the column named "sourceid" to find a reference to the organisation
> unit used to store this value.
>
> Hope this helps.
>
> On Thu, Oct 5, 2017 at 6:58 AM, Omer Butt  wrote:
>
>> Hi,
>>
>> I have used this api for sending data values of data set to dhis2
>> database.
>>
>> curl -d @datavalueset.json "https://play.dhis2.org/demo/api/26/dataValueSets;
>>   -H "Content-Type:application/json" -u admin:district -v
>>
>> I passed Org unit id, data set id with data values of data set etc.
>>
>> In DB where orgunit and data set is saved for these data values of data set. 
>> because in data values table only data values are saved.
>>
>> I have to access which org unit is saved this data set.
>>
>> kindly help.
>>
>> Thanks
>>
>>
>> ___
>> 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
>>
>>
>
>
> --
> Stian Sandvold
> Software developer, DHIS2
> University of Oslo
> http://www.dhis2.org
>
> ___
> 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] DHIS-2 Api

2017-10-05 Thread Stian Sandvold
Hi Omer,

Data values are stored to the datavalue table in the database. You can look
at the column named "sourceid" to find a reference to the organisation unit
used to store this value.

Hope this helps.

On Thu, Oct 5, 2017 at 6:58 AM, Omer Butt  wrote:

> Hi,
>
> I have used this api for sending data values of data set to dhis2 database.
>
> curl -d @datavalueset.json "https://play.dhis2.org/demo/api/26/dataValueSets;
>   -H "Content-Type:application/json" -u admin:district -v
>
> I passed Org unit id, data set id with data values of data set etc.
>
> In DB where orgunit and data set is saved for these data values of data set. 
> because in data values table only data values are saved.
>
> I have to access which org unit is saved this data set.
>
> kindly help.
>
> Thanks
>
>
> ___
> 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
>
>


-- 
Stian Sandvold
Software developer, DHIS2
University of Oslo
http://www.dhis2.org
___
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] DHIS-2 API

2017-09-20 Thread Jan Henrik Øverland
Hi Omer,

Like Harsh says, just replace the level param with a filter. In your case
it will be:

*api/organisationUnits/cdp3S26sBwA.json?**fields*
*=children[id,name,level]=true=children.level:eq:6*

On 20 September 2017 at 08:36, Harsh Atal  wrote:

> Hi Omer
>
> May be this works for you :
>
> *https://play.dhis2.org/demo/api/organisationUnits/ImspTQPwCqd?fields=children[id,level]=true=children.level:eq:3
> *
>
>
> Regards
> harsh
>
>
>
>
>
> On 20 September 2017 at 11:42, Lars Helge Øverland  wrote:
>
>> Hi Omer,
>>
>> it seems you are right. Please report it as a bug in Jira. We will have a
>> look at it.
>>
>> regards,
>>
>> Lars
>>
>>
>> On Wed, Sep 20, 2017 at 6:52 AM, Omer Butt 
>> wrote:
>>
>>> Hi,
>>> can you please how to get a level 6  orgunit only by using DHIS-2 API;
>>>
>>> I used this api but It Respone all org unit under specific org unit.
>>> I want  only level 6 org unit that uder specific org unit.
>>>
>>> * level=6 conditon not working. How to use it ?*
>>> *URL:*
>>>
>>>
>>> *API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true=6*
>>>
>>> Kindly Help me .
>>>
>>> ___
>>> 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
>>>
>>>
>>
>>
>> --
>> Lars Helge Øverland
>> Lead developer, DHIS 2
>> University of Oslo
>> Skype: larshelgeoverland
>> l...@dhis2.org
>> http://www.dhis2.org 
>>
>>
>> ___
>> 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
>
>


-- 
Jan Henrik Øverland
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org 
___
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] DHIS-2 API

2017-09-20 Thread Harsh Atal
Hi Omer

May be this works for you :

*https://play.dhis2.org/demo/api/organisationUnits/ImspTQPwCqd?fields=children[id,level]=true=children.level:eq:3
*


Regards
harsh





On 20 September 2017 at 11:42, Lars Helge Øverland  wrote:

> Hi Omer,
>
> it seems you are right. Please report it as a bug in Jira. We will have a
> look at it.
>
> regards,
>
> Lars
>
>
> On Wed, Sep 20, 2017 at 6:52 AM, Omer Butt  wrote:
>
>> Hi,
>> can you please how to get a level 6  orgunit only by using DHIS-2 API;
>>
>> I used this api but It Respone all org unit under specific org unit.
>> I want  only level 6 org unit that uder specific org unit.
>>
>> * level=6 conditon not working. How to use it ?*
>> *URL:*
>>
>>
>> *API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true=6*
>>
>> Kindly Help me .
>>
>> ___
>> 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
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org 
>
>
> ___
> 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] DHIS-2 API

2017-09-20 Thread Lars Helge Øverland
Hi Omer,

it seems you are right. Please report it as a bug in Jira. We will have a
look at it.

regards,

Lars


On Wed, Sep 20, 2017 at 6:52 AM, Omer Butt  wrote:

> Hi,
> can you please how to get a level 6  orgunit only by using DHIS-2 API;
>
> I used this api but It Respone all org unit under specific org unit.
> I want  only level 6 org unit that uder specific org unit.
>
> * level=6 conditon not working. How to use it ?*
> *URL:*
>
>
> *API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true=6*
>
> Kindly Help me .
>
> ___
> 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
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
l...@dhis2.org
http://www.dhis2.org 
___
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


[Dhis2-devs] DHIS-2 API

2017-09-19 Thread Omer Butt
Hi,
can you please how to get a level 6  orgunit only by using DHIS-2 API;

I used this api but It Respone all org unit under specific org unit.
I want  only level 6 org unit that uder specific org unit.

* level=6 conditon not working. How to use it ?*
*URL:*

*API:/api/organisationUnits/cdp3S26sBwA.json?includeDescendants=true=6*

Kindly Help me .
___
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] DHIS-2 API

2017-09-10 Thread Morten Olav Hansen
Hi Omer

Please have a look at our data set completeness APIs

https://docs.dhis2.org/master/en/developer/html/webapi_complete_data_set_registrations.html

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Mon, Sep 11, 2017 at 11:08 AM, Omer Butt  wrote:

> *Question:*
> I am Using DHIS-2 API's in my project.
> I have done data entry for data sets for the month
> of June,July and Aug 2017.
>
> Now I want a list that contain detail   about the data entry status of
> data sets for months.
> I have to achieve this using DHIS-2 API's.
>
> *For Example:*
>
> *list would be like this:*
>
> *Sr.No   --Org Unit -- Data set   --Period --Status*
>   1   Okara FM-12017-07
>  completed
>   2   THQ   FM-22017-08
>  completed
>
>
> Kindly Help me To get solution that fulfill this requirement or something
> like this.
>
>
> Thanks.
>
> ___
> 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


[Dhis2-devs] DHIS-2 API

2017-09-10 Thread Omer Butt
*Question:*
I am Using DHIS-2 API's in my project.
I have done data entry for data sets for the month
of June,July and Aug 2017.

Now I want a list that contain detail   about the data entry status of data
sets for months.
I have to achieve this using DHIS-2 API's.

*For Example:*

*list would be like this:*

*Sr.No   --Org Unit -- Data set   --Period --Status*
  1   Okara FM-12017-07completed
  2   THQ   FM-22017-08completed


Kindly Help me To get solution that fulfill this requirement or something
like this.


Thanks.
___
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


[Dhis2-devs] DHIS-2 API for data entry of data sets

2017-08-30 Thread Omer Butt
Sir,
I used  this API: */api/dataValueSets *to send data values to data set
elements(Save in DB Successffully).

 How to pass/integrate * "**dataSetComplete=true"  w*ith this api.

Thanks
___
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