# Understanding "items" metadata of within api/categories

**URL:** <https://community.dhis2.org/t/understanding-items-metadata-of-within-api-categories/59943>\
**Category:** Support - Assistance technique\
**Created:** [11 July 2024 14:02 UTC](https://community.dhis2.org/t/understanding-items-metadata-of-within-api-categories/59943 "2024-07-11T14:02:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Boddie](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/matthew_boddie/32/34043_2.png) [@Matthew\_Boddie](https://community.dhis2.org/u/Matthew_Boddie)\
**Post date:** [11 July 2024 14:02 UTC](https://community.dhis2.org/t/understanding-items-metadata-of-within-api-categories/59943/1 "2024-07-11T14:02:02Z")

</div>

Hi All,

Curious to find out why there are duplicate UIDs of categoryOptions in categories endpoint within section of “items”. The list of “items” is congruent with categoryOptions, but isn’t needed when importing and seems to simply duplicate the list whenever it is updated. For us with a crazy (\>20,000) amount of CategoryOptions, we’d prefer to omit this if it isn’t necessary/being used for anything on the backend. If it is used for something, would be curious what for and if we can make use of it!

Best,  
Matt

---

<div class="post-metadata">

**Author:** ![jason](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jason/32/32739_2.png) [@jason](https://community.dhis2.org/u/jason)\
**Post date:** [12 July 2024 14:00 UTC](https://community.dhis2.org/t/understanding-items-metadata-of-within-api-categories/59943/2 "2024-07-12T14:00:48Z")

</div>

Seems a bit odd. Could you share an example?

---

<div class="post-metadata">

**Author:** ![Matthew\_Boddie](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/matthew_boddie/32/34043_2.png) [@Matthew\_Boddie](https://community.dhis2.org/u/Matthew_Boddie)\
**Post date:** [12 July 2024 14:07 UTC](https://community.dhis2.org/t/understanding-items-metadata-of-within-api-categories/59943/3 "2024-07-12T14:07:29Z")

</div>

> **[DHIS 2 Demo - Sierra Leone](https://play.im.dhis2.org/stable-2-40-4-1/api/categories/KfdsGBcoiCa.json)**
>
> DHIS 2

{“href”:“[DHIS 2 Demo - Sierra Leone](https://play.im.dhis2.org/stable-2-40-4-1/api/categories/KfdsGBcoiCa%22,%22code%22:%22BIRTHS_ATTENDED%22,%22name%22:%22Births) attended by”,“created”:“2011-12-24T12:24:25.155”,“lastUpdated”:“2022-03-22T08:59:30.023”,“translations”:[{“locale”:“fr”,“property”:“SHORT\_NAME”,“value”:“French”},{“locale”:“fr”,“property”:“NAME”,“value”:“French”}],“externalAccess”:false,“publicAccess”:“rw------”,“createdBy”:{“id”:“GOLswS44mh8”,“code”:null,“name”:“Tom Wakiki”,“displayName”:“Tom Wakiki”,“username”:“system”},“userGroupAccesses”:[{“access”:“rw------”,“displayName”:“Family Planning Program”,“userGroupUid”:“qMjBflJMOfB”,“id”:“qMjBflJMOfB”}],“userAccesses”:[{“access”:“rw------”,“displayName”:“John Barnes”,“userUid”:“DXyJmlo9rge”,“id”:“DXyJmlo9rge”}],“access”:{“manage”:true,“externalize”:false,“write”:true,“read”:true,“update”:true,“delete”:true},“favorites”:,“sharing”:{“owner”:“GOLswS44mh8”,“external”:false,“users”:{“DXyJmlo9rge”:{“displayName”:“John Barnes”,“access”:“rw------”,“id”:“DXyJmlo9rge”}},“userGroups”:{“qMjBflJMOfB”:{“displayName”:“Family Planning Program”,“access”:“rw------”,“id”:“qMjBflJMOfB”}},“public”:“rw------”},“shortName”:“Births attended by”,“dimensionType”:“CATEGORY”,“dataDimensionType”:“DISAGGREGATION”,“dataDimension”:false,**“items”:[{“id”:“TNYQzTHdoxL”},{“id”:“TXGfLxZlInA”},{“id”:“QgULqw9YDu2”},{“id”:“OjIOxG7vgna”},{“id”:“uZUnebiT5DI”},{“id”:“HTHvCohKoXt”}]**,“allItems”:false,**“categoryOptions”:[{“id”:“TNYQzTHdoxL”},{“id”:“TXGfLxZlInA”},{“id”:“QgULqw9YDu2”},{“id”:“OjIOxG7vgna”},{“id”:“uZUnebiT5DI”},{“id”:“HTHvCohKoXt”}]**,“categoryCombos”:[{“id”:“m2jTvAj5kkm”}],“dimension”:“KfdsGBcoiCa”,“displayShortName”:“Births attended by”,“displayName”:“Births attended by”,“user”:{“id”:“GOLswS44mh8”,“code”:null,“name”:“Tom Wakiki”,“displayName”:“Tom Wakiki”,“username”:“system”},“favorite”:false,“displayFormName”:“Births attended by”,“id”:“KfdsGBcoiCa”,“attributeValues”:}

---

<div class="post-metadata">

**Author:** ![Matthew\_Boddie](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/matthew_boddie/32/34043_2.png) [@Matthew\_Boddie](https://community.dhis2.org/u/Matthew_Boddie)\
**Post date:** [24 July 2024 16:39 UTC](https://community.dhis2.org/t/understanding-items-metadata-of-within-api-categories/59943/4 "2024-07-24T16:39:25Z")

</div>

@jason whatcha think?

---

<div class="post-metadata">

**Author:** ![jason](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jason/32/32739_2.png) [@jason](https://community.dhis2.org/u/jason)\
**Post date:** [29 July 2024 12:59 UTC](https://community.dhis2.org/t/understanding-items-metadata-of-within-api-categories/59943/5 "2024-07-29T12:59:10Z")

</div>

@Matthew_Boddie yeah, I think it does not seem ideal to repeat all of this, especially with your setup. Most of the backend team is on vacation now, but I will try and see if I can get an answer for you.

In the meantime, I would strongly suggest that you adjust your API calls to just exclude the `items` because, as you note, its not needed for import. This should work using the `:owner` preset.

> **[DHIS 2 Demo - Sierra Leone](https://play.im.dhis2.org/stable-2-40-4-1/api/categories/KfdsGBcoiCa?fields=:owner)**
>
> DHIS 2

Regards,  
Jason

---

<div class="post-metadata">

**Author:** ![Matthew\_Boddie](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/matthew_boddie/32/34043_2.png) [@Matthew\_Boddie](https://community.dhis2.org/u/Matthew_Boddie)\
**Post date:** [29 July 2024 14:31 UTC](https://community.dhis2.org/t/understanding-items-metadata-of-within-api-categories/59943/6 "2024-07-29T14:31:25Z")

</div>

very cool, thanks for the :owner workaround, will definitely use that.
