API: HTTP Create Account Profile Field
The Create Account Profile Field command allows you to create a new account profile field.
The Create Account Profile Field command requires the following arguments: Command, Realm, Password, and Account Profile Field Name.
api_web?r=myrealm&p=mypass&c=acctproaddfield&acct_pro_field_name=myfield
The command is 'acctproaddfield', the realm is 'myrealm', and the password is 'mypass'. The new field will be named 'myfield'.
Example
Using 'acctproaddfield' with all commands and arguments:
api_web?r=myrealm&p=mypass&c=acctproaddfield&acct_pro_field_name=myfield
Successful results return, where '17' is the ID of the new field:
SUCCESS: 17
Results
The Create Account Profile Field command outputs either a SUCCESS or FAILURE message.
Success
The command success message returns the SUCCESS message followed by the ID of the new field. The result format is:
SUCCESS: [field_id]
Failure
The command will fail if a field with the same name already exists or invalid data is defined. The result format is:
FAILURE: [Reason]
Arguments
This command supports the following arguments:
Name | Req? | Description | Argument |
Command | Yes | Defines the command to use. |
cmd=acctproaddfield c=acctproaddfield |
Realm | Yes | Name of the realm to run the command. This is required, and the command will fail if the realm and password do not match. |
realm=[realm_name] r=[realm_name] |
Password | Yes | Authentication code for API access. This is required, and the command will fail if the realm and password do not match. |
pwd=[password] p=[password] |
Field Name | Yes | Name of the field to create. | acct_pro_field_name=[field_name] |