Department
The details of the endpoints associated with the Department entity are shown below. To have the same details online, use the Online option on the left side of the menu
Implementation Notes
Get an array of all Departments, by default some parameters are set, maxPerPage = 50, page = 1. The total number of deparments is returned in a Response Header named "x-total-count"
Response Class (Status 200)
ViewModel.DepartmentVM {
departmentCode (string, optional): Department Code,
departmentName (string, optional): Department Name
}
[
{
"departmentCode": "string",
"departmentName": "string"
}
]
Response Content Type
Parameters
Parameter | Description | Parameter Type | Data Type |
---|---|---|---|
Filter by department name | query | string | |
Filter by department code | query | string | |
Current Page of the filter, by default configured 1 |
query | integer | |
Max number of Locations to filter by Page, by default configured 50 |
query | integer |
Response Messages
HTTP Status Code | Reason | Response Model | Headers |
---|---|---|---|
400 | Bad Request | ||
401 | Unauthorized | ||
500 | Internal Server Error |
Curl
curl -X GET --header "Accept: application/json" --header "X-AccessToken: tokenString" "http://204.11.236.187/api/sekureid/external/Department"
Request URL
http://204.11.236.187/api/sekureid/external/Department
Response Body
[
{
"departmentCode": "0001",
"departmentName": "Department 1"
},
{
"departmentCode": "0003",
"departmentName": "Department 2"
},
{
"departmentCode": "0021",
"departmentName": "Department 3"
},
]
Response Headers
{
"pragma": "no-cache",
"date": "Fri, 21 Jul 2017 01:43:43 GMT",
"server": "Microsoft-IIS/7.5",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET",
"content-type": "application/json; charset=utf-8",
"cache-control": "no-cache",
"content-length": "1584",
"x-total-count": "10",
"expires": "-1"
}
Implementation Notes
Insert new Department
Response Class (Status 201)
Response Content Type
Parameters
Parameter | Value | Description | Parameter Type | Data Type |
---|---|---|---|---|
|
Department Model | query |
|
Response Messages
HTTP Status Code | Reason | Response Model | Headers |
---|---|---|---|
400 | Bad Request | ||
401 | Unauthorized | ||
500 | Internal Server Error |
Implementation Notes
Edit an existing department
Response Class (Status 201)
Response Content Type
Parameters
Parameter | Value | Description | Parameter Type | Data Type |
---|---|---|---|---|
|
Department Model | query |
|
Response Messages
HTTP Status Code | Reason | Response Model | Headers |
---|---|---|---|
400 | Bad Request | ||
401 | Unauthorized | ||
404 | Not Found | ||
409 | Conflict | ||
412 | Conflict | ||
500 | Internal Server Error |
Implementation Notes
Delete a Department by Department Code
Response Class (Status 200)
Response Content Type
Parameters
Parameter | Value | Description | Parameter Type | Data Type |
---|---|---|---|---|
Required |
Department Code |
path | string |
Response Messages
HTTP Status Code | Reason | Response Model | Headers |
---|---|---|---|
400 | Bad Request | ||
401 | Unauthorized | ||
404 | Not Found | ||
406 | Precondition Failed | ||
412 | Not Acceptable | ||
500 | Internal Server Error |
Implementation Notes
Get a Location by Company Location Code
Response Class (Status 200)
ViewModel.DepartmentVM {
departmentCode (string, optional): Department Code,
departmentName (string, optional): Department Name
}
[
{
"departmentCode": "string",
"departmentName": "string"
}
]
Response Content Type
Parameters
Parameter | value | Description | Parameter Type | Data Type |
---|---|---|---|---|
Required | Location Code | path | string |
Response Messages
HTTP Status Code | Reason | Response Model | Headers |
---|---|---|---|
400 | Bad Request | ||
401 | Unauthorized | ||
500 | Internal Server Error |