User Management API

/api/space/user-management/users

The following operations are supported on this resource:

GET /api/space/user-management/users (v1)


This API retrieves all the users based on a passed URI context. It returns a Users transfer object. It also supports the filtering, paging, and sorting of returned data.

Access Control

The following capabilities are required to access this API:
"ReadUser"


Example Usage

GET /api/space/user-management/users

Content Types

  • Produces content types:
    application/vnd.net.juniper.space.user-management.users+xml;version=1
    application/vnd.net.juniper.space.user-management.users+json;version=1


  • Sample Output XML:
    <users size="1"
      uri="/api/space/user-management/users">
     <user key="65859" uri="/api/space/user-management/users/65859"
      href="/api/space/user-management/users/65859">
      <name>super</name>
      <primaryEmail>super@juniper.net</primaryEmail>
      <firstName>Open</firstName>
      <lastName>Space</lastName>
     </user>
    </users>


  • Sample Output JSON:
    {"users": 
    {"@size":"1","@uri":"/api/space/user-management/users"
     "user":[{"@key":"65859",
      "@uri":"/api/space/user-management/users/65859",
      "@href":"/api/space/user-management/users/65859",
      "name":"super",
      "primaryEmail":"super@juniper.net",
      "firstName":"Open",
      "lastName":"Space"
     }]
    }}



POST /api/space/user-management/users (v1)


This API is used to add a user to the database.

Access Control

The following capabilities are required to access this API:
"CreateUser"


Example Usage

POST /api/space/user-management/users

Data Notification

This API supports data notification.

See the following links for information about enabling data notifications changes to be received for this service:

  • Data Notification Usage.


Content Types

  • Consumes content types:
    application/vnd.net.juniper.space.user-management.user+xml;version=1;charset=UTF-8
    application/vnd.net.juniper.space.user-management.user+json;version=1;charset=UTF-8


  • Produces content types:
    application/vnd.net.juniper.space.user-management.user+xml;version=1
    application/vnd.net.juniper.space.user-management.user+json;version=1


  • Sample Input XML:
    <user>
       <name>test</name>
       <firstName>Test</firstName>
       <middleName>Test</middleName>
       <lastName>Test</lastName>
       <password>0Nf72o7CPMCYNY6Ks213EQ==</password>
       <primaryPhone>0013010000001</primaryPhone>
       <primaryEmail>super@juniper.net</primaryEmail>
       <roles>
         <role href="/api/space/user-management/roles/65601" />
         <role href="/api/space/user-management/roles/65603" />
       </roles>
    </user>


  • Sample Output XML:
    <user uri="/api/space/user-management/users/3506194">
      <id>3506194</id>
      <name>test12</name>
      <firstName>Test1</firstName>
      <middleName>Test</middleName>
    <lastName>Test</lastName>
      <password>ofQT2y3J5L5ujweGtHMuXg==</password>
      <primaryPhone>0013010000001</primaryPhone>
      <primaryEmail>super@juniper.net</primaryEmail>
      <roles uri="/api/space/user-management/users/3506194/roles">
        <role uri="/api/space/user-management/users/3506194/roles/65658" href="/api/space/user-management/roles/65658">
          <id>65658</id>
          <name>jobsAdmin</name>

        </role>
      </roles>
      <method href="/api/space/user-management/users/196637/change-password" rel="change-password" />
    </user>


  • Sample Input JSON:
    { "user": {"name":"testUser", "firstName":"testFirstName", "middleName":"testMiddleName", "lastName":"testLastName", "password":"test@123", "primaryPhone":"0013010000001", "primaryEmail":"test@juniper.net", "roles": { "role":[ {"@href":"/api/space/user-management/roles/65601" }, {"@href":"/api/space/user-management/roles/65603" } ]} } }


  • Sample Output JSON:
    { "user": {"@uri":"/api/space/user-management/users/196651", "id":196651, "name":"testuser", "firstName":"testFirstName", "middleName":"testMiddleName", "lastName":"testLastName", "password":"zrbJcGWPMVBKkBuJ3NPkYQ==", "primaryPhone":"0013010000001", "primaryEmail":"test@juniper.net", "roles": {"@uri":"/api/space/user-management/users/196651/roles", "role": [ { "@uri":"/api/space/user-management/users/196651/roles/65655", "@href":"/api/space/user-management/roles/65655", "id":65655, "name":"userAdmin" }, { "@uri":"/api/space/user-management/users/196651/roles/65656", "@href":"/api/space/user-management/roles/65656", "id":65656, "name":"tagsAdmin" } ] }, "method": { "@href":"/api/space/user-management/users/196651/change-password","@rel":"change-password" } } }