POST api/Flight
Creates Flight in the database
Request Information
URI Parameters
None.
Body Parameters
Flight Object from UI
Flight| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| IDFlight | string |
None. |
|
| FlightDateTime | date |
None. |
|
| FlightDuration | integer |
None. |
|
| Price | decimal number |
None. |
|
| PlaneId | integer |
None. |
|
| OriginId | integer |
None. |
|
| DestinationId | integer |
None. |
Request Formats
application/json, text/json
Sample:
{
"Id": 1,
"IDFlight": "sample string 2",
"FlightDateTime": "2026-08-25T06:23:04.9919598-05:00",
"FlightDuration": 4,
"Price": 5.0,
"PlaneId": 1,
"OriginId": 1,
"DestinationId": 1
}
application/xml
Sample:
Sample not available.
text/xml
Sample:
Sample not available.
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Action Result
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.