Previous Topic: group ObjectNext Topic: quota Object


user Object

Use this object to manage CA AppLogic user accounts.

Method

Description

list

Retrieve list of users

info

Retrieve information for a user

create

Create a user

destroy

Destroy a user

set

Set information for a user

unlock

Unlock a user

get_newobj_acl

Retrieve the new object ACL definition associated to a user

put_newobj_acl

Replace the entire new object ACL definition associated to a user

modify_newobj_acl

Replace portion of a new object ACL definition associated to a user

list Method (user Object)
Description

Retrieve list of users for a grid

Syntax
/api/v2/user/list?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve list of users.

GET http://192.168.123.200/api/v2/user/list?vdc=mygrid 
Sample Output
XML:

<users>
  <user>
    <loginenabled>1</loginenabled>
    <loginname>ak</loginname>
    <realname></realname>
    <scope>local</scope>
  </user>
  <user>
    <loginenabled>1</loginenabled>
    <loginname>api</loginname>
    <realname></realname>
    <scope>local</scope>
  </user>
</users>
JSON:

{
   "user" : [
   {
      "realname" : "",
      "loginenabled" : "1",
      "loginname" : "api",
      "scope" : "local"
   },
   {
      "realname" : "",
      "loginenabled" : "1",
      "loginname" : "ak",
      "scope" : "local"
   }
   ]
}


HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

info Method (user Object)
Description

Retrieve information for a user

Syntax
/api/v2/user/info?user=user&vdc=controller-name 
Arguments
user

Username

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve information for a user named test@CA.com.

GET http://192.168.123.200/api/v2/user/info?user=test@CA.com&vdc=mygrid 
Sample Output
XML:

<opt>
  <user0>
    <loginenabled>1</loginenabled>
    <loginname>ak</loginname>
    <realname></realname>
    <scope>local</scope>
  </user0>
</opt>
JSON:

