Understanding How The API Works »
Creating a user in 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
Click to view all REST Resources |
User/ POST — Creates a new user.
HTTP Action — POST
URIs — https://api.dynect.net/REST/User/<user_name>/
|
Arguments — Click for More Info
NOTE: The username must be specified in the URI.
- string
address — The user’s street address.
- string
address_2 — The user’s street address, line 2.
- string
city — The user’s city, part of the user’s address.
- string
country — The user’s country, part of the user’s address.
- string
email — Required. The user’s Email address.
- string
fax — The user’s fax number.
- string
first_name — Required. The user’s first name.
- string
last_name — Required. The user’s last name.
- string
nickname — Required. The nickname for the Contact associated with the User .
- string
notify_email — Email address where the user should receive notifications.
- string
pager_email — Email address where the user should receive messages destined for a pager.
- string
organization — Required. The user’s organization.
- string
password — Required. Password for the User account.
- string
phone — Required. The user’s phone number.
A phone number can have the form:
( 0 ) ( country-code ) ( local number ) ( extension )
Only the country-code (1-3 digits) and local number (at least 7 digits) are required.
The extension can be up to 4 digits. Any non-digits are ignored.
- string
post_code — Zip code or Postal code.
- array
group_name — A list of permission groups where this user belongs.
- array
permission — A list of permissions assigned to the user.
- array
zone — A list of zones where the user’s permissions apply.
- string
zone_name — Required when setting specific user permissions. The name of the zone or FQDN where the user’s permissions apply.
- string
recurse — Indicates whether the permissions should apply to subnodes of the zone_name as well.
Y – Permissions should apply to zone_name and any nodes below zone_name Default setting.
N – Permissions should only apply to zone_name
- array
forbid — A list of forbidden permissions for the user.
- string
name — Required if setting a forbidden permission for this user. The name of the permission forbidden to the user.
- array
zone — A list of zones where the user’s forbidden permissions apply.
- string
zone_name — Required when setting forbidden permissions for a user. The name of the zone or FQDN where the user’s forbidden permissions apply.
- string
recurse — Indicates whether the user’s forbidden permissions apply to the subnodes of the zone_name .
Valid values:
Y – Forbidden permissions should apply to zone_name and any nodes below zone_name . Default setting.
N – Forbidden permissions should only apply to zone_name .
- string
status — Current status of the user.
- string
user_name — The user’s system username; used for logging into the system.
- string
website — User’s website.
|
Response — Click for More Info
- string
address — The user’s street address.
- string
address_2 — The user’s street address, line 2.
- string
city — The user’s city, part of the user’s address.
- string
country — The user’s country, part of the user’s address.
- string
email — The user’s email address.
- string
fax — The user’s fax number.
- string
first_name — First name of the user.
- string
last_name — Last name of the user.
- string
nickname — The nickname for the contact associated with the user .
- string
notify_email — Email address at which the user should receive notifications.
- string
pager_email — Email address at which the user should receive messages destined for a pager.
- string
organization — The user’s organization.
- string
phone The user’s phone number. A phone number can have the form:
( 0 ) ( country-code ) ( local number ) ( ext extension )
Only the country-code (1-3 digits) and local number (at least 7 digits) are required. The extension can be up to 4 digits. Any non-digits are ignored.
- string
post_code The user’s postal (zip) code, part of the user’s address.
- array
group_name — A list of permission groups where this user is a member.
- string
status — Current status of the user, values are ‘blocked’ or ‘active’.
- string
user_name — The user’s system username; used for logging in.
- string
website — The URL of the user’s website.
|
SOAP Syntax
Click to view all SOAP Commands |
CreateUser — Creates a new user.
|
Arguments — Click for More Info
- string
address — The user’s street address.
- string
address_2 — The user’s street address, line 2.
- string
city — The user’s city, part of the user’s address.
- string
country — The user’s country, part of the user’s address.
- string
email — Required. The user’s Email address.
- string
fax — The user’s fax number.
- string
first_name — Required. The user’s first name.
- string
last_name — Required. The user’s last name.
- string
nickname — Required. The nickname for the Contact associated with the User .
- string
notify_email — Email address where the user should receive notifications.
- string
pager_email — Email address where the user should receive messages destined for a pager.
- string
organization — Required. The user’s organization.
- string
password — Required. Password for the User account.
- string
phone — The user’s phone number.
A phone number can have the form:
( 0 ) ( country-code ) ( local number ) ( extension )
Only the country-code (1-3 digits) and local number (at least 7 digits) are required.
The extension can be up to 4 digits. Any non-digits are ignored.
- string
post_code — Zip code or Postal code, part of user’s address.
- array
group_name — A list of permission groups where this user belongs.
- array
permission — A list of permissions assigned to the user.
- array
zone — A list of zones where the user’s permissions apply.
- string
zone_name — Required if you are setting user specific permissions. The name of the zone or FQDN where the user’s permissions apply.
- string
recurse — Indicates whether the permissions should apply to subnodes of the zone_name as well.
Valid values:
Y – Permissions should apply to zone_name and any nodes below zone_name . Default setting.
N – Permissions should only apply to zone_name
- array
forbid — A list of forbidden permissions for the user.
string name — Required if you are setting user specific forbidden permissions. The name of the permission forbidden to the user.
- array
zone — A list of zones where the user’s forbidden permissions apply.
- string
zone_name — Required if you are setting user specific forbidden permissions. The name of the zone or FQDN where the user’s forbidden permissions apply.
- string
recurse — Indicates whether the user’s forbidden permissions apply to the subnodes of the zone_name .
Valid values:
Y – Forbidden permissions should apply to zone_name and any nodes below zone_name . Default setting.
N – Forbidden permissions should only apply to zone_name .
- string
state — The user’s state, part of the user’s address.
- string
token — Required. The session identifier.
- string
user_name — The name of the user to be used for logging in.
- string
website — User’s website in URL format.
|
Response — Click for More Info
- hash data
- string
address — The user’s street address.
- string
address_2 — The user’s street address, line 2.
- string
city — The user’s city, part of the user’s address.
- string
country — The user’s country, part of the user’s address.
- string
email — The user’s email address.
- string
fax — The user’s fax number.
- string
first_name — First name of the user.
- string
last_name — Last name of the user.
- string
nickname — The nickname for the contact associated with the user.
- string
notify_email — Email address at which the user should receive notifications.
- string
pager_email — Email address at which the user should receive messages destined for a pager.
- string
organization — The user’s organization.
- string
phone — The user’s phone number. A phone number can have the form:
( 0 ) ( country-code ) ( local number ) ( ext extension )
Only the country-code (1-3 digits) and local number (at least 7 digits) are required. The extension can be up to 4 digits. Any non-digits are ignored.
- string
post_code — The user’s postal (zip) code, part of the user’s address.
- array
group_name — A list of permission groups where the user belongs.
- string
status — Current status of the user, values are ‘blocked’ or ‘active.
- string
state — The user’s state, part of the user’s address.
- string
user_name — The user’s system username; used for logging in.
- string
website — The URL of the user’s website.
|
Example Request — Click for More Info
{
'user_name' => 'userx',
'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',
}
|
<< DNS API Knowledge Base