User Alias

A user alias is an alias to a User Address that is typically used to add a 2 to 6 ‘PBX digit extension.’

User Alias Add

UserAliasAdd creates an alias for a User Address.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAliasAdd”
SessionId Authenticated Session identifier.
OrganizationId A positive integer which references a unique organization.
AliasUsername The username portion of the alias to add.
AddressUsername The username portion of the address to which the new alias should be assigned.
Visibility Either the value ‘PUBLIC’ or ‘PRIVATE’, legacy use for indication of whether or not to display an extension to any user. Most users will want to use the value of ‘PUBLIC’ for this parameter.

Result Element Schema

UserAliasAdd.rnc:

UserAliasAdd.rng

Sample Request

cURL
1
2
3
curl -X POST \
--data 'SessionId=9jsijojr26ftlt63tbor09id86&Action=UserAliasAdd&OrganizationId=30896&AliasUsername=1234&AddressUsername=user&Visibility=PUBLIC' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var data = new FormData();
data.append('SessionId', '9jsijojr26ftlt63tbor09id86');
data.append('Action', 'UserAliasAdd');
data.append('OrganizationId', '30896');
data.append('AliasUsername', '1234');
data.append('AddressUsername', 'user');
data.append('Visibility', 'PUBLIC');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T14:19:57+00:00</DateTime>
      <Duration>26</Duration>
      <Parameters>
        <Parameter>
          <Name>SessionId</Name>
          <Value>9jsijojr26ftlt63tbor09id86</Value>
        </Parameter>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAliasAdd</Value>
        </Parameter>
        <Parameter>
          <Name>OrganizationId</Name>
          <Value>30896</Value>
        </Parameter>
        <Parameter>
          <Name>AliasUsername</Name>
          <Value>1234</Value>
        </Parameter>
        <Parameter>
          <Name>AddressUsername</Name>
          <Value>user</Value>
        </Parameter>
        <Parameter>
          <Name>Visibility</Name>
          <Value>PUBLIC</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>9jsijojr26ftlt63tbor09id86</SessionId>
      <UserId>218297</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAliasAdd>
      <UserAlias>
        <AliasUsername>1234</AliasUsername>
        <AliasDomain>example.onsip.com</AliasDomain>
        <AddressUsername>user</AddressUsername>
        <AddressDomain>example.onsip.com</AddressDomain>
        <AddressType>user</AddressType>
        <AddressName>user</AddressName>
        <AddressId>676198</AddressId>
        <AliasVisibility>PUBLIC</AliasVisibility>
      </UserAlias>
    </UserAliasAdd>
  </Result>
</Response>

User Alias Browse

Returns information about a group of UserAliases.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAliasBrowse”
SessionId Authenticated Session identifier.
One and Only One of the Following ParametersDescription
AccountId A positive integer which references a unique account.
OrganizationId A positive integer which references a unique organization.
UserId A positive integer which references a unique user.

Result Element Schema

UserAliasBrowse.rnc:

UserAliasBrowse.rng

Sample Request

cURL
1
2
3
curl -X POST \
--data 'SessionId=9jsijojr26ftlt63tbor09id86&Action=UserAliasBrowse&OrganizationId=30896' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
var data = new FormData();
data.append('SessionId', '9jsijojr26ftlt63tbor09id86');
data.append('Action', 'UserAliasBrowse');
data.append('OrganizationId', '30896');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T14:30:56+00:00</DateTime>
      <Duration>60</Duration>
      <Parameters>
        <Parameter>
          <Name>SessionId</Name>
          <Value>9jsijojr26ftlt63tbor09id86</Value>
        </Parameter>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAliasBrowse</Value>
        </Parameter>
        <Parameter>
          <Name>OrganizationId</Name>
          <Value>30896</Value>
        </Parameter>
        <Parameter>
          <Name>Limit</Name>
          <Value>20</Value>
        </Parameter>
        <Parameter>
          <Name>Offset</Name>
          <Value>0</Value>
        </Parameter>
        <Parameter>
          <Name>CalcFound</Name>
          <Value>true</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>9jsijojr26ftlt63tbor09id86</SessionId>
      <UserId>218297</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAliasBrowse>
      <UserAliases Limit="20" Offset="0" Found="1">
        <UserAlias>
          <AliasUsername>1234</AliasUsername>
          <AliasDomain>example.onsip.com</AliasDomain>
          <AddressUsername>user</AddressUsername>
          <AddressDomain>example.onsip.com</AddressDomain>
          <AddressType>user</AddressType>
          <AddressName>user</AddressName>
          <AddressId>676198</AddressId>
          <AliasVisibility>PUBLIC</AliasVisibility>
        </UserAlias>
      </UserAliases>
    </UserAliasBrowse>
  </Result>