{
   "user1" : {
      "realname" : "",
      "loginenabled" : "1",
      "loginname" : "api",
      "scope" : "local"
   }
HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (user). - Argument user=username missing in the request.

404.1

unknown@CA.NOSPAM.com does not exist. - Invalid user specified in the request.

create Method (user Object)
Description

Create a user

Syntax
/api/v2/user/create?user=user&pwd=password&vdc=controller-name 
Arguments
user

Username

pwd

User password

vdc

Name of the target virtual data center

Options
group

A comma-separated list of groups the user must become a member of

The first group in the list becomes the user’s primary group.

keyN=valueN

User profile property settings

Option flags
pwd

User’s password

sshkey

A public SSH key to install as the user’s access key to the CLI.

Must be either RSA or DSA base-64 encoded.

Note: See User Management in the Command Line Shell Reference for descriptions of the options available for this command.

Transaction Type

synchronous

Request Type

GET

Examples

Create a user named test@CA.com.

GET http://192.168.123.200/api/v2/user/create?user=test@CA.com&pwd=password&vdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (user). - Argument user=username missing in the request.

400.4

Missing required arguments (pwd). - Argument pwd=password missing in the request.

404.1

unknown@CA.NOSPAM.com already exists. - User specified in the request already exists.

destroy Method (user Object)
Description

Destroy a user

Syntax
/api/v2/user/destroy?user=user&vdc=controller-name 
Arguments
user

Username

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Destroy a user named test@CA.com.

GET http://192.168.123.200/api/v2/user/destroy?user=test@3teraCAvdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (user). - Argument user=username missing in the request.

404.1

unknown@CA.NOSPAM.com does not exist. - Invalid user specified in the request.

set Method (user Object)
Description

Set information for a user

Syntax
/api/v2/user/set?user=user&vdc=controller-name 
Arguments
user

Name of the user

vdc

Name of the target virtual data center

Options
group

A comma-separated list of groups the user must become a member of

The first group in the list becomes the user’s primary group.

keyN=valueN

User profile property settings

Option flags
pwd

User’s password

sshkey

A public SSH key to install as the user’s access key to the CLI.

Must be either RSA or DSA base-64 encoded.

Note: See User Management in the Command Line Shell Reference for descriptions of the options available for this command.

Transaction Type

synchronous

Request Type

GET

Examples

Set real name for a user named test@CA.com.

GET http://192.168.123.200/api/v2/user/set?user=test@CA.com&realname=John&vdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (user). - Argument user=username missing in the request.

404.1

unknown@CA.NOSPAM.com does not exist. - Invalid user specified in the request.

unlock Method (user Object)
Description

Unlock a user

Syntax
/api/v2/user/unlock?user=user&vdc=controller-name 
Arguments
user

Username

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Unlock user named test@CA.com.

GET http://192.168.123.200/api/v2/user/unlock?user=test@3teraCAvdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (user). - Argument user=username missing in the request.

404.1

unknown@CA.NOSPAM.com does not exist. - Invalid user specified in the request.

get_newobj_acl Method (user Object)
Description

Display the new object ACL definition associated to a user, or display that portion of the new object ACL definition which relates to a particular principal.

Syntax
/api/v2/user/get_newobj_acl?user=user&principal=principal&vdc=vdc 
Arguments
user

Name of the user. Prepend the user name with / to indicate a global user.

principal

A URL-encoded principal

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples
GET http://192.168.123.200/api/v2/user/get_newobj_acl?user=apiuser&principal=&vdc=mygrid
Sample Output
XML:

<acl>
  <entries>
    <entry>
      <full>1</full>
      <id>a5cb10bc-7291-4a86-84f8-74419fc9ae63</id>
    </entry>
  </entries>
  <owner>
    <id></id>
  </owner>
</acl>
JSON:

{
   "acl" : {
      "owner" : {
         "id" : ""
      },
      "entries" : [
         {
            "id" : "a5cb10bc-7291-4a86-84f8-74419fc9ae63",
            "full" : 1
         }
      ]
   }
}

HTTP Error Codes
404

Entity vdc vdc not found - A VDC name was specified that is not configured in the WS_API application.

404.1

Entity not found - There is no principal name match for 'principal'

400.4

Missing required arguments (user). - Argument user=user missing in the request.

Note: This API is available with WS_API_r10-1.0.10-1 and above.

put Method (user Object)
Description

Replace the entire new object ACL definition associated to a user.

Syntax
/api/v2/user/put_newobj_acl?user=user&acl=<ACLs>&vdc=controller-name 
Arguments
user

Name of the user; prepend the user name with / to indicate a global user.

acl

URL-encoded list of principals separated with a slash (/)

principal

A URL-encoded principal

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

GET
http://192.168.123.200/api/v2/user/put_newobj_acl?user=apiusr&acl=apiusrp%3Downer%2Ftest%403tera.com%3Dconfigure&vdc=mygrid

Sample Output
JSON:

{
   "message" : ""
} 

XML:

<message></message>

HTTP Error Codes
400

Entity vdc mygrid not found
- A VDC name was specified that is not configured in the WS_API application.

404.1

Entity not found - There is no principal name match for 'principal'

400.4

Missing required arguments (acl). - Argument acl=<ACL> missing in the request.

400.4

Missing required arguments (user). - Argument user=user missing in the request.

Note: This API is available with WS_API_r6-1.0.6-1 and above.

modify_newobj_acl Method (user Object)
Description

Replace that portion of a new object ACL definition associated to a user which relates to the owner or a principal entry.

Syntax
/api/v2/user/modify_newobj_acl?user=user&acl=<ACLs>&vdc=controller-name 
 
Arguments
user

Name of the user; prepend the user name with / to indicate a global user.

acl

URL-encoded list of principals separated with a slash (/)

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples
GET http://192.168.123.200/api/v2/user/modify_newobj_acl?user=apiusr&acl=apiusr%3Downer%2Ftest%403tera.com%3Dconfigure&vdc=mygrid 
Sample Output
XML:

<message></message>

JSON:

{
   "message" : ""
} 

HTTP Error Codes
404

Entity vdc controller-name not found - A VDC name was specified that is not configured in the WS_API application.

404.1

Entity not found - There is no principal name match for 'principal'

400.4

Missing required arguments (acl). - Argument acl=<ACL> missing in the request.

400.4

Missing required arguments (user). - Argument user=user missing in the request.

Note: This API is available with WS_API_r10-1.0.10-1 and above.