This document provides instructions for integrating with the ARMS API. The API supports HTTP/2 but can also operate over HTTP/1.1. All endpoints support HTTP POST requests.
All API endpoints are accessed through the following base URL: https://api-lg-k.arms.cedar.com
To authenticate API requests, include the following HTTP headers in your requests:
application/jsonEndpoint: /ims/equipment/inventory
Description: Retrieves a list of railcar inventory items based on specified criteria.
Documentation: List railcar inventory API
Endpoint: /ims/groupings/station-tracks
Description: Retrieves a list of station tracks and their associated groupings for a specific carrier.
Documentation: List groupings API
Endpoint: /ims/equipment/move
Description: Updates the inventory details of a specific railcar.
Documentation: Update railcar inventory API
Endpoint: /ims/equipment/switch-request
Description: Submits a switch request for a railcar.
Documentation: Submit railcar switch request API
Endpoint: /ims/equipment/charged-history
Description: Retrieves the charge history of railcars.
Documentation: List railcar charge history API
Endpoint: /ims/equipment/bulk-edit-charged-history
Description: Performs bulk edits on the charge history of railcars.
Documentation: Bulk edit railcar charge history API
Here are examples of how to make the same API request using cURL, JavaScript, Python, and Java.
JavaScript (using fetch)
curl -X POST "https://api-lg-k.arms.cedar.com/ims/equipment/inventory?carrierId=1234" \
-H "x-arms-api-key: YOUR_API_KEY" \
-H "x-arms-assume-user: user@example.com" \
-H "Content-Type: application/json" \
-d '{
"carrierId": 1234,
"pageSize": 20,
"loadStatus": "LOAD",
"station": 1001
}'
const fetch = require('node-fetch'); // If using Node.js
const url = 'https://api-lg-k.arms.cedar.com/ims/equipment/inventory?carrierId=1234';
const headers = {
'x-arms-api-key': 'YOUR_API_KEY',
'x-arms-assume-user': 'user@example.com',
'Content-Type': 'application/json',
};
const data = {
carrierId: 1234,
pageSize: 20,
loadStatus: 'LOAD',
station: 1001,
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Python (using requests)
import requests
import json
url = 'https://api-lg-k.arms.cedar.com/ims/equipment/inventory?carrierId=1234'
headers = {
'x-arms-api-key': 'YOUR_API_KEY',
'x-arms-assume-user': 'user@example.com',
'Content-Type': 'application/json',
}
data = {
'carrierId': 1234,
'pageSize': 20,
'loadStatus': 'LOAD',
'station': 1001,
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Java (using HttpURLConnection)
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiRequest {
public static void main(String[] args) {
try {
String url = "https://api-lg-k.arms.cedar.com/ims/equipment/inventory?carrierId=1234";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
// Set HTTP method to POST
con.setRequestMethod("POST");
// Set headers
con.setRequestProperty("x-arms-api-key", "YOUR_API_KEY");
con.setRequestProperty("x-arms-assume-user", "user@example.com");
con.setRequestProperty("Content-Type", "application/json");
// Request body
String jsonInputString = "{\"carrierId\":1234,\"pageSize\":20,\"loadStatus\":\"LOAD\",\"station\":1001}";
// Enable input/output streams
con.setDoOutput(true);
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes("utf-8");
os.write(input, 0, input.length);
}
// Read response
int responseCode = con.getResponseCode();
System.out.println("Response Code: " + responseCode);
// Additional code to read response body here if needed
} catch (Exception e) {
e.printStackTrace();
}
}
}
For a complete list of API definitions and detailed documentation, please refer to the ARMS API Documentation .
For further assistance, please contact our support team.