</Response>

User Alias Delete

Delete a UserAlias.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAliasDelete”
SessionId Authenticated Session identifier.
OrganizationId A positive integer which references a unique organization.
AliasUsername The username portion of the alias to delete.

Result Element Schema

UserAliasDelete.rnc:

UserAliasDelete.rng

Sample Request

cURL
1
2
3
curl -X POST \
--data 'SessionId=9jsijojr26ftlt63tbor09id86&Action=UserAliasDelete&OrganizationId=30896&AliasUsername=1234' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
var data = new FormData();
data.append('SessionId', '9jsijojr26ftlt63tbor09id86');
data.append('Action', 'UserAliasDelete');
data.append('OrganizationId', '30896');
data.append('AliasUsername', '1234');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T14:53:24+00:00</DateTime>
      <Duration>29</Duration>
      <Parameters>
        <Parameter>
          <Name>SessionId</Name>
          <Value>9jsijojr26ftlt63tbor09id86</Value>
        </Parameter>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAliasDelete</Value>
        </Parameter>
        <Parameter>
          <Name>OrganizationId</Name>
          <Value>30896</Value>
        </Parameter>
        <Parameter>
          <Name>AliasUsername</Name>
          <Value>1234</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>9jsijojr26ftlt63tbor09id86</SessionId>
      <UserId>218297</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAliasDelete/>
  </Result>
</Response>

User Alias Edit

Update a UserAlias.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAliasEdit”
SessionId Authenticated Session identifier.
OrganizationId A positive integer which references a unique organization.
AliasUsername The username portion of the alias to edit.
NewAliasUsername The new username of the alias.
Visibility Either the value ‘PUBLIC’ or ‘PRIVATE’, legacy use for indication of whether or not to display an extension to any user. Most users will want to use the value of ‘PUBLIC’ for this parameter.

Result Element Schema

UserAliasEdit.rnc:

UserAliasEdit.rng

Sample Request

cURL
1
2
3
curl -X POST \
--data 'SessionId=9jsijojr26ftlt63tbor09id86&Action=UserAliasEdit&OrganizationId=30896&AliasUsername=1234&NewAliasUsername=4321&Visibility=PUBLIC' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var data = new FormData();
data.append('SessionId', '9jsijojr26ftlt63tbor09id86');
data.append('Action', 'UserAliasEdit');
data.append('OrganizationId', '30896');
data.append('AliasUsername', '1234');
data.append('NewAliasUsername', '4321');
data.append('Visibility', 'PUBLIC');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T14:49:19+00:00</DateTime>
      <Duration>59</Duration>
      <Parameters>
        <Parameter>
          <Name>SessionId</Name>
          <Value>9jsijojr26ftlt63tbor09id86</Value>
        </Parameter>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAliasEdit</Value>
        </Parameter>
        <Parameter>
          <Name>OrganizationId</Name>
          <Value>30896</Value>
        </Parameter>
        <Parameter>
          <Name>AliasUsername</Name>
          <Value>1234</Value>
        </Parameter>
        <Parameter>
          <Name>NewAliasUsername</Name>
          <Value>4321</Value>
        </Parameter>
        <Parameter>
          <Name>Visibility</Name>
          <Value>PUBLIC</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>9jsijojr26ftlt63tbor09id86</SessionId>
      <UserId>218297</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAliasEdit>
      <UserAlias>
        <AliasUsername>4321</AliasUsername>
        <AliasDomain>example.onsip.com</AliasDomain>
        <AddressUsername>user</AddressUsername>
        <AddressDomain>example.onsip.com</AddressDomain>
        <AddressType>user</AddressType>
        <AddressName>user</AddressName>
        <AddressId>676198</AddressId>
        <AliasVisibility>PUBLIC</AliasVisibility>
      </UserAlias>
    </UserAliasEdit>
  </Result>
</Response>

Topics: Developer Docs