POST api/Product/Add
Add and Edit Product
Request Information
URI Parameters
None.
Body Parameters
ProductsObject| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
For Edit mode set value otherwise set = 0 |
Object |
None. |
| Name |
Name is required |
Object |
None. |
| ProductType |
ProductType is required. Set ProductType from GetAllMasterValues Method |
Object |
None. |
| ListernerType |
ListernerType is required. Set value = 0 (TCP) or 1 (HTTP) |
Object |
None. |
| Description |
Set default value = ""(Blank) Otherwise set Description |
Object |
None. |
| CurrentFirmware |
Set default value = ""(Blank) Otherwise set CurrentFirmware |
Object |
None. |
| Status |
Set default value = "1" |
Object |
None. |
| StaticAlarms |
StaticAlarms is required. Set default value = "1" |
Object |
None. |
| DynamicAlarms |
DynamicAlarms is required. Set default value = "1" |
Object |
None. |
Request Formats
application/json, text/json
Sample:
{
"ID": {},
"Name": {},
"ProductType": {},
"ListernerType": {},
"Description": {},
"CurrentFirmware": {},
"Status": {},
"StaticAlarms": {},
"DynamicAlarms": {},
"CreatedBy": {},
"CreatedDateTime": {},
"CreatedIp": {},
"ModifiedBy": {},
"ModifiedDateTime": {},
"ModifiedIp": {}
}
application/xml, text/xml
Sample:
<ProductsObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/StrategicAlliance"> <CreatedBy /> <CreatedDateTime /> <CreatedIp /> <CurrentFirmware /> <Description /> <DynamicAlarms /> <ID /> <ListernerType /> <ModifiedBy /> <ModifiedDateTime /> <ModifiedIp /> <Name /> <ProductType /> <StaticAlarms /> <Status /> </ProductsObject>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.