POST api/ESSystem/v1/GeneratorCycles/generators/save

ينشئ مولّدًا جديدًا أو يعدّل موجودًا (حسب GeneratorGuid).

Request Information

URI Parameters

None.

Body Parameters

GeneratorModel
NameDescriptionTypeAdditional information
GeneratorGuid

معرّف المولّد (فارغ عند الإنشاء).

globally unique identifier

None.

Name

اسم المولّد (مطلوب).

string

None.

Code

رمز/كود المولّد (اختياري، يجب ألا يتكرر).

string

None.

Capacity

القدرة (kW).

decimal number

None.

SerialNumber

الرقم التسلسلي.

string

None.

Manufacturer

الجهة الصانعة.

string

None.

IsDisabled

هل المولّد موقوف/خارج الخدمة.

boolean

None.

Note

ملاحظات.

string

None.

SourceType

integer

None.

ParentSourceGuid

globally unique identifier

None.

Request Formats

application/json, text/json

Sample:
{
  "GeneratorGuid": "12a72746-7564-43dc-936e-7e795a19f123",
  "Name": "sample string 1",
  "Code": "sample string 2",
  "Capacity": 1.0,
  "SerialNumber": "sample string 3",
  "Manufacturer": "sample string 4",
  "IsDisabled": true,
  "Note": "sample string 5",
  "SourceType": 6,
  "ParentSourceGuid": "ba6e5dd6-c0c4-4f8b-8873-73b266be25be"
}

application/xml, text/xml

Sample:
<GeneratorModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
  <Capacity>1</Capacity>
  <Code>sample string 2</Code>
  <GeneratorGuid>12a72746-7564-43dc-936e-7e795a19f123</GeneratorGuid>
  <IsDisabled>true</IsDisabled>
  <Manufacturer>sample string 4</Manufacturer>
  <Name>sample string 1</Name>
  <Note>sample string 5</Note>
  <ParentSourceGuid>ba6e5dd6-c0c4-4f8b-8873-73b266be25be</ParentSourceGuid>
  <SerialNumber>sample string 3</SerialNumber>
  <SourceType>6</SourceType>
</GeneratorModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ApiResult
NameDescriptionTypeAdditional information
Error

integer

None.

Message

string

None.

Data

Object

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": 1,
  "Message": "sample string 2",
  "Data": {}
}

application/xml, text/xml

Sample:
<ApiResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Core.Common">
  <Data />
  <Error>1</Error>
  <Message>sample string 2</Message>
</ApiResult>