AEI API
Receive detector scan
Send one AEI detector pass, or one OS traffic file, to ARMS. This is the same CSV a railroad can upload over SFTP, and ARMS reads it the same way: the scan appears on the AEI scans page, is matched to the cars in inventory and to the train, and can start AEI automation.
Usage notes:
- Send the file’s text, unchanged, as
message. A detector CSV starts with a summary line (such asTotal cars: 20), which is skipped; the second line is the header row, which must includeCar Number,MilePost,Scanning DatetimeandFrom. Every row must have the sameMilePost, and the cars are kept in the order sent. - An OS traffic CSV has the header
SequenceNo,MilePost,Direction,Timestampon its first line. Its latest row sets where the train is; it carries no cars. - Times are the railroad’s local time, as
YYYY-MM-DD HH:MM:SS. - Send
trainIdto say which train the scan belongs to; alternatively, afileNameof the formTRAINID_YYYYMMDD_HHMMSS.csv, as on SFTP, sets it. An OS traffic file is matched only to the train with that ID, so always send one with OS traffic files. A detector pass is matched to trains by its cars, and its train ID is stored with the scan.fileNameis a bare file name, without folders.fileNameandtrainIdmay use only letters, digits,.,_and-, and must start with a letter or digit. - A car number other than letters followed by digits is stored as a bad read, and the rest of the scan is kept.
- A scan older than the railroad’s AEI scan-age limit (2 hours unless the railroad has changed it) is stored but not matched to inventory, and starts no automation; the request still returns 200. A scan more than 5 minutes in the future is refused with 400.
- At most 1,000,000 characters and 2,000 rows per request.
- Resending exactly the same body (
message,trainIdandfileName), such as a retry after a timeout, returns 409 witherrorArgs.aeiIdnaming the scan the first request created. Retry with the same body rather than rebuilding the CSV. A resend that adds or correctstrainIdorfileNamecreates a new scan. - Files sent over SFTP are not checked against files sent here. Send each file over one channel only, or it is received twice.
- A CSV without a
MilePostcolumn is refused with 400. - A missing permission returns 401.
POST
Authorizations
Query Parameters
Body
application/json