mirror of
https://gitlab.silvrtree.co.uk/martind2000/aodb.git
synced 2025-02-11 11:19:16 +00:00
9.2 KiB
9.2 KiB
Mobile Interface Endpoints
Verb | Name | Url |
---|---|---|
POST | Authentication | /api/auth |
POST | CancelTransaction | /api/cancelTransaction |
POST | ConfirmTransaction | /api/confirmTransaction |
POST | CreateTransaction | /api/createTransaction |
GET | Detail | /api/detail/ |
GET | Flights | /api/flights |
GET | GetOperatorImage | /api/GetOperatorImage |
GET | GetTransactionCodes | /api/getTransactionCodes |
GET | GetTransactionConfig | /api/getTransactionConfig |
GET | GetUserAccessRightsForTransaction | /api/getUserAccessRightsForTransaction |
GET | GetWindows | /api/getWindows |
POST | SetSite | /api/setSite |
GET | Transactions | /api/transactions |
POST | UpdateTransaction | /api/updateTransaction |
POST | UpdateFlight | /api/updateFlight |
Authentication
/api/auth
Example post
{
"Username": "username",
"Password": "password",
"ActiveDirectoryUsername": ""
}
Example response
{
"ContentEncoding": null,
"ContentType": null,
"Data": {
"LoginSuccess": true,
"SiteSelectionRequired": true,
"Sites": {
"SelectedSiteId": 0,
"Sites": [
{
"SiteId": 23,
"SiteName": "Oslo Airport",
"IATACode": "OSL"
},
{
"SiteId": 68,
"SiteName": "Alesund Airport, Vigra",
"IATACode": "AES"
}
],
"Warning": false
}
},
"JsonRequestBehavior": 1,
"MaxJsonLength": null,
"RecursionLimit": null
}
CancelTransaction
Example request
http://localhost:89/api/cancelTransaction
Example post
{
"Id": "296994",
"PhysflightId": "7126204",
"PublflightId": "7126204",
"Code": "TOW",
"Name": "ACFT TOW",
"Quantity": 1,
"Duration": "0",
"PONumber": "1",
"StartTime": "08/12/2016 12:18",
"EndTime": "08/12/2016 12:18",
"Confirmed": true,
"Cancelled": true,
"CodeType": 1,
"Timestamp": 1689685320
}
ConfirmTransaction
Example request
http://localhost:89/api/confirmTransaction
Example post
{
"Id": "296994",
"PhysflightId": "7126204",
"PublflightId": "7126204",
"Code": "TOW",
"Name": "ACFT TOW",
"Quantity": 1,
"Duration": "0",
"PONumber": "1",
"StartTime": "08/12/2016 12:18",
"EndTime": "08/12/2016 12:18",
"Confirmed": false,
"Cancelled": true,
"CodeType": 1,
"Timestamp": 1689685320
}
Example response
{
"Success":true
}
CreateTransaction
Example request
http://localhost:89/api/createTransaction
Example post
{
"Id": "296994",
"PhysflightId": "7126204",
"PublflightId": "7126204",
"Code": "TOW",
"Name": "ACFT TOW",
"Quantity": 1,
"Duration": "0",
"PONumber": "1",
"StartTime": "08/12/2016 12:18",
"EndTime": "08/12/2016 12:18",
"Confirmed": false,
"Cancelled": false,
"CodeType": 1,
"Timestamp": 1689685320
}
Example response
{
"Success":true
}
Detail
/api/detail/
Example request
http://localhost:89//api/detail/?flightId=7121274&requestId=c9bced9b-1e6e-44b3-a236-0dd3005ee967
Example response
{
"Editors": [
{
"Name": "readonly",
"Type": "readonly",
"Url": ""
},
{
"Name": "datetime",
"Type": "datetime",
"Url": "updateflightdate"
},
{
"Name": "freetext",
"Type": "freetext",
"Url": "updateflight"
}
],
"Groups": [
{
"Name": "Detail",
"Display": "Details",
"Icon": "ion-plane"
}
],
"Fields": [
{
"Value": "WF",
"Name": "Operator",
"Editor": "readonly",
"Group": "detail",
"Mapping": "SCOPER",
"Restrict": ""
}
],
"Flight": {
"Id": "7121274",
"PhysFlightId": "7121274",
"Type": "D",
"Number": "128",
"Operator": "WF",
"FlightConcat": "WF128",
"AircraftType": "DH1",
"Registration": "",
"Location": "FRO",
"Scheduled": "\/Date(1478635200000)\/",
"Estimated": "\/Date(-62135596800000)\/",
"Actual": "\/Date(-62135596800000)\/",
"Terminal": "T1",
"Stand": ""
},
"IsOutsideOfWindow": false
}
Flights
/api/flights
Gets list of flights
Example request
http://localhost:89/api/flights?window=Default
Example json data
{
"Flights": [
{
"Id": "6760005",
"PhysFlightId": "6760005",
"Type": "D",
"Number": "4055",
"Operator": "SK",
"FlightConcat": "SK4055",
"AircraftType": "73G",
"Registration": "",
"Location": "SVG",
"Scheduled": "\/Date(1478895600000)\/",
"Estimated": "\/Date(-62135596800000)\/",
"Actual": "\/Date(-62135596800000)\/",
"Terminal": "T1",
"Stand": ""
}
],
"RequestId": "6be3dc32-847c-4d6f-b504-a5dac8444791",
"Filter": "Default"
}
GetOperatorImage
api/GetOperatorImage
Example get request
/api/GetOperatorImage?code=BA
Content-Type:image/jpeg
GetTransactionCodes
/api/getTransactionCodes
Example request
http://localhost:89//api/getTransactionCodes
Example response
[
{
"Code": "TOW",
"CodeType": 1,
"Name": "ACFT TOW"
},
{
"Code": "ASU",
"CodeType": 1,
"Name": "AIR START UNIT"
}
]
GetTransactionConfig
/api/getTransactionConfig
Example request
http://localhost:89//api/getTransactionConfig?flightId=7250332&physFlight=7250332
Example response
[
{
"Id": 0,
"ColumnName": "FLGTTRAN_TRANCATG_CODE",
"Visible": true,
"Editable": true,
"Width": 6,
"Index": 0,
"HeaderText": "Code",
"DateFormat": null,
"Highlight": false,
"Description": "Code",
"Frozen": false,
"Configuration": null,
"ListItems": null,
"Justify": "RIGHT",
"Length": 4,
"Precision": 0,
"ColumnDataType": 0,
"CodeSetType": null,
"LookupType": 0,
"Formatter": null,
"Fixed": false,
"LookupTypeName": null,
"InGrid": false
}
]
GetUserAccessRightsForTransaction
/api/getUserAccessRightsForTransaction
Example request
http://localhost:89//api/getUserAccessRightsForTransaction
Example response
{
"ProfileCode": "FSWH SYSTEM CONTROLLER",
"FunctionDefinition": "FSW_TRANSACTIONS",
"Enabled": true,
"Update": true,
"Add": true,
"Delete": true,
"View": true,
"FuncEnabled": false,
"FuncPackage": false,
"FuncProcedure": false,
"FuncParamaters": 0
}
GetWindows
/api/getWindows
Example response
[
{
"Id": 0,
"Name": "ABB",
"Description": "ABB",
"Type": "STANDARD"
}
]
//TODO
SetSite
/api/setSite
Example request
http://localhost:89/api/setSite
Example response
{
"ContentEncoding": null,
"ContentType": null,
"Data": {
"Error": false
},
"JsonRequestBehavior": 1,
"MaxJsonLength": null,
"RecursionLimit": null
}
Transactions
/api/transactions
Example request
http://localhost:89//api/transactions?flightId=7250332&physFlight=7250332
Example response
[
{
"Id": "296645",
"PhysflightId": "7250332",
"PublflightId": "7250332",
"Code": "TOW",
"Name": "ACFT TOW",
"Quantity": 1,
"Duration": "0",
"PONumber": "",
"StartTime": "10/11/2016 19:14",
"EndTime": "10/11/2016 19:14",
"Confirmed": false,
"Cancelled": false,
"CodeType": 1,
"Timestamp": 1683178617
}
]
UpdateTransaction
Example post
{
"Id": "296994",
"PhysflightId": "7126204",
"PublflightId": "7126204",
"Code": "TOW",
"Name": "ACFT TOW",
"Quantity": 1,
"Duration": "0",
"PONumber": "1",
"StartTime": "08/12/2016 12:18",
"EndTime": "08/12/2016 12:18",
"Confirmed": false,
"Cancelled": false,
"CodeType": 1,
"Timestamp": 1689685320
}
UpdateFlight
Example post
{
"ErrorCode": null,
"Error": null,
"Success": true,
"RequiresConfirmation": false,
"ErrorDescription": null,
"ErrorCaption": null,
"PublishedFlightId": "7126204",
"ColumnName": "S1_PHYSFLGT_CREW_NUMBER",
"Value": "100",
"UpdatedValue": "100",
"Operator": null,
"AircraftType": null
}