Understanding How The API Works »
Updating user information using the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
REST Syntax | Associated API Topics |
SOAP Syntax | Create User (API) |
Get User Info (API) | |
Delete User (API) |
REST Syntax
Click to view all REST Resources | |
User/ PUT — Updates a user’s information. Only those fields specified in the Arguments will be updated.
HTTP Action — PUT URIs — https://api.dynect.net/ REST/User/<user_name>/ |
|
Arguments — Click for More Info
NOTE 1: The username must be specified in the URI.
|
|
Response — Click for More Info
string string string string string string string string string string string string string string array string string string |
SOAP Syntax
Click to view all SOAP Commands | |
To change a user’s status, use the BlockUser or UnblockUser commands. BlockUser — Blocks a user from logging in. UnblockUser — Unblocks user and restores active status and the ability of the user to log-in. To change or update all other user information, use UpdateUser. UpdateUser — Updates a user’s information. |
|
Arguments — Click for More Info
BlockUser or UnblockUser: string string UpdateUser:
state — The user’s state.token — Required. The session identifier.user_name — Required.The name of the user to update.website — User’s website in URL format. |
|
Response — Click for More Info
NOTE: The same data is returned for UpdateUser, BlockUser, and UnBlockUser commands.
|
|
Example Request (BlockUser or UnBlockUser) — Click for More Info
{ 'user_name'=>'joe_example', 'token'=> 'zaq12wsxcDe34rf89gt56nh', } |
|
Example Request (UpdateUser) — Click for More Info
{ 'user_name' => 'userx', 'new_user_name' => 'usery', 'password' => 'thepass', 'group_name' => 'ADMIN,OWNER', 'permission' => [ 'RecordGet', 'RecordUpdate' ], 'zone' => [ { zone_name => 'test.com' }, { zone_name => 'test2.com', recurse => 'N' }, ], 'forbid' => [ { name => 'RecordGet' }, { name => 'RecordUpdate', zone => [ { zone_name => 'test.com', recurse => 'N' }, ], }, ], 'nickname' => 'nick1', 'first_name' => 'fname1', 'last_name' => 'lname1,', 'email' => 'dyn@example.com', 'notify_email' => 'notify@example.com', 'pager_email' => 'page@example.com', 'address' => 'address1', 'address_2' => 'address2', 'city' => 'Manchester', 'state' => 'NH', 'post_code' => '03103', 'country' => 'US', 'phone' => '5554445555', 'fax' => '5557775555', 'website' => 'http://www.dyn.com', 'organization' => 'Dynamic Network Services, Inc.', 'token' => 'asdlkfjasl23j4879afa', } |