Work Order API
Record Train Event
Record a train event.
POST
/
t
/
v1
/
record-train-event
Record Train Event
curl --request POST \
--url https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"eventLocation": {
"fsac": "<string>",
"groupingId": "<string>"
},
"eventMessage": "<string>",
"externalSystemEvent": {
"eventId": "<string>",
"eventTimestamp": "2023-11-07T05:31:56Z",
"eventTypeKey": "<string>",
"systemName": "<string>",
"user": {
"displayName": "<string>",
"email": "<string>"
}
},
"finalApprovalEventDetails": {
"consistEquipmentUuids": [
"<string>"
]
},
"notes": "<string>",
"otherEventDetails": {},
"safetyCheckEventDetails": {
"failedEquipmentUuids": [
"<string>"
],
"passedEquipmentUuids": [
"<string>"
],
"status": "PASSED"
},
"workOrderId": "<string>"
}
'import requests
url = "https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event"
payload = {
"eventLocation": {
"fsac": "<string>",
"groupingId": "<string>"
},
"eventMessage": "<string>",
"externalSystemEvent": {
"eventId": "<string>",
"eventTimestamp": "2023-11-07T05:31:56Z",
"eventTypeKey": "<string>",
"systemName": "<string>",
"user": {
"displayName": "<string>",
"email": "<string>"
}
},
"finalApprovalEventDetails": { "consistEquipmentUuids": ["<string>"] },
"notes": "<string>",
"otherEventDetails": {},
"safetyCheckEventDetails": {
"failedEquipmentUuids": ["<string>"],
"passedEquipmentUuids": ["<string>"],
"status": "PASSED"
},
"workOrderId": "<string>"
}
headers = {
"Carrier": "<carrier>",
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Carrier: '<carrier>',
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
eventLocation: {fsac: '<string>', groupingId: '<string>'},
eventMessage: '<string>',
externalSystemEvent: {
eventId: '<string>',
eventTimestamp: '2023-11-07T05:31:56Z',
eventTypeKey: '<string>',
systemName: '<string>',
user: {displayName: '<string>', email: '<string>'}
},
finalApprovalEventDetails: {consistEquipmentUuids: ['<string>']},
notes: '<string>',
otherEventDetails: {},
safetyCheckEventDetails: {
failedEquipmentUuids: ['<string>'],
passedEquipmentUuids: ['<string>'],
status: 'PASSED'
},
workOrderId: '<string>'
})
};
fetch('https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventLocation' => [
'fsac' => '<string>',
'groupingId' => '<string>'
],
'eventMessage' => '<string>',
'externalSystemEvent' => [
'eventId' => '<string>',
'eventTimestamp' => '2023-11-07T05:31:56Z',
'eventTypeKey' => '<string>',
'systemName' => '<string>',
'user' => [
'displayName' => '<string>',
'email' => '<string>'
]
],
'finalApprovalEventDetails' => [
'consistEquipmentUuids' => [
'<string>'
]
],
'notes' => '<string>',
'otherEventDetails' => [
],
'safetyCheckEventDetails' => [
'failedEquipmentUuids' => [
'<string>'
],
'passedEquipmentUuids' => [
'<string>'
],
'status' => 'PASSED'
],
'workOrderId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Carrier: <carrier>",
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event"
payload := strings.NewReader("{\n \"eventLocation\": {\n \"fsac\": \"<string>\",\n \"groupingId\": \"<string>\"\n },\n \"eventMessage\": \"<string>\",\n \"externalSystemEvent\": {\n \"eventId\": \"<string>\",\n \"eventTimestamp\": \"2023-11-07T05:31:56Z\",\n \"eventTypeKey\": \"<string>\",\n \"systemName\": \"<string>\",\n \"user\": {\n \"displayName\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"finalApprovalEventDetails\": {\n \"consistEquipmentUuids\": [\n \"<string>\"\n ]\n },\n \"notes\": \"<string>\",\n \"otherEventDetails\": {},\n \"safetyCheckEventDetails\": {\n \"failedEquipmentUuids\": [\n \"<string>\"\n ],\n \"passedEquipmentUuids\": [\n \"<string>\"\n ],\n \"status\": \"PASSED\"\n },\n \"workOrderId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Carrier", "<carrier>")
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventLocation\": {\n \"fsac\": \"<string>\",\n \"groupingId\": \"<string>\"\n },\n \"eventMessage\": \"<string>\",\n \"externalSystemEvent\": {\n \"eventId\": \"<string>\",\n \"eventTimestamp\": \"2023-11-07T05:31:56Z\",\n \"eventTypeKey\": \"<string>\",\n \"systemName\": \"<string>\",\n \"user\": {\n \"displayName\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"finalApprovalEventDetails\": {\n \"consistEquipmentUuids\": [\n \"<string>\"\n ]\n },\n \"notes\": \"<string>\",\n \"otherEventDetails\": {},\n \"safetyCheckEventDetails\": {\n \"failedEquipmentUuids\": [\n \"<string>\"\n ],\n \"passedEquipmentUuids\": [\n \"<string>\"\n ],\n \"status\": \"PASSED\"\n },\n \"workOrderId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Carrier"] = '<carrier>'
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventLocation\": {\n \"fsac\": \"<string>\",\n \"groupingId\": \"<string>\"\n },\n \"eventMessage\": \"<string>\",\n \"externalSystemEvent\": {\n \"eventId\": \"<string>\",\n \"eventTimestamp\": \"2023-11-07T05:31:56Z\",\n \"eventTypeKey\": \"<string>\",\n \"systemName\": \"<string>\",\n \"user\": {\n \"displayName\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"finalApprovalEventDetails\": {\n \"consistEquipmentUuids\": [\n \"<string>\"\n ]\n },\n \"notes\": \"<string>\",\n \"otherEventDetails\": {},\n \"safetyCheckEventDetails\": {\n \"failedEquipmentUuids\": [\n \"<string>\"\n ],\n \"passedEquipmentUuids\": [\n \"<string>\"\n ],\n \"status\": \"PASSED\"\n },\n \"workOrderId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Headers
Carrier ID
Body
application/json
Request message for recording a train event.
Request message for recording a train event.
Information about where the event occurred.
Show child attributes
Show child attributes
A human-readable message for the event. This will override the default event message.
Event that originated from an external system.
Show child attributes
Show child attributes
Details for a final approval event.
Show child attributes
Show child attributes
Free-form notes about the event.
Empty message - just serves as a discriminator
Details for a safety check event.
Show child attributes
Show child attributes
The work order ID associated with this event.
Response
A successful response.
The response is of type object.
Was this page helpful?
⌘I
Record Train Event
curl --request POST \
--url https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"eventLocation": {
"fsac": "<string>",
"groupingId": "<string>"
},
"eventMessage": "<string>",
"externalSystemEvent": {
"eventId": "<string>",
"eventTimestamp": "2023-11-07T05:31:56Z",
"eventTypeKey": "<string>",
"systemName": "<string>",
"user": {
"displayName": "<string>",
"email": "<string>"
}
},
"finalApprovalEventDetails": {
"consistEquipmentUuids": [
"<string>"
]
},
"notes": "<string>",
"otherEventDetails": {},
"safetyCheckEventDetails": {
"failedEquipmentUuids": [
"<string>"
],
"passedEquipmentUuids": [
"<string>"
],
"status": "PASSED"
},
"workOrderId": "<string>"
}
'import requests
url = "https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event"
payload = {
"eventLocation": {
"fsac": "<string>",
"groupingId": "<string>"
},
"eventMessage": "<string>",
"externalSystemEvent": {
"eventId": "<string>",
"eventTimestamp": "2023-11-07T05:31:56Z",
"eventTypeKey": "<string>",
"systemName": "<string>",
"user": {
"displayName": "<string>",
"email": "<string>"
}
},
"finalApprovalEventDetails": { "consistEquipmentUuids": ["<string>"] },
"notes": "<string>",
"otherEventDetails": {},
"safetyCheckEventDetails": {
"failedEquipmentUuids": ["<string>"],
"passedEquipmentUuids": ["<string>"],
"status": "PASSED"
},
"workOrderId": "<string>"
}
headers = {
"Carrier": "<carrier>",
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Carrier: '<carrier>',
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
eventLocation: {fsac: '<string>', groupingId: '<string>'},
eventMessage: '<string>',
externalSystemEvent: {
eventId: '<string>',
eventTimestamp: '2023-11-07T05:31:56Z',
eventTypeKey: '<string>',
systemName: '<string>',
user: {displayName: '<string>', email: '<string>'}
},
finalApprovalEventDetails: {consistEquipmentUuids: ['<string>']},
notes: '<string>',
otherEventDetails: {},
safetyCheckEventDetails: {
failedEquipmentUuids: ['<string>'],
passedEquipmentUuids: ['<string>'],
status: 'PASSED'
},
workOrderId: '<string>'
})
};
fetch('https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventLocation' => [
'fsac' => '<string>',
'groupingId' => '<string>'
],
'eventMessage' => '<string>',
'externalSystemEvent' => [
'eventId' => '<string>',
'eventTimestamp' => '2023-11-07T05:31:56Z',
'eventTypeKey' => '<string>',
'systemName' => '<string>',
'user' => [
'displayName' => '<string>',
'email' => '<string>'
]
],
'finalApprovalEventDetails' => [
'consistEquipmentUuids' => [
'<string>'
]
],
'notes' => '<string>',
'otherEventDetails' => [
],
'safetyCheckEventDetails' => [
'failedEquipmentUuids' => [
'<string>'
],
'passedEquipmentUuids' => [
'<string>'
],
'status' => 'PASSED'
],
'workOrderId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Carrier: <carrier>",
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event"
payload := strings.NewReader("{\n \"eventLocation\": {\n \"fsac\": \"<string>\",\n \"groupingId\": \"<string>\"\n },\n \"eventMessage\": \"<string>\",\n \"externalSystemEvent\": {\n \"eventId\": \"<string>\",\n \"eventTimestamp\": \"2023-11-07T05:31:56Z\",\n \"eventTypeKey\": \"<string>\",\n \"systemName\": \"<string>\",\n \"user\": {\n \"displayName\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"finalApprovalEventDetails\": {\n \"consistEquipmentUuids\": [\n \"<string>\"\n ]\n },\n \"notes\": \"<string>\",\n \"otherEventDetails\": {},\n \"safetyCheckEventDetails\": {\n \"failedEquipmentUuids\": [\n \"<string>\"\n ],\n \"passedEquipmentUuids\": [\n \"<string>\"\n ],\n \"status\": \"PASSED\"\n },\n \"workOrderId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Carrier", "<carrier>")
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventLocation\": {\n \"fsac\": \"<string>\",\n \"groupingId\": \"<string>\"\n },\n \"eventMessage\": \"<string>\",\n \"externalSystemEvent\": {\n \"eventId\": \"<string>\",\n \"eventTimestamp\": \"2023-11-07T05:31:56Z\",\n \"eventTypeKey\": \"<string>\",\n \"systemName\": \"<string>\",\n \"user\": {\n \"displayName\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"finalApprovalEventDetails\": {\n \"consistEquipmentUuids\": [\n \"<string>\"\n ]\n },\n \"notes\": \"<string>\",\n \"otherEventDetails\": {},\n \"safetyCheckEventDetails\": {\n \"failedEquipmentUuids\": [\n \"<string>\"\n ],\n \"passedEquipmentUuids\": [\n \"<string>\"\n ],\n \"status\": \"PASSED\"\n },\n \"workOrderId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lg-k-h1.arms.cedarai.com/t/v1/record-train-event")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Carrier"] = '<carrier>'
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventLocation\": {\n \"fsac\": \"<string>\",\n \"groupingId\": \"<string>\"\n },\n \"eventMessage\": \"<string>\",\n \"externalSystemEvent\": {\n \"eventId\": \"<string>\",\n \"eventTimestamp\": \"2023-11-07T05:31:56Z\",\n \"eventTypeKey\": \"<string>\",\n \"systemName\": \"<string>\",\n \"user\": {\n \"displayName\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"finalApprovalEventDetails\": {\n \"consistEquipmentUuids\": [\n \"<string>\"\n ]\n },\n \"notes\": \"<string>\",\n \"otherEventDetails\": {},\n \"safetyCheckEventDetails\": {\n \"failedEquipmentUuids\": [\n \"<string>\"\n ],\n \"passedEquipmentUuids\": [\n \"<string>\"\n ],\n \"status\": \"PASSED\"\n },\n \"workOrderId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}