Resource URI: /branch
Default Resource Properties:
The resource is represented by the following properties when the GET request is performed:
Property | Description |
totalResults | The total number of results. |
currentPage | Number of the current page. |
totalPages | The number of total pages. |
resultPerPage | Number of results per page. |
ID | Unique identification number of the branch. |
name | Branch name. |
description | Short description provided by the user. |
address | Address of the branch. |
ID | Name of the street. |
street | Number of the street. |
city | Name of the city. |
country | Name of the country. |
state | Name of the state. |
ZIP | ZIP code number. |
officeDesignation | |
address | Office address. |
phoneNumber | Branch phone number. |
faxNumber |
Specific Response Codes: Error 400 (wrong id when update branch).
HTTP Method: GET
Retrieves a list with the branches saved in the system
Example: XML format
<branch>
<metadata>
<totalResults>1</totalResults>
<currentPage>1</currentPage>
<totalPages>1</totalPages>
<resultsPerPage>1</resultsPerPage>
</metadata>
<branches>
<branch>
<id>1</id>
<name>Branch1</name>
<description>desc</description>
<address>
<id>1</id>
<street>fifteen</street>
<city>Los Angeles</city>
<country>U.S.A.</country>
<state>California</state>
<zip>8080</zip>
<officeDesignation>mmm</officeDesignation>
</address>
<phoneNumber>121231</phoneNumber>
<faxNumber>11221</faxNumber>
</branch>
</branches>
</branch>
https://\[server\]/sipxconfig/rest/branch?sortdir=forward&sortby=description&page=1&pagesize=1
HTTP Method: PUT
Adds a new branch. The ID is auto-generated and any value is ignored:
<branch>
<id>1</id>
<name>HallOfJustice</name>
<description>API Testing</description>
<address>
<id>3</id>
<street>1 Justice Way</street>
<city>Smallville</city>
<country>United States</country>
<state>MidAmerica</state>
<zip>55555</zip>
<officeDesignation>stop</officeDesignation>
</address>
<phoneNumber>555-HERO</phoneNumber>
</branch>
Unsupported HTTP Method: POST, DELETE
Resource URI: /branch/{id}
Default Resource Properties:
The resource is represented by the following properties when the GET request is performed:
Property | Description |
branch | The branch related information is similar to the one described under /branch. |
Specific Response Codes: Error 400 (wrong id when update branch)
HTTP Method: GET
Retrieves information on the branch with the specified ID.
Example: XML format
<branch>
<id>1</id>
<name>MyBranch</name>
<description>desc</description>
<address>
<id>1</id>
<street>Street1</street>
<city>Boston</city>
<country>USA</country>
<state>MA</state>
<zip>808080</zip>
</address>
</branch>
JSON format
{"branch": {
"id": 1,
"name": "MyBranch",
"description": "desc",
"address": {
"id": 1,
"street": "Street1",
"city": "Boston",
"country": "USA",
"state": "MA",
"zip": "808080"
}
}}
HTTP Method: PUT
Updates branch with the specified ID. Uses the same XML as for creation.
HTTP Method: DELETE
Removes branch with the specified ID.
Unsupported HTTP Method: POST