{"id":5174,"date":"2026-06-18T10:58:56","date_gmt":"2026-06-18T10:58:56","guid":{"rendered":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/?page_id=5174"},"modified":"2026-06-19T05:02:48","modified_gmt":"2026-06-19T05:02:48","slug":"api-to-list-all-organizational-units","status":"publish","type":"page","link":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/organizational-units\/api-to-list-all-organizational-units\/","title":{"rendered":"List all Organizational Units"},"content":{"rendered":"<div class=\"method-copy\">\n<div class=\"method-copy-padding\">\n<h1>List OUs<\/h1>\n<h2>Overview<\/h2>\n<p>This API retrieves a comprehensive list of all Organizational Units (OUs) associated with a specific domain within the Hexnode UEM console. It returns detailed metadata for each OU, including its unique identifier, name, parent mapping, status, and timestamps for creation and modification.<\/p>\n<div class=\"table-responsive\">\n<table id=\"table_18293743\" class=\"table table-bordered\" width=\"100%\">\n<thead>\n<tr>\n<th width=\"15%\"><strong>Argument<\/strong><\/th>\n<th width=\"12%\"><strong>Type<\/strong><\/th>\n<th width=\"30%\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>domain_id<\/td>\n<td>Integer<\/td>\n<td>The unique identifier of the domain from which to fetch the Organizational Units. (Passed as a query parameter in the URL).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"method-example\">\n<div class=\"curl-text\">curl<\/div>\n<div class=\"code-curl code-div active-code\">\n<div class=\"method-example-part\">\n<p>HTTP Request:<\/p>\n<pre class=\"lang:default decode:true\">GET https:\/\/<portalname>.hexnodemdm.com\/api\/v1\/ous\/?domain_id=1\r\n<\/pre>\n<p>Shell Command:<\/p>\n<pre class=\"lang:default decode:true\"> curl -H \"Authorization: <your API key>\" \"https:\/\/<portalname>.hexnodemdm.com\/api\/v1\/ous\/?domain_id=1\"\r\n<\/pre>\n<\/div>\n<\/div>\n<div class=\"code-curl code-div active-code\">\n<div class=\"method-example-part\">\n<p>HTTP Response:<\/p>\n<pre class=\"lang:default decode:true\">{  \r\n  \"count\": 7,  \r\n  \"next\": null,  \r\n  \"previous\": null,  \r\n  \"results\": [  \r\n    {  \r\n      \"id\": 130,  \r\n      \"name\": \"Marketing\",  \r\n      \"guid\": null,  \r\n      \"created_date\": \"2025-12-23T08:51:53.039823Z\",  \r\n      \"modified_date\": \"2025-12-23T08:51:53.039829Z\",  \r\n      \"parent_guid\": \"128\",  \r\n      \"description\": \"Marketing R&D for New York\",  \r\n      \"domain\": 1,  \r\n      \"status\": 1  \r\n    },  \r\n    {  \r\n      \"id\": 128,  \r\n      \"name\": \"Sales\",  \r\n      \"guid\": null,  \r\n      \"created_date\": \"2025-12-23T07:56:05.965809Z\",  \r\n      \"modified_date\": \"2025-12-23T08:51:53.037506Z\",  \r\n      \"parent_guid\": \"126\",  \r\n      \"description\": \"\",  \r\n      \"domain\": 1,  \r\n      \"status\": 1  \r\n    }  \r\n  ]  \r\n} \r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>List OUs Overview This API retrieves a comprehensive list of all Organizational Units (OUs) associated with a specific domain within the Hexnode UEM console. It returns detailed metadata for each OU, including its unique identifier, name, parent mapping, status, and timestamps for creation and modification. Argument Type Description domain_id Integer The unique identifier of the [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":5187,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-5174","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/comments?post=5174"}],"version-history":[{"count":3,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5174\/revisions"}],"predecessor-version":[{"id":5181,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5174\/revisions\/5181"}],"up":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5187"}],"wp:attachment":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/media?parent=5174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}