GET api/departments/{id}
Gets department by Id
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
integer |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
The department if found
DepartmentViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| DepartmentId | integer |
None. |
|
| Name | string |
None. |
Response Formats
application/json, text/json
Sample:
{
"DepartmentId": 1,
"Name": "sample string 2"
}
application/xml, text/xml
Sample:
<DepartmentViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpeedadminApi.ViewModels"> <DepartmentId>1</DepartmentId> <Name>sample string 2</Name> </DepartmentViewModel>