/api/space/domain-management/domains

The following operations are supported on this resource:

  • GET - Get the Global domain and all its top-level children
  • GET - This API is used to return all domains in Space
  • POST - Add a new domain to the list of domains in Junos Space
GET /domains Version 1

Get the Global domain and all its top-level children.

Sample Usage

GET /domains


  • Sample Output XML:
    <domain href="/api/space/domain-management/domains/32769" uri="/api/space/domain-management/domains">
         <write-enabled>true</write-enabled>
         <id>32769</id>
         <child-count>1</child-count>
         <description>Description for SYSTEM DOMAIN</description>
         <name>Global</name>
         <created-at>Thu Apr 20 2017 07:26 PM UTC</created-at>
         <modified-at>Thu Apr 20 2017 07:27 PM UTC</modified-at>
         <parent href= "/api/space/domain-management/domains/32768">
           <id>32768</id>
           <name>SYSTEM</name>
         </parent>
         <children uri="/api/space/domain-management/domains/children">
               <domain href="/api/space/domain-management/domains/819407" uri="/api/space/domain-management/domains/children/819407">
                   <id>819407</id>
                   <modified-at>Thu Apr 20 2017 07:27 PM UTC</modified-at>
                   <description>Thu Apr 20 2017 07:26 PM UTC</description>
                   <name>Child</name>
                   <child-count>1</child-count>
                   <description>Description for child Domain</description>
                   <domain-type>CUSTOM</domain-type>
                   <write-enabled>true</write-enabled>
                   <child-lock>false</child-lock>
                   <no-of-assigned-devices>1</no-of-assigned-devices>
                   <no-of-assigned-users>1</no-of-assigned-users>
                   <no-of-assigned-remote-profile>1</no-of-assigned-remote-profile>
               </domain>
         </children>
         <child-lock>true</child-lock>
         <domain-type>GLOBAL</domain-type>
         <no-of-assigned-devices>1</no-of-assigned-devices>
         <no-of-assigned-users>1</no-of-assigned-users>
         <no-of-assigned-remote-profile>1</no-of-assigned-remote-profile>
         <users href="/api/space/domain-management/domains/32769/users"/>
         <profiles href="/api/space/domain-management/domains/32769/profiles"/>
         <devices href="/api/space/domain-management/domains/32769/devices"/>
    </domain>

  • Sample Output JSON:
    {
       "domain" : {
         "@href" : "/api/space/domain-management/domains/32769" ,
         "@uri" : "/api/space/domain-management/domains" ,
         "write-enabled" : "true" ,
         "id" : 32769 ,
         "child-count" : 1 ,
         "description" : "Global Domain" ,
         "name" : "Global" ,
         "created-at" : "Thu Apr 20 2017 07:27 PM UTC" ,
         "modified-at" : "Thu Apr 20 2017 07:26 PM UTC" ,
         "parent": {
           "@href": "/api/space/domain-management/domains/32768",
           "id": 32768,
           "name": "SYSTEM"
         },
         "children" : {
           "@uri" : "/api/space/domain-management/domains/children" ,
           "domain" : {
             "@href" : "/api/space/domain-management/domains/819407" ,
             "@uri" : "/api/space/domain-management/domains/children/819407" ,
             "id" : 819407 ,
             "name" : "Child" ,
             "child-count" : 1 ,
             "created-at" : "Thu Apr 20 2017 07:27 PM UTC" ,
             "modified-at" : "Thu Apr 20 2017 07:26 PM UTC" ,
             "description" : "Global Domain" ,
             "write-enabled" : true ,
             "domain-type" : "CUSTOM" ,
             "child-lock" : false ,
             "no-of-assigned-devices" : 1 ,
             "no-of-assigned-users" : 1 ,
             "no-of-assigned-remote-profile" : 1
           }
         } ,
         "child-lock" : true ,
           "domain-type" : "Global" ,
         "no-of-assigned-devices" : 1 ,
         "no-of-assigned-users" : 1 ,
         "no-of-assigned-remote-profile" : 1 ,
         "users" : {
           "@href" : "/api/space/domain-management/domains/32769/users"
         } ,
         "profiles" : {
           "@href" : "/api/space/domain-management/domains/32769/profiles"
         } ,
         "devices" : {
           "@href" : "/api/space/domain-management/domains/32769/devices"
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: DefaultRead

    GET /domains Version 2

    This API is used to return all domains in Space.

    Sample Usage

    GET /domains


  • Sample Output XML:
    <domains total="2" uri="/api/space/domain-management/domains">
         <domain href="/api/space/domain-management/domains/32769" uri="/api/space/domain-management/domains/32769">
               <id>32769</id>
               <name>Global</name>
               <children total="1" uri="/api/space/domain-management/domains/32769/children">
                   <domain href="/api/space/domain-management/domains/32769" uri="/api/space/domain-management/domains/32769/children/819407">
                         <child-count>0</child-count>
                         <id>819407</id>
                         <name>Child</name>
                         <child-lock>false</child-lock>
                   </domain>
               </children>
               <child-count>0</child-count>
               <child-lock>false</child-lock>
               <domain-type>CUSTOM</domain-type>
         </domain>
    </domains>

  • Sample Output JSON:
    {
       "domains" : {
         "@total" : "2" ,
         "@uri" : "/api/space/domain-management/domains" ,
         "domain" : {
           "@href" : "/api/space/domain-management/domains/32769" ,
           "@uri" : "/api/space/domain-management/domains/32769" ,
           "id" : 32769 ,
           "name" : "Global" ,
           "children" : {
             "@total" : "1" ,
             "@uri" : "/api/space/domain-management/domains/32769/children" ,
             "domain" : {
               "@href" : "/api/space/domain-management/domains/32769" ,
               "@uri" : "/api/space/domain-management/domains/32769/children/819407" ,
               "child-count" : 0 ,
               "id" : 819407 ,
               "name" : "Child" ,
               "child-lock" : "false"
             }
           } ,
           "child-count" : 0 ,
           "child-lock" : "false" ,
           "domain-type" : "CUSTOM"
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: DefaultRead

      For other non-deprecated versions of this API, refer to :
    • version 1


    POST /domains Version 1

    Add a new domain to the list of domains in Junos Space.

    Sample Usage

    POST /domains


  • Sample Input XML:
    <domain>
         <name>test</name>
         <description>Description for test Domain</description>
         <child-lock>false</child-lock>
    </domain>

  • Sample Output XML:
    <domain href="/api/space/domain-management/domains/819702" uri="/api/space/domain-management/domains/819702">
         <write-enabled>false</write-enabled>
         <id>819702</id>
         <child-count>0</child-count>
         <description>Description for test Domain</description>
         <name>String</name>
         <parent href= "/api/space/domain-management/domains/65536">
           <id>65536</id>
           <name>Global</name>
           <created-at>Thu Apr 20 2017 07:27 PM UTC</created-at>
           <modified-at>Thu Apr 20 2017 07:26 PM UTC</modified-at>
         </parent>
         <name>test</name>
         <children uri="/api/space/domain-management/domains/819702/children" />
         <child-lock>false</child-lock>
         <domain-type>CUSTOM</domain-type>
         <no-of-assigned-devices>0</no-of-assigned-devices>
         <no-of-assigned-users>0</no-of-assigned-users>
         <no-of-assigned-remote-profile>0</no-of-assigned-remote-profile>
         <users href="/api/space/domain-management/domains/819702/users"/>
         <profiles href="/api/space/domain-management/domains/819702/profiles"/>
         <devices href="/api/space/domain-management/domains/819702/devices"/>
    </domain>

  • Sample Input JSON:
    {
       "domain" : {
         "name" : "test" ,
         "description" : "Description for test Domain" ,
         "child-lock" : false
       }
    }

  • Sample Output JSON:
    {
       "domain" : {
         "@href" : "/api/space/domain-management/domains/819702" ,
         "@uri" : "/api/space/domain-management/domains/819702" ,
         "write-enabled" : false ,
         "id" : 819702 ,
         "child-count" : "0" ,
         "description" : "Description for test Domain" ,
         "name" : "test" ,
         "created-at" : "Thu Apr 20 2017 07:27 PM UTC" ,
         "modified-at" : "Thu Apr 20 2017 07:26 PM UTC" ,
         "parent": {
           "@href": "/api/space/domain-management/domains/32769",
           "id": 32769,
           "name": "Global"
         },
         "children" : {
           "@uri" : "/api/space/domain-management/domains/819702/children"
         } ,
         "child-lock" : false ,
         "domain-type" : "CUSTOM" ,
         "no-of-assigned-devices" : 0 ,
         "no-of-assigned-users" : 0 ,
         "no-of-assigned-remote-profile" : 0 ,
         "users" : {
           "@href" : "/api/space/domain-management/domains/819702/users"
         } ,
         "profiles" : {
           "@href" : "/api/space/domain-management/domains/819702/profiles"
         } ,
         "devices" : {
           "@href" : "/api/space/domain-management/domains/819702/devices"
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: CreateDomain