/api/space/user-management/users/{id}

The following operations are supported on this resource:

  • GET - Get user by ID and encode the password with * characters
  • PUT - Replace/Update user information
  • DELETE - Delete a user
GET /users/{id} Version 3

Get user by ID and encode the password with * characters.

Sample Usage

GET /users/{id}


  • Parameters:
    Name Type URI Type Description Required
    id Integer Path ID Y
  • Sample Output XML:
    <user href="/api/space/user-management/users/{id}" uri="/api/space/user-management/users/{id}">
         <id>Integer</id>
         <name>String</name>
         <first-name>String</first-name>
         <middle-name>String</middle-name>
         <last-name>String</last-name>
         <password>String</password>
         <password-status>ACTIVE</password-status>
         <password-expiry-date>java.sql.Timestamp</password-expiry-date>
         <status>String</status>
         <primary-email>String</primary-email>
         <primary-phone>String</primary-phone>
         <domain-name>String</domain-name>
         <api-access-profile>String</api-access-profile>
         <roles total="Integer" uri="/api/space/user-management/users/{id}/roles">
               <role href="/api/space/user-management/roles/{roleId}" uri="/api/space/user-management/users/{id}/roles/{roleId}">
                   <role-id>Integer</role-id>
                   <name>String</name>
               </role>
         </roles>
         <role-type>GUI_ROLE_ACCESS</role-type>
         <auth-mode>String</auth-mode>
         <active-user-sessions total="Integer" uri="/api/space/user-management/users/{id}/active-user-sessions">
               <active-user-session
                   href="/api/space/user-management/active-user-sessions/{id}" uri="/api/space/user-management/users/{id}/active-user-sessions/{id}">
                   <id>Integer</id>
                   <name>String</name>
               </active-user-session>
         </active-user-sessions>
         <change-password href="/api/space/user-management/users/{id}/change-password"/>
         <enable-user href="/api/space/user-management/users/{id}/enable-user"/>
         <disable-user href="/api/space/user-management/users/{id}/disable-user"/>
         <capabilities href="/api/space/user-management/users/{id}/capabilities"/>
    </user>

  • Sample Output JSON:
    {
       "user" : {
         "@href" : "/api/space/user-management/users/{id}" ,
         "@uri" : "/api/space/user-management/users/{id}" ,
         "id" : "Integer" ,
         "name" : "String" ,
         "first-name" : "String" ,
         "middle-name" : "String" ,
         "last-name" : "String" ,
         "password" : "String" ,
           "password-status" : "String" ,
           "password-expiry-date" : "java.sql.Timestamp" ,
         "status" : "String" ,
         "primary-email" : "String" ,
         "primary-phone" : "String" ,
         "domain-name" : "String" ,
         "api-access-profile" : "String" ,
         "roles" : {
           "@total" : "Integer" ,
           "@uri" : "/api/space/user-management/users/{id}/roles" ,
           "role" : {
             "@href" : "/api/space/user-management/roles/{roleId}" ,
             "@uri" : "/api/space/user-management/users/{id}/roles/{roleId}" ,
             "role-id" : "Integer" ,
             "name" : "String"
           }
         } ,
         "role-type" : "GUI_ROLE_ACCESS" ,
         "auth-mode" : "String" ,
         "active-user-sessions" : {
           "@total" : "Integer" ,
           "@uri" : "/api/space/user-management/users/{id}/active-user-sessions" ,
           "active-user-session" : {
             "@href" : "/api/space/user-management/active-user-sessions/{id}" ,
             "@uri" : "/api/space/user-management/users/{id}/active-user-sessions/{id}"
             ,
             "id" : "Integer" ,
             "name" : "String"
           }
         } ,
         "change-password" : {
           "@href" : "/api/space/user-management/users/{id}/change-password"
         } ,
         "enable-user" : {
           "@href" : "/api/space/user-management/users/{id}/enable-user"
         } ,
         "disable-user" : {
           "@href" : "/api/space/user-management/users/{id}/disable-user"
         } ,
         "capabilities" : {
           "@href" : "/api/space/user-management/users/{id}/capabilities"
         }
       }
    }

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


    PUT /users/{id} Version 1

    This API is used to modify user information.

    Sample Usage

    PUT /users/{id}?email-password=<email-password>&generate-password=<generate-password>


    • Parameters:
      Name Type URI Type Description Required
      id Integer Path The ID of the user whose information will be modified. Y
      email-password Boolean Query Should the password be mailed to the user? This works only for temporary password. N
      generate-password Boolean Query Generate a temporary password. N
  • Sample Input XML:
    <user>
       <name>test_12</name>
       <firstName>Test</firstName>
       <middleName>Test12</middleName>
       <lastName>Test</lastName>
       <password>0Nf72o7CPMCYNY6Ks213EQ==</password>
       <primaryPhone>0013010000001</primaryPhone>
       <primaryEmail>super@juniper.net</primaryEmail>
       <api-access-profile href="/api/space/user-management/api-access-profiles/12345" />
       <roles>
         <role href="/api/space/user-management/roles/65659" />
       </roles>
         <x509-authentication-parameters>
               <x509-authentication-parameter>
                   <parameter-value>String</parameter-value>
                   <x509-certificate-parameter>
                         <x509-parameter-name>String</x509-parameter-name>
                   </x509-certificate-parameter>
               </x509-authentication-parameter>
         </x509-authentication-parameters>
    </user>

  • Sample Output XML:
    <user uri="/api/space/user-management/users/3506194">
      <id>3506194</id>
      <name>test_12</name>
      <firstName>Test1</firstName>
      <middleName>Test</middleName>
      <lastName>Test</lastName>
      <password>ofQT2y3J5L5ujweGtHMuXg==</password>
      <primaryPhone>0013010000001</primaryPhone>
      <primaryEmail>super@juniper.net</primaryEmail>
       <api-access-profile href="/api/space/user-management/api-access-profiles/12345" >
              <id>12345</id>
            <name>apiaccessprofile</name>
       </api-access-profile>
      <roles uri="/api/space/user-management/users/3506194/roles">
        <role uri="/api/space/user-management/users/3506194/roles/65659"
            href= "/api/space/user-management/roles/65659">
             <id>65659</id>
             <name>auditLogAdmin</ name>
        </role>
      </roles>
         <x509-authentication-parameters>
               <x509-authentication-parameter>
                   <parameter-value>String</parameter-value>
                   <x509-certificate-parameter>
                         <x509-parameter-name>String</x509-parameter-name>
                   </x509-certificate-parameter>
               </x509-authentication-parameter>
         </x509-authentication-parameters>
    </user>

  • Sample Input JSON:

    {
      "user": {
         "name":"test_12",
         "firstName":"Test1",
         "middleName":"Test",
         "lastName":"Test",
         "password":"diJ900Bu5xYJvVGFzfNVaQ==",
         "primaryPhone":"0013010000001",
         "primaryEmail":"super@juniper.net",
        "api-access-profile": {
            "@href":"/api/space/user-management/api-access-profiles/12345"
              },
         "roles": {
             "role":{
                  "@href":"/api/space/user-management/roles/65659"
             }
         },
         "x509-authentication-parameters" : {
           "x509-authentication-parameter" : {
             "parameter-value" : "String" ,
             "x509-certificate-parameter" : {
               "x509-parameter-name" : "String"
             }
           }
         }
      }

  • Sample Output JSON:
    {
      "user": {
          "@uri": "/api/space/user-management/users/3506197",
          "id":3506197,
          "name":"test_12",
          "firstName":"Test1",
          "middleName":"Test",
          "lastName":"Test",
          "password":"ofQT2y3J5L5ujweGtHMuXg==",
          "primaryPhone":"0013010000001",
          "primaryEmail":"super@juniper.net",
        "api-access-profile": {
            "@href":"/api/space/user-management/api-access-profiles/12345",
                 "id": 12345,
                  "name":"apiaccessprofile"
              },
          "roles":{
              "@uri": "/api/space/user-management/users/3506197/roles",
              "role":{
                   ;"@uri":"/api/space/user-management/users/3506197/roles/65659",
                   ;"@href":"/api/space/user-management/roles/65659",
                   ;"id":656598,
                   ;"name":"auditLogAdmin"
              }
          }
      },
         "x509-authentication-parameters" : {
           "x509-authentication-parameter" : {
             "parameter-value" : "String" ,
             "x509-certificate-parameter" : {
               "x509-parameter-name" : "String"
             }
           }
         }
    }

  • Data Notification

    This API supports data notification.

    DELETE /users/{id} Version 1

    This API is used to delete a user specified by user ID.
    DELETE action would force delete the users. Scheduled jobs could be associated to the users. The user may execute the following query to get the list of pending/inprogress jobs and may avoid deleting those users. These jobs can be retrieved with the following API:

    /api/space/job-management/jobs?filter=(user eq 'username' and (job-state eq 'SCHEDULED' or job-state eq 'INPROGRESS' or job-state eq 'STARTING'))

    .

    Sample Usage

    DELETE /users/{id}


    • Parameters:
      Name Type URI Type Description Required
      id Integer Path User ID of the user to be removed from the database. Y

    Access Control

    The following capabilities are required to access this API: DeleteUser

    Data Notification

    This API supports data notification.